A multi-service Order Management System built with Spring Boot, Kafka, and PostgreSQL. It includes:
- IAM (auth/JWT)
- Order service
- Inventory service
- Payment service
- Notification service
- Observability via Prometheus and Grafana
- IAM issues JWTs and hosts JWKS for resource servers.
- Order orchestrates order creation and publishes events.
- Inventory manages stock and reservation.
- Payment processes payments and emits events.
- Notification consumes events and logs notifications.
Services communicate over HTTP and Kafka. All services expose Actuator metrics for Prometheus.
Install these before running locally:
- Java 21
- Maven 3.9+
- Docker + Docker Compose
- Git
Optional (for local testing outside Docker):
- PostgreSQL 15+
iam/,order/,inventory/,payment/,notification/? servicescommon/? shared configuration (security, metrics, OpenAPI, Kafka publisher)api/? shared event DTOsmonitoring/? Prometheus configdocker-compose.yaml? local stack
From the services/ repo root:
mvn -DskipTests clean package
docker compose -f docker-compose.yaml up -d --buildVerify:
- IAM:
http://localhost:8080 - Order:
http://localhost:8081 - Inventory:
http://localhost:8082 - Payment:
http://localhost:8083 - Notification:
http://localhost:8084 - Prometheus:
http://localhost:9090 - Grafana:
http://localhost:3000
Grafana default login is typically admin/admin on first run (if unchanged), and it will prompt you to reset.
mvn -DskipTests clean packageThese scripts expect services running:
# Happy flow
powershell -ExecutionPolicy Bypass -File .\test_happy_path.ps1
# Failure flow
powershell -ExecutionPolicy Bypass -File .\test_failure_scenarios.ps1- Order:
http://localhost:8081/swagger-ui/index.html - Inventory:
http://localhost:8082/swagger-ui/index.html - Payment:
http://localhost:8083/swagger-ui/index.html - IAM:
http://localhost:8080/swagger-ui/index.html
Each service exposes Prometheus metrics at:
/actuator/prometheus
Prometheus scrapes all services using monitoring/prometheus.yml.
Shared defaults live in common/src/main/resources/application-common.properties.
Each service imports it using:
spring.config.import=optional:classpath:application-common.properties
- Fork the repo in GitHub.
- Clone your fork:
git clone <your-fork-url>
cd services- Add upstream (optional):
git remote add upstream <original-repo-url>- Create a branch:
git checkout -b feature/your-change- Commit and push:
git add -A
git commit -m "Your message"
git push -u origin feature/your-change- Open a PR from your fork.
- If services fail right after
docker compose up, wait ~30 seconds for IAM and DB migrations to finish. - For local JVM runs (without Docker), ensure Postgres is running and properties point to
localhost.