A microservices-based Task Management System built with Node.js, Express, MongoDB, and RabbitMQ. This project demonstrates asynchronous communication, service decoupling, and containerized deployment using Docker Compose. It’s ideal for understanding the core principles of building distributed, scalable systems.
- ✅ Microservices Architecture – Independent services for users, tasks, and notifications.
- ✅ Asynchronous Messaging – RabbitMQ used as a message broker for decoupled communication.
- ✅ MongoDB Integration – Persistent storage for users and tasks.
- ✅ Dockerized Setup – All services containerized and orchestrated using Docker Compose.
- ✅ RabbitMQ Management UI – Easily monitor queues and messages via a web dashboard.
- ✅ Scalable and Fault-Tolerant Design – Services are loosely coupled and can scale independently.
- Node.js – Backend services
- Express – REST API framework
- MongoDB – Database
- RabbitMQ – Message broker
- Docker & Docker Compose – Container orchestration
- AMQP – Messaging protocol
.
├── docker-compose.yml
├── user-service
│ └── Dockerfile
│ └── index.js
│ └── package.json
├── task-service
│ └── Dockerfile
│ └── index.js
│ └── package.json
└── notification-service
└── Dockerfile
└── index.js
└── package.json
This project is a microservices-based task management system where each service has a specific responsibility and communicates through a message broker (RabbitMQ) to achieve asynchronous, event-driven behavior.
- The User Service allows you to create and manage users via REST API endpoints.
- The Task Service enables you to create tasks. When a new task is created, the service publishes an event to RabbitMQ indicating that a new task has been added.
- The Notification Service listens to the RabbitMQ queue for new task events. When it receives a message, it logs a notification indicating a new task has been created. This decouples the notification logic from the task management process.
- RabbitMQ acts as a message broker, allowing services to communicate without depending on each other's availability. This improves scalability, fault tolerance, and loose coupling.
User → Task Service → [RabbitMQ Queue] → Notification Service
- User creates a task
- Task Service sends an event to RabbitMQ
- Notification Service consumes the event and logs a notification
- Docker
- Docker Compose
docker-compose up --build
This will:
- Spin up MongoDB, RabbitMQ, User Service, Task Service, and Notification Service.
Access the RabbitMQ Management UI at:
http://localhost:15672
- Username: guest
- Password: guest
POST /users
GET /users
POST /tasks
GET /tasks
- Understand asynchronous communication using message brokers.
- Learn how to decouple services in a microservices system.
- Build containerized applications using Docker and Docker Compose.
- Manage service-to-service communication using RabbitMQ queues.