This repository demonstrates best practices in full-stack development using Docker, Node, NestJS, React, and Mongo with Material-UI. It features a multi-database architecture for efficient load distribution and encourages contributions for workflow and maintenance enhancements.
- Authentication and authorization with password hashing.
- Form validation on the front-end.
- Step debugging in VS Code.
- Docker: For containerization.
- MongoDB: NoSQL database.
- Nest.js: Efficient, scalable server-side applications.
- React JS: Front-end development.
- Material UI: UI component library.
- Clone the repository.
- Replace all
{PROJECT_NAME}
placeholders in files includingdocker-compose.yml
,Makefile
, and.env
files. - Ensure the project name matches the root directory name.
- Update
.env
files in both client and app directories.
- Navigate to the
/app
directory. - Install Nest.js CLI globally:
yarn add -g @nestjs/cli
- Install dependencies:
yarn
- Build and start the back-end Docker containers:
make up
- For a quiet mode (suppresses console output):
make up-silent
- Open a new terminal and go to the
/client
directory. - Install dependencies:
yarn
- Build and start the front-end environment:
make up
- Retrieve MongoDB connection strings:
- Outside Docker: Run
make db
in the/app
directory. - Inside Docker: Use the URL provided in the documentation.
- Outside Docker: Run
- Backend: http://localhost:3002
- Frontend: http://localhost:3000
- Update
/etc/hosts
for custom development domains, e.g.,localhost:3000 my-site.dev
.
- Launch.json configuration is provided for debugging NestJS in Docker.
Command | Description |
---|---|
help |
Lists available commands. |
up |
Builds and starts the app with logging. |
build |
Rebuilds the app container. |
up-silent |
Starts the app in the background. |
down |
Stops and removes containers. |
stop |
Stops running containers. |
shell |
Accesses the main app container. |
shell-db |
Accesses the MongoDB container. |
db |
Retrieves MongoDB connection string. |
- coming soon.