A cloud-native, event-driven microservices platform for managing telecommunications product catalogs. This project demonstrates high-scale architectural patterns including Distributed Sagas, CQRS, and Transactional Outbox.
GitHub: https://github.com/amirkiarafiei/microservices-product-catalog
- TMF Product Catalog Microservices System
- Screenshots
- Table of Contents
- π Quick Start (Automated)
- Default Credentials
- π΅οΈ Observability & Monitoring
- π Core Architecture Patterns
- π System Visualizations
- π Microservices Map
- Development Guide
- Key Technologies
- π Project Structure
- URLs & Ports
- π Project Documentation
- Contributing
- License
- Contact
We use a Makefile to simplify monorepo orchestration.
Spin up the databases and middleware:
make infra-upRun these once to prepare security and databases:
make setup-keys # Generate RSA keys
make migrate # Apply DB schemasNote: Follow script instructions to update services/identity-service/.env after generating keys.
You can start everything with a single command:
make dev- Backend: Starts 7 microservices in the background (logs saved to
logs/directory). - Frontend: Starts the Next.js dev server on http://localhost:3000.
make status # Check which services are running
make stop # Stop all background backend services
make clean # Remove logs and temp filesmake install-all-deps # Install all backend (uv) and frontend (npm) deps
make test-all # Run all tests across the monorepo
make lint-all # Run linters (ruff + next lint)| Role | Username | Password |
|---|---|---|
| Admin | admin |
admin |
| User | user |
user |
The system is a "Glass Box" β you can see everything happening inside:
- Zipkin (Tracing): Visit http://localhost:9411 to see waterfall charts of every request hop.
- Kibana (Logs): Visit http://localhost:5601 to search logs by
correlation_idacross all services. - Camunda Cockpit: Visit http://localhost:8085 to watch the Offering Publication Saga in real-time.
- API Documentation: Each service has interactive Swagger UI at
/docs(e.g., http://localhost:8000/docs)
- Hexagonal Architecture: Domain logic is strictly isolated from infrastructure.
- Orchestrated Saga: Publication lifecycle managed by Camunda BPMN with automatic compensating transactions.
- CQRS: Separate write models (PostgreSQL) and read models (MongoDB + Elasticsearch).
- Transactional Outbox: Guaranteed event delivery using Postgres
LISTEN/NOTIFY. - Zero-Trust Security: Every service boundary validates JWTs signed with RS256.
- Full Observability: Distributed tracing with OpenTelemetry and centralized logging with ELK.
The system is divided into a Command Side (Write) and a Query Side (Read), connected via asynchronous events.
flowchart TB
subgraph ClientLayer [Frontend]
UI[NextJS App]
end
subgraph EntryLayer [API Gateway]
GW[API Gateway]
end
subgraph WriteSide [Command Side - PostgreSQL]
ID[Identity]
CH[Characteristic]
SP[Specification]
PR[Pricing]
OF[Offering]
end
subgraph Orchestration [Orchestration]
CAM[Camunda Engine]
end
subgraph Messaging [Event Bus]
RMQ[RabbitMQ]
end
subgraph ReadSide [Query Side - NoSQL]
ST[Store Query Service]
MDB[(MongoDB)]
ES[(Elasticsearch)]
end
UI --> GW
GW --> WriteSide
OF -->|"Start Saga"| CAM
CAM -->|"Tasks"| WriteSide
WriteSide -->|"Outbox Events"| RMQ
RMQ --> ST
ST --> MDB
ST --> ES
GW --> ST
A distributed transaction spanning four microservices, orchestrated by Camunda.
sequenceDiagram
participant Admin
participant OF as Offering Service
participant CAM as Camunda Engine
participant PR as Pricing Service
participant SP as Spec Service
participant ST as Store Service
Admin->>OF: POST /publish
OF->>CAM: Start Process
CAM->>PR: Task: Lock Prices
PR-->>CAM: Done
CAM->>SP: Task: Validate Specs
SP-->>CAM: Done
CAM->>ST: Task: Pre-create View
ST-->>CAM: Done
CAM->>OF: Task: Mark Published
OF-->>Admin: 200 OK (via Outbox/Event)
Ensures that a database update and its corresponding event publication happen atomically.
flowchart LR
subgraph Service [Microservice]
Logic[Business Logic]
Repo[Repository]
end
subgraph DB [PostgreSQL]
Data[(Business Data)]
Outbox[(Outbox Table)]
end
subgraph Broker [RabbitMQ]
Queue[Event Exchange]
end
Logic --> Repo
Repo -->|"Atomic Transaction"| Data
Repo -->|"Atomic Transaction"| Outbox
Outbox -->|"pg_notify"| Listener[Outbox Listener]
Listener -->|"Publish"| Queue
| Service | Responsibility | Write DB | Read/Search |
|---|---|---|---|
| API Gateway | Entry point, Circuit Breakers, Correlation IDs | - | - |
| Identity | Authentication & RSA Key Distribution | PostgreSQL | - |
| Characteristic | Atomic attributes (Speed, Color, etc.) | PostgreSQL | - |
| Specification | Technical groupings of characteristics | PostgreSQL | - |
| Pricing | Monetary definitions & Saga Locking | PostgreSQL | - |
| Offering | Product bundles & Saga Orchestrator | PostgreSQL | - |
| Store Query | High-performance catalog & Full-text search | - | Mongo + ES |
| Web UI | Modern Management & Shopping Portal | - | Next.js 16 |
We maintain a high-quality bar with 120+ tests across the suite:
# Run all tests (Unit + Integration + Component + E2E)
make test-all
# Run E2E tests (requires Docker)
make test-e2e
# Run tests for a specific service
cd services/pricing-service && uv run pytest tests -v
# Run shared library tests
cd libs/common-python && uv run pytest tests -vMigrate all services:
make migrateReset databases to clean state:
uv run python scripts/clean_databases.pySeed sample data:
uv run python scripts/seed_data.pyStart all containers:
make infra-upStop all containers:
make infra-downView container status:
docker-compose ps| Layer | Technology | Version |
|---|---|---|
| Frontend | Next.js | 16.1+ |
| Frontend Styling | Tailwind CSS | 4.0+ |
| Backend | Python | 3.13+ |
| Framework | FastAPI | 0.104+ |
| Package Manager | uv | Latest |
| Write DB | PostgreSQL | 15 |
| Read DB | MongoDB | 7 |
| Search | Elasticsearch | 8.11+ |
| Message Broker | RabbitMQ | 3.12 |
| Workflow | Camunda | 7.20 |
| Tracing | Zipkin | Latest |
| Logging | ELK Stack | 8.11+ |
| Containers | Docker Compose | Latest |
microservices-product-catalog/
βββ docs/ # Complete documentation
β βββ report/ # Final project report
β βββ api/ # API reference & OpenAPI specs
β βββ sdd.md # System Design Document
β βββ phases/ # Development roadmap
β
βββ services/ # Microservices
β βββ api-gateway/ # Entry point :8000
β βββ identity-service/ # Auth :8001
β βββ characteristic-service/ # Characteristics :8002
β βββ specification-service/ # Specifications :8003
β βββ pricing-service/ # Pricing :8004
β βββ offering-service/ # Offerings :8005
β βββ store-service/ # Store (CQRS Read) :8006
β
βββ libs/common-python/ # Shared library
β βββ src/common/
β βββ logging.py # Structured logging
β βββ tracing.py # OpenTelemetry
β βββ security.py # JWT validation
β βββ messaging.py # RabbitMQ
β βββ exceptions.py # Standard errors
β
βββ web-ui/ # Next.js frontend :3000
β βββ src/
β βββ app/ # App Router pages
β βββ components/ # Reusable UI
β βββ contexts/ # React contexts
β
βββ scripts/ # Development utilities
β βββ migrate.py # DB migrations
β βββ seed_data.py # Sample data
β βββ clean_databases.py # Reset DBs
β βββ generate_keys.sh # RSA key generation
β
βββ tests/ # E2E tests
β βββ e2e/
β
βββ docker-compose.yml # Infrastructure
βββ Makefile # Automation
βββ pyproject.toml # Root workspace
βββ README.md # This file
| Service | URL | Port |
|---|---|---|
| Web UI | http://localhost:3000 | 3000 |
| API Gateway | http://localhost:8000 | 8000 |
| API Docs | http://localhost:8000/docs | - |
| Identity | http://localhost:8001 | 8001 |
| Characteristic | http://localhost:8002 | 8002 |
| Specification | http://localhost:8003 | 8003 |
| Pricing | http://localhost:8004 | 8004 |
| Offering | http://localhost:8005 | 8005 |
| Store | http://localhost:8006 | 8006 |
| Camunda | http://localhost:8085 | 8085 |
| RabbitMQ | http://localhost:15672 | 15672 |
| Zipkin | http://localhost:9411 | 9411 |
| Kibana | http://localhost:5601 | 5601 |
| Elasticsearch | http://localhost:9200 | 9200 |
| PostgreSQL | localhost:5432 | 5432 |
| MongoDB | localhost:27017 | 27017 |
Complete project report with comprehensive technical analysis:
Contents:
- Problem definition and project scope
- Requirements analysis (functional and non-functional)
- Analysis models (Use Cases, Domain Model, Activity Diagrams)
- Design models (Component, Sequence, State Machine Diagrams)
- Detailed architectural design and patterns
- Implementation details and decisions
- Testing strategy and results (108 test functions)
- Deployment instructions
- Evaluation, challenges, and future improvements
Complete API documentation with interactive endpoints:
Includes:
- Authentication endpoints
- Characteristics, Specifications, Pricing, Offerings CRUD operations
- Store (public) catalog search
- Health checks
- Error responses with HTTP status codes
- Request/response examples for all endpoints
- Interactive Swagger documentation links
OpenAPI Specifications:
- Gateway
- Identity Service
- Characteristic Service
- Specification Service
- Pricing Service
- Offering Service
- Store Service
- System Design Document - High-level architecture, bounded contexts, data flows
- Development Phases - 21-phase incremental roadmap with completion status
- Python: Follow PEP 8 with
rufflinter - TypeScript/React: Use
prettierandeslint - Commits: Conventional commits format
- Create feature branch:
git checkout -b feat/description - Make changes and write tests
- Run tests:
make test-all - Push and open PR
- Address review comments
- Merge after approval
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or contributions, please open an issue on GitHub.
Last Updated: January 2026



