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
- 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)
# 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.htmlDefault Credentials:
- Username:
admin - Password:
admin123
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 stopFor frontend-only development, npm run dev in frontend/ still works as usual.
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
- β 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
- β 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
- β 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
- β 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
- β 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
- β Eureka Dashboard β Service registry visualization & health status
- β
Actuator Endpoints β
/actuator/health,/actuator/metricson all services - β Request Logging β Built-in request/response logging
- β Error Handling β Consistent JSON error responses across all services
- β Swagger UI β Interactive API documentation
- β 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
- β 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
βββββββββββββββββββββββοΏ½οΏ½ββββββββββββββββββββββββββββββββββββ
β 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 | 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 |
All endpoints are accessed through the API Gateway at http://localhost:8080/api
POST /api/auth/register - Register new user
POST /api/auth/login - Login & get JWT token
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
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
users (id, username, email, password_hash, role, created_at)tasks (id, title, description, status, priority, due_date, owner_id, created_at, updated_at)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
# 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# 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:3000See DEPLOYMENT_GUIDE.md for:
- AWS ECS / Fargate
- Google Cloud Run
- DigitalOcean Kubernetes
- Azure AKS
- Other cloud platforms
Create .env.local from .env.example:
# Copy template
cp .env.example .env.local
# Edit with your values
nano .env.localKey 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/apiComplete Reference: docs/reference/CONFIGURATION_REFERENCE.md
Start with the appropriate guide for your role:
- MICROSERVICES_README.md - Complete guide (655 lines)
- QUICK_REFERENCE.md - Quick commands & API examples
- docs/guides/GETTING_STARTED.md - First steps
- ARCHITECTURE.md - System design & patterns (500+ lines)
- docs/architecture/ARCHITECTURE.md - Deep design dive
- DEPLOYMENT_GUIDE.md - Deployment options
- DEPLOYMENT_GUIDE.md - Deployment instructions (600+ lines)
- docs/deployment/MONITORING_LOGGING.md - Monitoring setup
- QUICK_REFERENCE.md - Docker & K8s commands
- docs/README.md - Complete documentation directory
- DOCUMENTATION_INDEX.md - All doc files & navigation
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 | 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) |
| 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 |
| 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 |
- JWT tokens with HMAC-SHA512 signing
- 24-hour token expiration
- Refresh token support
- Per-service token validation
- Role-based access control (ADMIN/USER)
- Claim-based authorization
- Ownership validation for resources
- Admin-only endpoints
- BCrypt password hashing
- Environment-based secrets management
- Separate databases per service
- Connection pooling with HikariCP
Security Details: docs/api/AUTHENTICATION.md
π QUICK_REFERENCE.md - Common commands & troubleshooting
π ARCHITECTURE.md - Design & architecture decisions
π DEPLOYMENT_GUIDE.md - Setup & troubleshooting
π docs/api/API_REFERENCE.md - Complete API documentation
π docs/README.md - Complete documentation index
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Commit:
git commit -m "feat: add my feature" - Push:
git push origin feature/my-feature - 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)
This project is open source and available under the MIT License.
| 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 |
| 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