Skip to content

janedoe2026/cloud_native_task_manager

Β 
Β 

Repository files navigation

Cloud_Native_Task_Manager - Microservices Architecture (v2.0.0)

🎯 Overview

A production-ready cloud-native microservices task management platform built with Spring Boot 3.2, Spring Cloud, PostgreSQL, and Next.js 14.

Project: Cloud_Native_Task_Manager
Version: 2.0.0 (Microservices)
Status: Production-Ready

Key Technologies

  • Backend: Spring Boot 3.2, Spring Cloud, Java 21, 6 independent microservices
  • Microservices: Auth, Task, User, API Gateway, Service Discovery (Eureka), Common Library
  • Databases: 3 separate PostgreSQL instances (auth_db, task_db, user_db)
  • Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS
  • DevOps: Docker, Docker Compose, Kubernetes, Kustomize
  • CI/CD: GitHub Actions (automated testing, building, security scanning)

πŸ“‹ Quick Start (3 Minutes)

# Clone repository
git clone https://github.com/your-username/Cloud_Native_Task_Manager.git
cd Cloud_Native_Task_Manager

# Start all microservices
docker compose up --build

# Access services
# Frontend:       http://localhost:3000
# API Gateway:    http://localhost:8080/api
# Eureka:         http://localhost:8761
# Swagger UI:     http://localhost:8080/api/swagger-ui.html

Default Credentials:

  • Username: admin
  • Password: admin123

Local Run Script (Recommended for Daily Development)

Use the helper script run-local.sh from the project root:

# Show available modes
./run-local.sh help

# Start backend stack (Docker Compose)
./run-local.sh backend

# Start frontend dev server only
./run-local.sh frontend

# Start backend (detached) + frontend (foreground)
./run-local.sh all

# Follow backend logs
./run-local.sh logs

# Stop backend stack
./run-local.sh stop

For frontend-only development, npm run dev in frontend/ still works as usual.


πŸ“ Project Structure

Cloud_Native_Task_Manager/
β”œβ”€β”€ πŸ—οΈ Microservices (6 independent services)
β”‚   β”œβ”€β”€ service-discovery/          # Eureka Server (port 8761)
β”‚   β”œβ”€β”€ api-gateway/                # Spring Cloud Gateway (port 8080)
β”‚   β”œβ”€β”€ auth-service/               # Authentication service (port 8081)
β”‚   β”œβ”€β”€ task-service/               # Task management service (port 8082)
β”‚   β”œβ”€β”€ user-service/               # User admin service (port 8083)
β”‚   └── common/                     # Shared DTOs & exceptions
β”‚
β”œβ”€β”€ πŸ–ΌοΈ Frontend
β”‚   └── frontend/                   # Next.js 14 application (port 3000)
β”‚
β”œβ”€β”€ 🐳 Containerization
β”‚   β”œβ”€β”€ docker-compose.yml          # Multi-service orchestration
β”‚   β”œβ”€β”€ pom.xml                     # Parent POM (multi-module Maven)
β”‚   └── .env.example                # Environment variables template
β”‚
β”œβ”€β”€ ☸️ Kubernetes
β”‚   β”œβ”€β”€ k8s/namespace.yaml
β”‚   β”œβ”€β”€ k8s/secret.yaml
β”‚   β”œβ”€β”€ k8s/service-discovery.yaml  # Eureka deployment
β”‚   β”œβ”€β”€ k8s/postgres.yaml           # 3x PostgreSQL databases
β”‚   β”œβ”€β”€ k8s/backend.yaml            # All microservices
β”‚   β”œβ”€β”€ k8s/frontend.yaml
β”‚   β”œβ”€β”€ k8s/ingress.yaml
β”‚   └── k8s/kustomization.yaml
β”‚
β”œβ”€β”€ πŸ“š Documentation
β”‚   β”œβ”€β”€ docs/README.md              # Documentation index
β”‚   β”œβ”€β”€ docs/architecture/          # System design & patterns
β”‚   β”œβ”€β”€ docs/deployment/            # Setup & deployment guides
β”‚   β”œβ”€β”€ docs/guides/                # Quick start & reference
β”‚   β”œβ”€β”€ docs/migration/             # v1.0.0 β†’ v2.0.0 migration
β”‚   β”œβ”€β”€ docs/cleanup/               # Legacy file cleanup
β”‚   β”œβ”€β”€ docs/api/                   # API documentation
β”‚   └── docs/reference/             # Configuration & schema
β”‚
β”œβ”€β”€ πŸ”„ CI/CD
β”‚   └── .github/workflows/          # GitHub Actions pipelines
β”‚
└── πŸ“– Main Documentation
    β”œβ”€β”€ README.md                   # This file
    β”œβ”€β”€ MICROSERVICES_README.md     # Complete microservices guide
    β”œβ”€β”€ ARCHITECTURE.md             # System architecture & design
    β”œβ”€β”€ DEPLOYMENT_GUIDE.md         # Deployment instructions
    β”œβ”€β”€ MIGRATION_SUMMARY.md        # v1β†’v2 migration info
    β”œβ”€β”€ QUICK_REFERENCE.md          # Quick command reference
    β”œβ”€β”€ CHANGES.md                  # Detailed change list
    └── CLEANUP_GUIDE.md            # Legacy cleanup procedures

