Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Ajith66310/task-manager-full/llms.txt

Use this file to discover all available pages before exploring further.

TaskFlow separates concerns across independently deployable services, each running in its own Docker container. All client traffic enters through a single API Gateway, which routes requests to the appropriate backend. The two frontend applications — one for end users, one for administrators — are served by Nginx and communicate exclusively through the gateway, never directly with individual backend services.

Services overview

API Gateway

Runs on port 5000. The single entrypoint for all client requests. Uses http-proxy-middleware to route incoming paths to the correct backend service. Handles CORS and request logging.

User Service

Runs on port 5001. Manages user registration, JWT authentication, admin account operations, and user profile data. Connected exclusively to the mongo-user database.

Task Service

Runs on port 5002. Handles the full task lifecycle — create, read, update, delete — for both users and administrators. Connected exclusively to the mongo-task database.

Notification Service

Runs on port 5003. Sends automated email alerts via the EmailJS API when task status changes. Stateless — it holds no database connection.

mongo-user

Isolated MongoDB container for the user service. Exposed on host port 27018 and accessible within the Docker network at mongo-user:27017. Data is persisted in the mongo_user_data named volume.

mongo-task

Isolated MongoDB container for the task service. Exposed on host port 27019 and accessible within the Docker network at mongo-task:27017. Data is persisted in the mongo_task_data named volume.

API Gateway routing

The API Gateway (api-gateway/server.js) uses Express and http-proxy-middleware to forward requests based on path prefix. The routing table is:
Incoming pathForwarded toService
/api/authhttp://user-service:5001/api/authUser Service
/api/usershttp://user-service:5001/api/usersUser Service
/api/admin/taskshttp://task-service:5002/api/admin/tasksTask Service
/api/adminhttp://user-service:5001/api/adminUser Service
/api/taskshttp://task-service:5002/api/tasksTask Service
Route order matters: /api/admin/tasks is registered before /api/admin so that admin task requests are not incorrectly captured by the broader admin proxy rule.

Frontend applications

Both frontends are React applications built with Vite and served in production by Nginx inside their containers:
  • User Frontend (task-manager-user-frontend) — served on port 5173. End users log in, manage their own tasks, and track progress.
  • Admin Frontend (task-manager-frontend) — served on port 3000. Administrators verify users, assign tasks, and monitor the full task list.
Each frontend container includes an nginx.conf that proxies API calls to the gateway at http://localhost:5000/api. Neither frontend communicates directly with any backend service.

Data isolation

Each backend service that requires persistence is paired with its own dedicated MongoDB instance:
  • user-servicemongo-user → database TaskManagerUser
  • task-servicemongo-task → database TaskManagerTask
This prevents schema conflicts and allows each service to evolve its data model independently. There is no shared database or cross-service database access.

Service startup order

Docker Compose enforces startup dependencies via depends_on. The task service depends on both the user service and the notification service — it will not start until both are running. The API Gateway waits for the user service and task service. Both frontend containers wait for the API Gateway.The full startup chain is: mongo-user and mongo-taskuser-service and notification-servicetask-serviceapi-gatewayadmin-frontend and user-frontend.

Container summary

ContainerImageExposed portDepends on
task_manager_mongo_usermongo:latest27018
task_manager_mongo_taskmongo:latest27019
task_manager_user_serviceCustom buildmongo-user
task_manager_notification_serviceCustom build
task_manager_task_serviceCustom buildmongo-task, user-service, notification-service
task_manager_api_gatewayCustom build5000user-service, task-service
task_manager_admin_frontendCustom build3000api-gateway
task_manager_user_frontendCustom build5173api-gateway

Build docs developers (and LLMs) love