Implementing a simplified distributed e-commerce system with two microservices: Order Service and Billing Service, which communicate asynchronously via RabbitMQ.
- Microservices:
Order Service: Handles the order lifecycleInvoice Service: Allows sellers to upload and send PDF invoices.
- Asynchronous communication: RabbitMQ
- Database: MongoDB
- API: RESTful
- Framework Nest.js
- Testing Vitest
- Mutant testing Stryker
- Code quality Prettier & ESLint
- Hexagonal architecture
- DDD (Tactical patterns)
- CQS (Command and query separation)
Outside-in TDD.
- Node.js
- Docker & Docker Compose
- MongoDB Compass (optional, for DB inspection)
- Pnpm
Copy .env.dist and create a .env file at the root to have the correct environment variables.
cp .env.dist .envTo spin up all services:
docker-compose upThis will start:
Order Service on http://localhost:4000/api
Invoice Service on http://localhost:5000
RabbitMQ management on http://localhost:15672 (default login: app/rabbit_app)
Code formatting check
pnpm format-code-checkLinter check
pnpm linter-checkRun unit tests
pnpm test:unitRun mutants
pnpm test:mutant