✨ Key Features

πŸ—οΈ Microservices Architecture

  • βœ… 6 Independent Microservices β€” Auth, Task, User, API Gateway, Service Discovery, Common Library
  • βœ… Service Discovery β€” Eureka server for dynamic service registration & health monitoring
  • βœ… API Gateway β€” Spring Cloud Gateway routes all requests transparently
  • βœ… Independent Scaling β€” Scale each service independently based on load
  • βœ… Loose Coupling β€” Services communicate via REST APIs & JWT tokens, not direct calls
  • βœ… Data Isolation β€” 3 separate PostgreSQL databases prevent cross-service coupling

πŸ” Authentication & Security

  • βœ… JWT Authentication β€” Register, login, token-based access
  • βœ… BCrypt Password Hashing β€” Secure password storage
  • βœ… Role-Based Access Control β€” ADMIN sees all tasks; USER manages own tasks
  • βœ… Local Token Validation β€” Each service validates JWT independently
  • βœ… Claim-Based Authorization β€” Extract userId, role from token claims

πŸ“ Task Management

  • βœ… Full CRUD Operations β€” Create, read, update, delete tasks with ownership validation
  • βœ… Quick Status Toggle β€” Move tasks through TODO β†’ IN_PROGRESS β†’ DONE in one click
  • βœ… Filtering β€” Filter by status and priority
  • βœ… Pagination β€” Server-side pagination with configurable page size
  • βœ… Sorting β€” Sort by created date, due date, or priority (asc/desc)
  • βœ… Admin Visibility β€” Admins see all tasks; users see only their own

πŸš€ Deployment & DevOps

  • βœ… Docker Compose β€” One-command start for local development (10 containers)
  • βœ… Kubernetes Ready β€” Complete K8s manifests with Kustomize
  • βœ… Multi-Environment β€” Configuration for local, staging, production
  • βœ… Health Checks β€” Built-in endpoint monitoring & automatic service discovery
  • βœ… Zero Downtime β€” Rolling updates & graceful shutdown support

πŸ“š Documentation

  • βœ… 4,500+ Lines β€” Comprehensive documentation across 7 organized folders
  • βœ… Role-Based Guides β€” Separate paths for developers, DevOps, architects, QA
  • βœ… API Documentation β€” Complete endpoints, examples, error codes
  • βœ… Architecture Guide β€” Design decisions, patterns, trade-offs
  • βœ… Deployment Guide β€” Docker Compose, Kubernetes, cloud platforms

πŸ“Š Monitoring & Observability

  • βœ… Eureka Dashboard β€” Service registry visualization & health status
  • βœ… Actuator Endpoints β€” /actuator/health, /actuator/metrics on all services
  • βœ… Request Logging β€” Built-in request/response logging
  • βœ… Error Handling β€” Consistent JSON error responses across all services
  • βœ… Swagger UI β€” Interactive API documentation

♾️ CI/CD & GitHub Actions

  • βœ… Automated Build & Test β€” On every push & pull request
  • βœ… Security Scanning β€” CodeQL analysis for Java & JavaScript
  • βœ… Docker Image Push β€” Automatic push to Docker Hub on release
  • βœ… Dependency Management β€” Automated dependency updates via Dependabot
  • βœ… Release Automation β€” GitHub Releases with artifacts & documentation

πŸ”„ 100% Backward Compatible

  • βœ… Zero Breaking Changes β€” Same API endpoints as v1.0.0
  • βœ… Frontend Compatible β€” Frontend requires zero code changes
  • βœ… Request Format β€” Unchanged request/response structure
  • βœ… Easy Migration β€” Transparent upgrade path from monolith

🎯 Service Architecture

