A microservice platform for reserving library seats and rooms: JWT authentication, role-based access, policy-driven booking rules, real-time availability, in-app notifications, and admin analytics. A Flutter client talks to the stack through a single API gateway.
- Service oriented architecture with clear domain boundaries and a shared security library
- JWT + RBAC enforced consistently across services via AOP
- Event-driven updates over RabbitMQ for notifications, analytics, catalog state, and live UI
- Policy engine for booking validation before reservations are created
- QR check-in and booking lifecycle automation in the booking service
- Docker Compose for local full-stack runs on Windows (PowerShell automation included)
flowchart TB
subgraph clients [Clients]
Flutter[frontend-web]
end
subgraph edge [Edge]
GW[api-gateway :8080]
RT[realtime-gateway :3008]
end
subgraph core [Core services]
AUTH[auth-service :3002]
USER[user-service :3001]
CAT[catalog-service :3003]
BOOK[booking-service :3004]
POL[policy-service :3005]
NOTIF[notification-service :3006]
ANA[analytics-service :3007]
end
subgraph infra [Infrastructure]
PG[(PostgreSQL)]
REDIS[(Redis)]
RMQ[(RabbitMQ)]
end
Flutter -->|REST| GW
Flutter -->|WebSocket /ws/| GW
GW --> AUTH
GW --> USER
GW --> CAT
GW --> BOOK
GW --> POL
GW --> NOTIF
GW --> ANA
GW --> RT
AUTH --> USER
BOOK --> USER
BOOK --> CAT
BOOK --> POL
BOOK --> RMQ
CAT --> RMQ
POL --> RMQ
NOTIF --> RMQ
ANA --> RMQ
RT --> RMQ
USER --> PG
CAT --> PG
BOOK --> PG
POL --> PG
NOTIF --> PG
ANA --> PG
USER --> REDIS
| Repository | Role |
|---|---|
| Documentation | System overview, API reference, authorization matrix |
| docker-compose | Local orchestration, database init, setup scripts |
| api-gateway | Nginx reverse proxy and WebSocket entry |
| auth-service | Registration, login, JWT issuance |
| user-service | Profiles, approval workflow, restrictions |
| catalog-service | Resource catalog and availability |
| booking-service | Bookings, QR check-in, lifecycle events |
| policy-service | Booking rules and validation API |
| notification-service | In-app notifications and optional email |
| analytics-service | Utilization metrics and audit logs |
| realtime-gateway | WebSocket fan-out from domain events |
| common-aspects | Shared JWT, RBAC AOP, logging, audit publishing |
| frontend-web | Flutter client (Android, Windows, web) |
- Clone the repos you need (at minimum
docker-composeand each service image referenced in its compose file, or clone the full org). - From the
docker-composerepository:
cd docker-compose
powershell -ExecutionPolicy Bypass -File setup-complete.ps1- Confirm the gateway:
curl http://localhost:8080/health - Run the Flutter app from frontend-web with the API base URL pointing at
http://localhost:8080(usehttp://10.0.2.2:8080on the Android emulator).
Default infrastructure ports: PostgreSQL 5433, Redis 6379, RabbitMQ 5672 (management UI 15672).
- API_REFERENCE.md — REST contract through the gateway
- AUTHORIZATION.md — roles, ownership rules, and service-level enforcement
- REQUIREMENTS_COMPLIANCE_AUDIT_REPORT.md — requirements traceability and gap notes
| Layer | Stack |
|---|---|
| Services | Java 17, Spring Boot 3.5, PostgreSQL, RabbitMQ |
| Gateway | Nginx (REST + WebSocket proxy) |
| Realtime | Node.js, ws, AMQP consumer |
| Client | Flutter / Dart 3+ |
| Shared library | Maven JAR (common-aspects) for JWT and AOP authorization |
sequenceDiagram
participant C as Client
participant G as api-gateway
participant A as auth-service
participant U as user-service
participant B as booking-service
participant P as policy-service
C->>G: POST /api/auth/login
G->>A: forward
A->>U: validate credentials
U-->>A: user profile
A-->>C: JWT
C->>G: POST /api/bookings (Bearer JWT)
G->>B: forward
B->>P: validate booking rules
P-->>B: allowed / denied
B-->>C: booking created
Note over B: Publishes booking.events to RabbitMQ