Skip to content

A microservices-based task management system with asynchronous communication using RabbitMQ, service decoupling, and MongoDB integration.

Notifications You must be signed in to change notification settings

Harishanan/Microservice-Task-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microservice - Task Management System

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.

📸 Screenshot

Project Demo

🚀 Features

  • 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.

🛠️ Tech Stack

  • Node.js – Backend services
  • Express – REST API framework
  • MongoDB – Database
  • RabbitMQ – Message broker
  • Docker & Docker Compose – Container orchestration
  • AMQP – Messaging protocol

📂 Project Structure

.
├── docker-compose.yml
├── user-service
│   └── Dockerfile
│   └── index.js
│   └── package.json
├── task-service
│   └── Dockerfile
│   └── index.js
│   └── package.json
└── notification-service
    └── Dockerfile
    └── index.js
    └── package.json

⚙️ How It Works

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.

📌 Workflow

User Creation

  • The User Service allows you to create and manage users via REST API endpoints.

Task Creation

  • 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.

Notification Trigger

  • 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.

Asynchronous Communication

  • 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.

🔁 Simple Sequence

User → Task Service → [RabbitMQ Queue] → Notification Service
  1. User creates a task
  2. Task Service sends an event to RabbitMQ
  3. Notification Service consumes the event and logs a notification

🐳 Docker Setup

Prerequisites

  • Docker
  • Docker Compose

Running the Project

docker-compose up --build

This will:

  • Spin up MongoDB, RabbitMQ, User Service, Task Service, and Notification Service.

📬 RabbitMQ Dashboard

Access the RabbitMQ Management UI at:

http://localhost:15672
  • Username: guest
  • Password: guest

📡 API Endpoints

User Service

POST /users
GET /users

Task Service

POST /tasks
GET /tasks

📘 Learning Objectives

  • 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.

🔗 Useful Resources

About

A microservices-based task management system with asynchronous communication using RabbitMQ, service decoupling, and MongoDB integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published