This is a project template which uses and already has the following packages configured:
- Redux Toolkit
- react-router-dom v6
- RTK-query
- MUI5
- Formik
- Yup
- Redux-persist
- redux-persist-transform-encrypt
- camelcase-keys
- snakecase-keys
This projects also uses a middleware on RTK-query to connect a React application with a snake case python backend.
git clone https://github.com/kabirivan/React-App-Template
Node >= 12
Create an .env.development and .env.production files on root folder and copy the content from .env.example. Feel free to change it according to your own configuration for development and production.
On the root folder run:
yarn install
In this mode the app reads and uses the .env.development environment variables Open http://localhost:3000 to view it in the browser.
yarn start:development
In this mode the app reads and uses the .env.production environment variables Open http://localhost:3000 to view it in the browser.
yarn start:production
yarn test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
In order to run more sophisticated static analysis, you can follow the instructions on this post for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed! It uses .env.production credentials
yarn build
See the section about deployment for more information.
You can edit the workflow on .github/workflows/main.yml
The following secrets should be configured on github. It uses borales/actions-yarn@v2.3.0, w9jds/firebase-action@master and act10ns/slack@v1.
REACT_APP_BACKEND_ENDPOINT
REACT_APP_ENCRYPT_STORAGE
REACT_APP_REDUX_SECRET_KEY
REACT_APP_JWT_SECRET
PORT
SLACK_WEBHOOK_URL
FIREBASE_TOKEN
You can check here how to configure secrets on github account
- Add redux toolkit setup
- Add encrypt storage
- Add JWT authentication
- Add RTK-Query for data fetching
- camelcase-keys and snakecase-keys middlewares
- Add Redux persist with encryption for storage
- Add Formik form example
- Add MUI5
- Add eslint
- Add sonarqube for static code analysis
- Github action for CI/CD on firebase
- Add a moment example
- Add a Formik example with Yup
PR are welcome ❤️
- This project is licensed under the terms of the MIT license