NestJS Microservice Project with RabbitMQ Integration
this project is consist of three microservices ,Gateway ,Users and Mailer
they communicate each other throug rabbitMq .
there is also lib folder that contains common modules .
client request is recived by gateway and after validation, it is sent to related microservice and then result will be sent back .
This project has been designed with scalability in mind, allowing for easy addition of new services and the ability to handle large volumes of traffic. It also offers flexibility in deployment options, with the ability to deploy each service separately or together as a single unit.
If you are looking for a robust, scalable, and flexible microservice architecture for your API service, this project is the perfect solution.
clean architecture is used for this project
it is consist of three main layer ; Domain , Usecase and Infrastucture .
accroding to clean architecture rules domain layer should not depend on any thing .
and also usecase layer can just depend on domain layer
Infrastructure layer is where controller and other services are there .
post: localhost:3001/api/users
get: localhost:3001/api/user/:id
get : localhost:3000/api/user/:id/avatar
delete : localhost:3000/api/user/:id/avatar
$ npm install
$ npm run start gateway
then in new terminal
$ npm run start users
then in new terminal
$ npm run start mailer
# unit tests
$ npm run test