A minimalist template for starting a new React project.
This template provides a basic React project containing a sample web application written in TypeScript, with built-in support for formatting, linting, testing, and continuous integration.
- Minimal React project written in TypeScript with ESM support.
- Uses pnpm as the package manager.
- Supports formatting with Prettier, linting with ESLint, and testing with Vitest.
- Fixes formatting and linting during pre-commit hooks using Lefthook.
- Preconfigured workflows for Dependabot and GitHub Actions.
- Supports deployment of the web application to GitHub Pages.
This guide explains how to use this template to start a new React project, from creation to deployment.
Follow this link to create a new project based on this template. For more information about creating a repository from a template on GitHub, refer to this documentation.
Alternatively, you can clone this repository locally to begin using this template.
By default, this template is unlicensed. Before modifying this template, it is recommended to replace the LICENSE
file with the license that will be used for the new project. For more information about licensing a repository, refer to this documentation.
Alternatively, you can remove the LICENSE
file or leave it as is to keep the new project unlicensed.
This template uses pnpm as the package manager. If pnpm is not installed, follow this guide to install it. Then, install the project dependencies with:
pnpm install
For more information on pnpm, including how to add dependencies or run tools, refer to this documentation.
Run the development version of the app using:
pnpm dev
While viewing the development version, you can modify the app by updating the source code in the src
directory. You can also modify the index.html
file to update the app’s metadata, such as the title and icon. If you're new to React, refer to this documentation for guidance.
Test files in this template are named *.test.tsx
and typically correspond to the components being tested. This template uses Vitest and Playwright for testing. For more information on testing with Vitest, refer to this documentation.
After writing the tests, run them with:
pnpm test
To deploy the app, first set up your GitHub repository to enable deployment to GitHub Pages using GitHub Actions (see this guide). Then commit your changes and push them to the main
branch. Every change pushed to the main
branch will automatically trigger a CI workflow to deploy the app to GitHub Pages.