A boilerplate with less configuration and more code. The intention of creating this boilerplate is to give a quick start in developing a react-node application with basic required dev utility and setup.
React App
- React hooks ✅ ❣️
- PWA ✅
- Redux setup with the utility to reducer boilerplate code of actions and reducers
- Socket.Io ✅
- Multi-Language ✅
- Template Setup ✅
- Working auth module with mobile sign-in/signup ✅
- Form validation ✅
NodeJs App
- REST APIs ✅
- MySql handling with ORM ✅
- Socket Implementation ✅
- Form validation ✅
- Working auth module with mobile sign-in/signup ✅
- Sms API ✅
Setup feature
- Feature-based folder structure ✅
- Simple and consistent naming convention ✅
- No
../../../
✅
React APP demo: https://anandsingh1606.github.io
- Install NodeJs (10 or above), npm (5 or above), MySql (8 or above)
- Clone repo
git clone https://github.com/anandGithub01/react-node-boilerplate.git
- Go to project folder
cd react-node-boilerplate
- Install dependencies
npm install
- Rename you
/server/.env.example
to/server/.env
- Set up SMS API, Get free trial Twilio account(https://www.twilio.com/docs/sms/quickstart/node) and update the key in
.env
file or if you want to skip this, for now, makeSMS_API=false
in.env
file. - Create a new database in MySql, Update your database credentials in
.env
file. - Create database tables,
npm run setup-db
npm start
And we are ready, Now your react app will be running on 8001
and NodeJs server will be running on 8000
.
-
Make sure you update
eslint.nodePath
with local eslint installed path, somthing like this"eslint.nodePath": "/<path-to-folder>/react-node-boilerplate/node_modules/eslint"
-
Check in any file, It should work fine.
I will create a detail document for this, but for now please refer auth module of client and server. Loader, API error handling in the client, App-level error handling in react app, and many other things are already in place.