This is a professional Front-end boilerplate for building fast, robust, and adaptable web applications.
It's developed with some specific development philosophy but, you're free to architect your code in the way that you want.
- Boilerplate fully typed with
TypeScript
- Configured with
Vite
. Vite pre-bundles dependencies using esbuild. Esbuild is written in Go and pre-bundles dependencies 10-100x faster than other JavaScript-based bundlers. Learn more about vite - Configured with
Ant Design
- Less, Scss, CSS & styled-components can be used if needed
- It has the translation & styled-components default theme with typed configuration
- Configured with
React Router V6
which has more optimised features than the previous version - Has access control features
- It has a fallback UI for internal server errors & unauthorised
- Decouple the UI from the business logic and API calls (make it a pure library)
- Added
React Query
for fetching data from the server
Command | Description |
---|---|
yarn dev | Run the app in development mode |
yarn build | Build the app for production |
yarn start | Start the app in production mode |
yarn lint | Run ESLint |
yarn format | Run Prettier |
- You'll need to have Node >= 14.18.1 and npm >= 6.14.15 on your machine.
- Clone this repo using
git clone --depth=1 https://github.com/sonjoydatta/react-boilerplate.git <YOUR_PROJECT_NAME>
- Enter to the project directory:
cd <YOUR_PROJECT_NAME>
- Run
yarn or npm install
in order to install dependencies. - At this point you can run
yarn dev or npm dev
to see the app athttp://localhost:3000
- You may need to a
.env
file. For development.env.development
Now you are ready to buzz!
.env
VITE_BACKEND_API_URL=https://reqres.in/api
.env.development
VITE_BACKEND_API_URL=https://example.com/api
- TypeScript
- React
- Redux
- Redux Toolkit
- React Query
- Ant Design
- Styled Components
- React Router V6
- i18next
The code is available under the MIT license.