MER(A)N is a FullStack opinionated monorepo webapp boilerplate based on the MERN stack with Apollo GraphQL.
Made withTech Stack
Core Dev
-
Lerna — JavaScript monorepo project manager
-
Husky, lint-staged — Git hooks to run linters against staged git files
Server
- Node.js
- Express
- GraphQL with Apollo Server Express
- MongoDB with Mongoose
- Express Session
- Body Parser
- NodeMailer
- Helmet
- Bcrypt.js
- Morgan
- Joi
- Chalk
Client
- React
- React Router
- Redux
- Redux Thunk
- Webpack
- Babel
- GraphQL with Apollo Client (Boost)
- Less
- Ant Design
- Formik
- Yup
- Jest with 100% test coverage
- i18n
- Normalizr
- React 16.8 Hooks
Getting Started
Prerequisites
- MongoDB or MongoDB Atlas
- Node.js 10.0+
- Code Editor — Visual Studio Code (preferred) + ESLint and Prettier plug-ins.
- Command Line Tools
Note: If you are new to Node, Express, Mongo, React or GraphQL you may find Build a Complete App with GraphQL, Node.js, MongoDB and React.js from @maxedapps helpful for learning everything you need to know.
Installing
The easiest way is to clone the repository and run npm run install:all
:
# Get the latest version
git clone https://github.com/IgorMCesar/react-node-boilerplate.git myproject
# Change current directory to the newly created one
cd myproject
# Install NPM dependencies of all packages(core, server and client)
npm run install:all
Now lets set the environment variables. Open .env.example
and use it to create your own .env
file and set your variables.
Note: If you are using mongo server locally MONGO_DB_URI
should look something like this mongodb://localhost:27017/test
Running React Node Boilerplate
Development
To run MERN(A) using development configs run:
npm run dev
Production
// TODO
Deployment
// TODO
Note: Make sure you didn't forget any sensitive information in your code, remeber to always use .env
file for that!
License
This project is licensed under the MIT license, Copyright © 2019 Igor Cesar. For more information see LICENSE.