Microservice-based task management platform with JWT auth, task lifecycle, event-driven statistics, notifications, and a lightweight React UI for manual testing.
- Microservice architecture with a single API entry point (
api-gateway) - JWT authentication and role-based access (
ROLE_USER,ROLE_ADMIN) - Task lifecycle: create, update, start, complete, delete
- Event-driven integration via Kafka
- Aggregated statistics service (global and per-user)
- Notification service with MongoDB log storage
- Observability stack: Prometheus, Grafana, Zipkin, Loki
flowchart LR
UI["React UI\n(simplified-front)"] --> GW["API Gateway"]
GW --> US["user-service"]
GW --> TS["task-service"]
GW --> SS["statistics-service"]
TS -->|"validate user via Feign"| US
TS -->|"TaskEvent"| K["Kafka"]
K --> NS["notification-service"]
K --> SS
US --> UDB[("PostgreSQL\nuser-db")]
TS --> TDB[("PostgreSQL\ntask-db")]
SS --> SDB[("PostgreSQL\nuser-db")]
NS --> MDB[("MongoDB")]
TS --> R[("Redis cache")]
TS --> Z["Zipkin"]
US --> Z
SS --> Z
NS --> Z
GW --> Z
| Service | Responsibility | Storage / Integration |
|---|---|---|
api-gateway |
Single entry point, request routing, CORS | Spring Cloud Gateway |
user-service |
Registration, JWT auth, user management | PostgreSQL (user-db) |
task-service |
Task CRUD + lifecycle + business rules | PostgreSQL (task-db), Redis, Kafka |
statistics-service |
Global and per-user task analytics | PostgreSQL (user-db), Kafka |
notification-service |
Sends notifications and stores notification logs | Kafka, MongoDB, SMTP |
common |
Shared DTO/models/events | Maven module |
simplified-front |
Minimal React UI for API checks | Uses gateway API |
- Java 21
- Spring Boot 3
- Spring Cloud Gateway
- Spring Data JPA
- Spring Validation
- Spring Security + JWT
- OpenFeign
- PostgreSQL 15
- MongoDB
- Redis
- Apache Kafka (KRaft)
- Liquibase
- Micrometer
- Prometheus
- Grafana
- Zipkin
- Loki
- Docker / Docker Compose
- Maven (multi-module)
- React
- React Router
- Tailwind
task-management/
|- api-gateway/
|- common/
|- db-init/
|- k8s/
|- notification-service/
|- simplified-front/
|- statistics-service/
|- task-service/
|- user-service/
|- docker-compose.yaml
|- pom.xml
`- README.md
- Docker + Docker Compose
- Optional for local run (without Docker): Java 21, Maven
- Optional for frontend: Node.js 20+
Create root .env:
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_uNAME=user-db
DB_tNAME=task-db
GMAIL_USER=your_email@gmail.com
GMAIL_PASSWORD=your_app_passwordFrontend env (simplified-front/.env):
PORT=3001
REACT_APP_API_BASE_URL=http://localhost:8080docker compose up --build -dCheck containers:
docker compose psStop:
docker compose downcd simplified-front
npm install
npm start- Gateway:
http://localhost:8080 - Frontend:
http://localhost:3001 - Grafana:
http://localhost:3000 - Prometheus:
http://localhost:9090 - Zipkin:
http://localhost:9411 - Mongo Express:
http://localhost:8085
Base URL: http://localhost:8080
POST /auth/sign-inPOST /auth/refreshPOST /users/registrationGET /users/{id}PUT /users/{id}GET /users/email/{email}
Admin routes:
GET /usersPOST /users/{id}/banUserDELETE /users/{id}/delete
GET /tasksGET /tasks/{id}POST /tasksPUT /tasks/{id}DELETE /tasks/{id}POST /tasks/{id}/startPOST /tasks/{id}/complete
GET /stats/taskGET /stats/user/{userId}
task-service publishes TaskEvent to Kafka topic task-events.
Consumers:
statistics-serviceupdates global and per-user countersnotification-servicesends notifications and stores event logs in MongoDB