The web's most popular Jamstack front-end template for building web applications with React.
- Optimized for serverless deployment to CDN edge locations (Cloudflare Workers)
- HTML page rendering (SSR) at CDN edge locations, all ~100 points on Lighthouse
- Hot module replacement during local development using React Refetch
- Pre-configured with CSS-in-JS styling using Emotion.js
- Pre-configured with code quality tools: ESLint, Prettier, TypeScript, Vitest, etc.
- Pre-configured with VSCode code snippets and other VSCode settings
- The ongoing design and development is supported by these wonderful companies:
This project was bootstrapped with React Starter Kit. Be sure to join our Discord channel for assistance.
βββ
.github
β GitHub configuration including CI/CD workflows
βββ
.vscode
β VSCode settings including code snippets, recommended extensions etc.
βββ
app
β Web application front-end built with React and Material UI
βββ
edge
β Cloudflare Workers (CDN) edge endpoint
βββ
env
β Application settings, API keys, etc.
βββ
scripts
β Automation scripts such as yarn deploy
βββ
tsconfig.base.json
β The common/shared TypeScript configuration
βββ
tsconfig.json
β The root TypeScript configuration
- React, React Router, Recoil, Emotion, Material UI, Firebase Authentication
- Cloudflare Workers, Vite, Vitest, TypeScript, ESLint, Prettier, Yarn with PnP
- Node.js v18+ with Corepack (
$ corepack enable
) - VS Code editor with recommended extensions
- Optionally React Developer Tools and Reactime browser extensions
Generate a new project
from this template, clone it, install project dependencies, update the
environment variables found in env/*.env
, and start hacking:
$ git clone https://github.com/kriasoft/react-starter-kit.git example
$ cd ./example
$ yarn install
$ yarn start
The app will become available at http://localhost:5173/ (press q
key to exit).
IMPORTANT: Ensure that VSCode is using the workspace version of TypeScript and ESLint.
yarn start
β Launches the app in development mode onhttp://localhost:5173/
yarn build
β Compiles and bundles the app for deploymentyarn lint
β Validate the code using ESLintyarn tsc
β Validate the code using TypeScript compileryarn test
β Run unit tests with Vitest, Supertestyarn edge deploy
β Deploys the app to Cloudflare
Ensure that all the environment variables for the target deployment environment
(test
, prod
) found in /env/*.env
files are up-to-date.
If you haven't done it already, push any secret values you may need to CF Workers
environment by running yarn workspace edge wrangler secret put <NAME> [--env #0]
.
Finally build and deploy the app by running:
$ yarn build
$ yarn deploy [--env #0] [--version #0]
Where --env
argument is the target deployment area, e.g. yarn deploy --env=prod
.
yarn set version latest
β Bump Yarn to the latest versionyarn upgrade-interactive
β Update Node.js modules (dependencies)yarn dlx @yarnpkg/sdks vscode
β Update TypeScript, ESLint, and Prettier settings in VSCode
- GraphQL API and Relay Starter Kit β monorepo template, pre-configured with GraphQL API, React, and Relay
- Cloudflare Workers Starter Kit β TypeScript project template for Cloudflare Workers
- Node.js API Starter Kit β project template, pre-configured with Node.js, GraphQL, and PostgreSQL
Anyone and everyone is welcome to contribute. Start by checking out the list of open issues marked help wanted. However, if you decide to get involved, please take a moment to review the guidelines.
Copyright Β© 2014-present Kriasoft. This source code is licensed under the MIT license found in the LICENSE file.
Made with β₯ by Konstantin Tarkus (@koistya, blog) and contributors.