Microservices Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€οΏ½οΏ½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Frontend (Next.js)                     β”‚
β”‚                  http://localhost:3000                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ HTTP/REST
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              API Gateway (Spring Cloud)                  β”‚
β”‚                  http://localhost:8080                   β”‚
β”‚  Routes: /api/auth/* β†’ :8081, /api/tasks/* β†’ :8082     β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚ Discovery   β”‚ Discovery        β”‚ Discovery
     β–Ό             β–Ό                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Auth Service β”‚ β”‚ Task Service β”‚ β”‚ User Service β”‚
β”‚  :8081       β”‚ β”‚  :8082       β”‚ β”‚  :8083       β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                β”‚                β”‚ 
       β–Ό                β–Ό                β–Ό
    β”Œβ”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”
    β”‚authβ”‚           β”‚taskβ”‚           β”‚userβ”‚
    β”‚ db β”‚           β”‚ db β”‚           β”‚ db β”‚
    β”‚:543β”‚           β”‚:543β”‚           β”‚:543β”‚
    β”‚ 2 β”‚           β”‚ 3  β”‚           β”‚ 4  β”‚
    β””β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”˜

           SERVICE DISCOVERY (Eureka)
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚   localhost:8761            β”‚
         β”‚ Service Registry + Health   β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Service Details

Service Port Database Purpose
Service Discovery 8761 - Eureka server, dynamic service registry
API Gateway 8080 - Routes requests to microservices
Auth Service 8081 auth_db:5432 User authentication & JWT generation
Task Service 8082 task_db:5433 Task CRUD & management
User Service 8083 user_db:5434 User admin operations (RBAC)
Frontend 3000 - Next.js React application

πŸ“‘ API Endpoints

All endpoints are accessed through the API Gateway at http://localhost:8080/api

Authentication (No Auth Required)

POST   /api/auth/register    - Register new user
POST   /api/auth/login       - Login & get JWT token

Tasks (Requires Authorization)

GET    /api/tasks                    - List user's tasks
POST   /api/tasks                    - Create new task
GET    /api/tasks/{id}               - Get task by ID
PUT    /api/tasks/{id}               - Update task
PATCH  /api/tasks/{id}/status        - Update task status only
DELETE /api/tasks/{id}               - Delete task

Users (Admin Only)

GET    /api/users                    - List all users
GET    /api/users/{id}               - Get user details

Full API Documentation: docs/api/API_REFERENCE.md
Interactive Swagger: http://localhost:8080/api/swagger-ui.html


πŸ—‚οΈ Database Design

Three Separate Databases (Microservices Pattern)

auth_db (Port 5432) - Auth Service

users (id, username, email, password_hash, role, created_at)

task_db (Port 5433) - Task Service

tasks (id, title, description, status, priority, due_date, owner_id, created_at, updated_at)

user_db (Port 5434) - User Service

users (id, username, email, role, created_at)

Benefits:

  • Independent scaling per service
  • Each service owns its data model
  • Eliminates cross-service database dependencies
  • Easier backup & recovery strategies

Full Schema Reference: docs/reference/DATABASE_SCHEMA.md


πŸš€ Deployment

Option 1: Docker Compose (Recommended - 3 minutes)

# Navigate to project
cd cloud_native_task_manager

# Start all services
docker compose up --build

# Services available at:
#   Frontend:       http://localhost:3000
#   API Gateway:    http://localhost:8080/api
#   Eureka:         http://localhost:8761
#   Swagger UI:     http://localhost:8080/api/swagger-ui.html

# Stop services
docker compose down

# Remove all data
docker compose down -v

Option 2: Kubernetes (Production - 10+ minutes)

# Build Docker images
docker compose build

# Push to Docker Hub (optional)
docker tag task-management-platform/auth-service:latest your-registry/auth-service:latest
docker push your-registry/auth-service:latest
# ... repeat for other services

# Deploy to Kubernetes
kubectl apply -k k8s/

# Verify deployment
kubectl get pods -n task-management
kubectl get svc -n task-management

# Access services via port-forward
kubectl port-forward -n task-management svc/api-gateway 8080:8080
kubectl port-forward -n task-management svc/frontend 3000:3000

Option 3: Cloud Deployment (AWS, GCP, DigitalOcean)

See DEPLOYMENT_GUIDE.md for:

  • AWS ECS / Fargate
  • Google Cloud Run
  • DigitalOcean Kubernetes
  • Azure AKS
  • Other cloud platforms

πŸ”§ Configuration

Environment Variables

Create .env.local from .env.example:

# Copy template
cp .env.example .env.local

# Edit with your values
nano .env.local

Key Variables:

# Database
SPRING_DATASOURCE_USERNAME=taskuser
SPRING_DATASOURCE_PASSWORD=taskpassword

# JWT
JWT_SECRET=<base64-encoded-secret>
JWT_EXPIRATION=86400000

# Admin Account
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin123

# Frontend
NEXT_PUBLIC_API_URL=http://localhost:8080/api

Complete Reference: docs/reference/CONFIGURATION_REFERENCE.md


πŸ“š Documentation

Start with the appropriate guide for your role:

πŸ‘¨β€πŸ’» For Developers

  1. MICROSERVICES_README.md - Complete guide (655 lines)
  2. QUICK_REFERENCE.md - Quick commands & API examples
  3. docs/guides/GETTING_STARTED.md - First steps

πŸ—οΈ For Architects

  1. ARCHITECTURE.md - System design & patterns (500+ lines)
  2. docs/architecture/ARCHITECTURE.md - Deep design dive
  3. DEPLOYMENT_GUIDE.md - Deployment options

πŸ”§ For DevOps

  1. DEPLOYMENT_GUIDE.md - Deployment instructions (600+ lines)
  2. docs/deployment/MONITORING_LOGGING.md - Monitoring setup
  3. QUICK_REFERENCE.md - Docker & K8s commands

πŸ“– Main Documentation Index


πŸ”„ Migration from v1.0.0

The project has been fully migrated from a monolith (v1.0.0) to microservices (v2.0.0) with:

  • βœ… Zero breaking changes - Same API endpoints
  • βœ… 100% backward compatible - Frontend requires no code changes
  • βœ… 6 independent services - Decomposed from single monolith
  • βœ… 3 separate databases - Data isolation per service
  • βœ… Complete documentation - 4,500+ lines of guides

Migration Details: MIGRATION_SUMMARY.md


πŸŽ“ Technology Stack

Backend Services

Technology Version Purpose
Spring Boot 3.2.3 Application framework
Spring Cloud 2023.0.0 Microservices patterns
Spring Security 6.1 Authentication & authorization
Spring Data JPA 3.2 Database access
Eureka Spring Cloud Netflix Service discovery
Spring Cloud Gateway - API routing & gateway
PostgreSQL 16 Relational databases
JJWT 0.11.5 JWT token handling
Maven 3.9+ Build tool (multi-module)

Frontend

Technology Version Purpose
Next.js 14 React framework (App Router)
React 18 UI library
TypeScript Latest Type safety
Tailwind CSS 3.x Utility-first styling
Axios Latest HTTP client

DevOps & Deployment

Technology Version Purpose
Docker Latest Containerization
Docker Compose Latest Multi-service orchestration
Kubernetes 1.24+ Container orchestration
Kustomize Built-in K8s template management
GitHub Actions - CI/CD pipelines

πŸ”’ Security Features

Authentication

  • JWT tokens with HMAC-SHA512 signing
  • 24-hour token expiration
  • Refresh token support
  • Per-service token validation

Authorization

  • Role-based access control (ADMIN/USER)
  • Claim-based authorization
  • Ownership validation for resources
  • Admin-only endpoints

Data Protection

  • BCrypt password hashing
  • Environment-based secrets management
  • Separate databases per service
  • Connection pooling with HikariCP

Security Details: docs/api/AUTHENTICATION.md


πŸ’‘ Getting Help

Quick Questions

πŸ‘‰ QUICK_REFERENCE.md - Common commands & troubleshooting

Understanding the System

πŸ‘‰ ARCHITECTURE.md - Design & architecture decisions

Deployment Issues

πŸ‘‰ DEPLOYMENT_GUIDE.md - Setup & troubleshooting

API Usage

πŸ‘‰ docs/api/API_REFERENCE.md - Complete API documentation

All Documentation

πŸ‘‰ docs/README.md - Complete documentation index


🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes
  4. Commit: git commit -m "feat: add my feature"
  5. Push: git push origin feature/my-feature
  6. Open a Pull Request

CI/CD Pipeline runs automatically on all PRs:

  • βœ… Build & test backend (Maven)
  • βœ… Build & lint frontend (Node.js)
  • βœ… Security scanning (CodeQL)
  • βœ… Docker image builds
  • βœ… Code review (GitHub Copilot)

πŸ“„ License

This project is open source and available under the MIT License.


πŸ“ž Support & Resources

Need Resource
Quick start QUICK_REFERENCE.md
Full guide MICROSERVICES_README.md
Architecture ARCHITECTURE.md
Deployment DEPLOYMENT_GUIDE.md
API docs docs/api/API_REFERENCE.md
All docs docs/README.md

πŸ“Š Project Stats

Metric Value
Microservices 6 services
Databases 3 PostgreSQL instances
Java Code 50+ classes, 3,000+ LOC
Documentation 4,500+ lines across 8 guides
API Endpoints 10+ endpoints
Docker Containers 10 (local development)
Kubernetes Objects 50+ manifests
CI/CD Workflows GitHub Actions

Version: 2.0.0 (Microservices)
Last Updated: March 19, 2026
Status: βœ… Production-Ready

About

A production-ready cloud-native microservices task management platform built with Spring Boot

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 46.0%
  • Java 45.6%
  • Dockerfile 4.7%
  • Shell 2.0%
  • JavaScript 1.4%
  • CSS 0.3%