Skip to content

Commit 90e3da0

Browse files
committed
initial copy from react-fundamentals
0 parents  commit 90e3da0

File tree

87 files changed

+20385
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+20385
-0
lines changed

.github/workflows/validate.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: deploy
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- 'main'
11+
pull_request:
12+
branches:
13+
- 'main'
14+
jobs:
15+
setup:
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest, macos-latest]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- name: ⬇️ Checkout repo
22+
uses: actions/checkout@v4
23+
24+
- name: ⎔ Setup node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
29+
- name: ▶️ Run setup script
30+
run: npm run setup
31+
32+
- name: ʦ TypeScript
33+
run: npm run typecheck
34+
35+
- name: ⬣ ESLint
36+
run: npm run lint
37+
38+
deploy:
39+
name: 🚀 Deploy
40+
runs-on: ubuntu-latest
41+
# only deploy main branch on pushes
42+
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
43+
44+
steps:
45+
- name: ⬇️ Checkout repo
46+
uses: actions/checkout@v4
47+
48+
- name: 🎈 Setup Fly
49+
uses: superfly/flyctl-actions/[email protected]
50+
51+
- name: 🚀 Deploy
52+
run: flyctl deploy --remote-only
53+
working-directory: ./epicshop
54+
env:
55+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
node_modules
2+
3+
workspace/
4+
**/.cache/
5+
**/build/
6+
**/public/build
7+
**/playwright-report
8+
data.db
9+
/playground
10+
**/tsconfig.tsbuildinfo
11+
12+
# in a real app you'd want to not commit the .env
13+
# file as well, but since this is for a workshop
14+
# we're going to keep them around.
15+
# .env

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
legacy-peer-deps=true
2+
registry=https://registry.npmjs.org/

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
**/build/**
3+
**/public/build/**
4+
**/public/babel-standalone.js
5+
.env
6+
**/package-lock.json
7+
**/playwright-report/**

LICENSE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This material is available for private, non-commercial use under the
2+
[GPL version 3](http://www.gnu.org/licenses/gpl-3.0-standalone.html). If you
3+
would like to use this material to conduct your own workshop, please contact us
4+

README.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<div>
2+
<h1 align="center"><a href="https://www.epicweb.dev/workshops">Get Started with React 🏃‍➡️</a></h1>
3+
<strong>
4+
Learn the foundational concepts necessary for building React applications and libraries
5+
</strong>
6+
<p>
7+
Learn everything you need to be effective with the fundamental building blocks of React applications. When you're finished, you'll be prepared to create React components to build excellent experiences for your app's users.
8+
</p>
9+
</div>
10+
11+
<hr />
12+
13+
<div align="center">
14+
<a
15+
alt="Epic Web logo with the words Deployed Version"
16+
href="https://epicweb-dev-get-started-with-react.fly.dev/"
17+
>
18+
<img
19+
width="300px"
20+
src="https://github-production-user-asset-6210df.s3.amazonaws.com/1500684/254000390-447a3559-e7b9-4918-947a-1b326d239771.png"
21+
/>
22+
</a>
23+
</div>
24+
25+
<hr />
26+
27+
<!-- prettier-ignore-start -->
28+
[![Build Status][build-badge]][build]
29+
[![GPL 3.0 License][license-badge]][license]
30+
[![Code of Conduct][coc-badge]][coc]
31+
<!-- prettier-ignore-end -->
32+
33+
## Prerequisites
34+
35+
- Basic understanding of HTML, CSS, JavaScript, and TypeScript
36+
- Install the [React DevTools](https://react.dev/learn/react-developer-tools)
37+
38+
## Pre-workshop Resources
39+
40+
Here are some resources you can read before taking the workshop to get you up to
41+
speed on some of the tools and concepts we'll be covering:
42+
43+
- [JavaScript to Know for React](https://kentcdodds.com/blog/javascript-to-know-for-react)
44+
45+
## System Requirements
46+
47+
- [git][git] v2.18 or greater
48+
- [NodeJS][node] v20 or greater
49+
- [npm][npm] v8 or greater
50+
51+
All of these must be available in your `PATH`. To verify things are set up
52+
properly, you can run this:
53+
54+
```shell
55+
git --version
56+
node --version
57+
npm --version
58+
```
59+
60+
If you have trouble with any of these, learn more about the PATH environment
61+
variable and how to fix it here for [windows][win-path] or
62+
[mac/linux][mac-path].
63+
64+
## Setup
65+
66+
This is a pretty large project (it's actually many apps in one) so it can take
67+
several minutes to get everything set up the first time. Please have a strong
68+
network connection before running the setup and grab a snack.
69+
70+
> **Warning**: This repo is _very_ large. Make sure you have a good internet
71+
> connection before you start the setup process. The instructions below use
72+
> `--depth` to limit the amount you download, but if you have a slow connection,
73+
> or you pay for bandwidth, you may want to find a place with a better
74+
> connection.
75+
76+
Follow these steps to get this set up:
77+
78+
```sh nonumber
79+
git clone --depth 1 https://github.com/epicweb-dev/get-started-with-react.git
80+
cd get-started-with-react
81+
npm run setup
82+
```
83+
84+
If you experience errors here, please open [an issue][issue] with as many
85+
details as you can offer.
86+
87+
## The Workshop App
88+
89+
Learn all about the workshop app on the
90+
[Epic Web Getting Started Guide](https://www.epicweb.dev/get-started).
91+
92+
[![Kent with the workshop app in the background](https://github-production-user-asset-6210df.s3.amazonaws.com/1500684/280407082-0e012138-e01d-45d5-abf2-86ffe5d03c69.png)](https://www.epicweb.dev/get-started)
93+
94+
<!-- prettier-ignore-start -->
95+
[npm]: https://www.npmjs.com/
96+
[node]: https://nodejs.org
97+
[git]: https://git-scm.com/
98+
[build-badge]: https://img.shields.io/github/actions/workflow/status/epicweb-dev/get-started-with-react/validate.yml?branch=main&logo=github&style=flat-square
99+
[build]: https://github.com/epicweb-dev/get-started-with-react/actions?query=workflow%3Avalidate
100+
[license-badge]: https://img.shields.io/badge/license-GPL%203.0%20License-blue.svg?style=flat-square
101+
[license]: https://github.com/epicweb-dev/get-started-with-react/blob/main/LICENSE
102+
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
103+
[coc]: https://kentcdodds.com/conduct
104+
[win-path]: https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
105+
[mac-path]: http://stackoverflow.com/a/24322978/971592
106+
[issue]: https://github.com/epicweb-dev/get-started-with-react/issues/new
107+
<!-- prettier-ignore-end -->

epicshop/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
legacy-peer-deps=true
2+
registry=https://registry.npmjs.org/

epicshop/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM node:20-bookworm-slim as base
2+
3+
RUN apt-get update && apt-get install -y git
4+
5+
ENV EPICSHOP_CONTEXT_CWD="/myapp/workshop-content"
6+
ENV EPICSHOP_DEPLOYED="true"
7+
ENV EPICSHOP_DISABLE_WATCHER="true"
8+
ENV FLY="true"
9+
ENV PORT="8080"
10+
ENV NODE_ENV="production"
11+
12+
WORKDIR /myapp
13+
14+
ADD . .
15+
16+
RUN npm install --omit=dev
17+
18+
CMD node ./setup-swap.js && \
19+
rm -rf ${EPICSHOP_CONTEXT_CWD} && \
20+
git clone https://github.com/epicweb-dev/get-started-with-react ${EPICSHOP_CONTEXT_CWD} && \
21+
cd ${EPICSHOP_CONTEXT_CWD} && \
22+
npx epicshop start

epicshop/fly.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
app = "epicweb-dev-get-started-with-react"
2+
primary_region = "sjc"
3+
kill_signal = "SIGINT"
4+
kill_timeout = 5
5+
processes = [ ]
6+
7+
[experimental]
8+
allowed_public_ports = [ ]
9+
auto_rollback = true
10+
11+
[[services]]
12+
internal_port = 8080
13+
processes = [ "app" ]
14+
protocol = "tcp"
15+
script_checks = [ ]
16+
17+
[services.concurrency]
18+
hard_limit = 100
19+
soft_limit = 80
20+
type = "connections"
21+
22+
[[services.ports]]
23+
handlers = [ "http" ]
24+
port = 80
25+
force_https = true
26+
27+
[[services.ports]]
28+
handlers = [ "tls", "http" ]
29+
port = 443
30+
31+
[[services.tcp_checks]]
32+
grace_period = "1s"
33+
interval = "15s"
34+
restart_limit = 0
35+
timeout = "2s"
36+
37+
[[services.http_checks]]
38+
interval = "10s"
39+
grace_period = "5s"
40+
method = "get"
41+
path = "/"
42+
protocol = "http"
43+
timeout = "2s"
44+
tls_skip_verify = false
45+
headers = { }

0 commit comments

Comments
 (0)