How jawherkl/nodejs-microservices works
Project type and purpose
• This is a Node.js microservices e-commerce system (Order & Inventory)
• Purpose: demonstrate a production-ready, modular architecture with single-responsibility services, event-driven communication, and containerized deployment
File structure
• Monorepo with one folder per microservice plus an API gateway
– api-gateway: NestJS/Express entry point, routing, JWT guard
– user-service, order-service: NestJS services using PostgreSQL (entities, modules, controllers, services)
– product-service, inventory-service, notification-service: ExpressJS services using MongoDB (models, controllers, routes)
– event listeners (order-event-listener, product-event-listener): standalone consumers reading from RabbitMQ
• Shared docker-compose.yml orchestrates all containers (services, databases, message broker)
• Each service has its own Dockerfile, lint/config files, and test suites
• Config files indicate use of TypeScript for NestJS services and JavaScript for ExpressJS services
README for additional insights
• REST between API Gateway and services
• RabbitMQ events connect services (order_created, stock updates, notifications)
• Each service’s tech stack, DB, and responsibilities spelled out