Sample Nestjs Microservices application, based on a simplified Vertical Slice Architecture and best practices using Nestjs and Nodejs.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
While designing architecture of REST API using Nestjs, we need to consider following areas
Areas | Node.js |
---|---|
API Security | Nestjs JwtModule |
API Versioning | Nestjs URL Versioning |
API Validation | Nestjs ValidationPipe |
API Documentation | Nestjs OpenApi |
Using DTOs (Object to Object Mapper) | TypeORM |
CORS Policy | Nestjs CORS |
Health Check | Healthchecks (Terminus) |
Dependency Injection | Built-in DI |
Logging | Nestjs-OpenTelemetry |
ORM | TypeORM |
CQRS pattern | Nestjs CQRS |
JSON Serialization | class-transformer |
Cross-cutting API calls | Nestjs ClientProxy |
Handle Errors Globally | useGlobalFilters |
Keep common code paths fast | Middleware |
Caching | Nestjs Caching |
Data Protection | Nestjs Security |
Avoid blocking calls | Asynchronous providers |
Complete long-running Tasks outside of HTTP requests | Nestjs Schedule |
Here's why:
- Vertical Slice Architecture
- Best practices for Microservices
- Low Code
This section should list any major frameworks/libraries used to bootstrap the project.
Instructions on setting up the project locally.
- Node.js
- npm
npm install npm@latest -g
- yarn
npm install yarn -g
Below is the instructions of how you can install and run the app.
- Clone the repo
git clone https://github.com/imatiqul/nestjs-microservices.git
- Run project
yarn yarn start
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/mf-feature
) - Commit your Changes (
git commit -m 'Add some mf-feature'
) - Push to the Branch (
git push origin feature/mf-feature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
ATIQUL ISLAM - @ATIQ - [email protected]
Project Link: https://github.com/imatiqul/nestjs-microservices