React Starter Kit — front-end starter kit using React, Relay, GraphQL, and JAM stack architecture
.github— GitHub configuration including CI/CD workflows
.vscode— VSCode settings including code snippets, recommended extensions etc.
common— common (shared) React components
core— core modules and utility functions
dialogs— React components implementing modal dialogs
fragments— common (shared) Relay fragments
hooks— React hooks such as
icons— custom icon React components
menu— React components implementing popup menus
public— static assets such as robots.txt, index.html etc.
routes— application routes and page (screen) components
scripts— automation scripts such as
theme— application theme - colors, fonts, paddings, etc.
workers— Cloudflare Worker scripts (reverse proxy, SSR)
config— client-side application settings per environment
index.ts— application entry point
git clone -o seed -b main --single-branch https://github.com/kriasoft/react-starter-kit.git
yarn start, it will become available at http://localhost:3000
IMPORTANT: Ensure that VSCode is using the workspace versions of TypeScript and ESLint.
yarn start— Launches the app in development mode on
yarn update-schema— Update GraphQL API schema by running an introspection query
yarn relay— Updates GraphQL fragments used in the code
yarn build— Compiles and bundles the app for deployment
yarn lint— Validate code using ESLint
yarn tsc— Validate code using TypeScript compiler
yarn test— Run unit tests with Jest, Supertest
yarn deploy— Deploys the app to Cloudflare
Ensure that client-side application settings for
prod(production) environments are up-to-date found in the
config.tsfile, as well as Cloudflare account credentials found in the
# Cloudflare # https://dash.cloudflare.com/ # https://developers.cloudflare.com/api/tokens/create CLOUDFLARE_ACCOUNT_ID= CLOUDFLARE_ZONE_ID= CLOUDFLARE_API_TOKEN=
Compile and deploy the app by running:
$ yarn build $ yarn deploy [--env #0]
--envargument is the target environment, e.g.
yarn deploy --env=prod.
yarn set version latest— Bump Yarn to the latest version
yarn upgrade-interactive— Update Node.js modules (dependencies)
yarn pnpify --sdk vscode— Update TypeScript, ESLint, and Prettier settings in VSCode
Copyright © 2014-present Kriasoft. This source code is licensed under the MIT license found in the LICENSE file.