How mguay22/nestjs-rabbitmq-microservices works
Project Type and Purpose
• This is a NestJS-based microservices monorepo.
• It implements three domain services—Auth, Orders, and Billing—plus a shared library (libs/common) for cross-cutting concerns (database access, RabbitMQ integration, authentication guards).
• Services are containerized via Docker, orchestrated with docker-compose, and communicate via HTTP and RabbitMQ.
File-Structure Analysis
• Top-level “apps/” directory holds three services:
• apps/auth
• apps/orders
• apps/billing
• Each service has its own Dockerfile, .env, src/ modules, and e2e tests.
• “libs/common” contains shared Nest modules: database (abstract.repository, schema, DatabaseModule), RMQ (rmq.module, rmq.service), and auth guards/strategies.
• Root holds docker-compose.yml (to spin up RabbitMQ, MongoDBs, and service containers), Nest CLI config, tsconfig files, lint/prettier configs.
Detail
• How guards and strategies from libs/common plug into service modules.
• If the compose file spins up multiple MongoDBs or a replica set, reflect that.
• If there’s an API gateway or ingress layer, include it.