New Project Guidelines
This is a boilerplate repository for creating a new Docker project using Node, NestJS, React, Mongo, Material-UI along with quick start commands (check Makefile/ReadMe).
Best practices have been used and implemented to my knowledge to ensure the longevity of this project. For example a multi-database architecture is being used to distribute the load to the databases. Encourage pull requests for improving the workflow and processes + maintenance updates.
This project includes the bare minimum for authentication and authorization e.g: a user is able to create an account and sign-in (with password hashing, form validation on front-end).
Step debugging through VS Code is enabled and launch.json provided (see below).
Dependancies
The following dependancies have been added to improve developer workflow and build the application.
- Docker Docker is a containerization software.
- MongoDB MongoDB database.
- Nest.js Nest (NestJS) is a framework for building efficient, scalable Node.js server-side applications.
- React JS Core front-end technology
- Material UI Component library
Getting started
Clone the repository, change all references to {PROJECT_NAME} in all files (do find and replace), also ensure project name matches the root directory name Eg: docker-compose.yml, Makefile, .env files (client/app) etc..
git clone https://github.com/jaybabak/docker-nestjs-mongodb-react-typescript-starter-kit
Update .env files for both client and app.
Change directory.
cd /app
Install Nest.js CLI globally
npm i -g @nestjs/cli
Build back-end Docker containers (server, db etc..)
Run the following command to install the dependancies, make sure to be inside the "app" directory.
npm install
Run the following command to build the containers and start the development environment, make sure to be inside the "app" directory.
make up
Run the container and Nest.js development environment in quiet/silent mode (not recommended for local development, this hides the console output).
make up-silent
Build the React front-end (client)