⚠️ Legacy / archived monolith. This project is no longer actively developed. The code here is a frozen starting point - the commit from which the extraction into microservices began. Active development continues in the ordered-system.
ordered-backend is an e-commerce platform inspired by Allegro, built as a portfolio project for learning distributed systems architecture - Kafka and the outbox pattern, eventual consistency, NoSQL alongside a relational database, and a full observability stack. Before becoming a monolith to be decomposed, it was a fully functional standalone system featuring a product catalog, shopping cart, orders, payments (Stripe with Resilience4j), reviews, browsing history, and JWT authentication with USER / SELLER / ADMIN roles.
At some point, the monolith had fulfilled its educational purpose - it demonstrated how to design and build a complete system from scratch. The next natural step was to decompose it using the Strangler Fig pattern into independent services, each with its own database, in order to practice what a monolith inherently does not teach: inter-service communication, event propagation, distributed observability, and multi-service deployment.
This branch/tag (legacy-monolith) remains as a reference point - "this is where it was before" - so that the extraction process has a clear before-and-after comparison.
The decomposition is taking place in the ordered-system organization:
| Service | Database | Role |
|---|---|---|
ordered-eureka |
- | Service discovery |
ordered-gateway |
- | API Gateway / routing |
ordered-order-service |
PostgreSQL | Orders, shopping cart, payments (Stripe) |
ordered-product-service |
PostgreSQL + Redis | Product catalog |
ordered-user-service |
PostgreSQL | Users, authentication, JWT issuance |
ordered-engagement-service |
MongoDB | Reviews, browsing history |
Java 21 · Spring Boot 4.1.0 · PostgreSQL · MongoDB · Redis · Kafka (outbox pattern) · JWT (JJWT, HS256) · Stripe + Resilience4j · Micrometer / Prometheus / Grafana / Jaeger · Gatling (load testing) · Testcontainers
- Redis cache-aside for the product catalog - under load, reduced errors from 46% to 0%
- HikariCP identified as a latency bottleneck when scaling
- Full outbox pattern with Kafka for consistency between modules before their separation
- Complete, tested observability stack (traces + metrics) running within a single process
This README documents the state of the repository at the time it was frozen. It will not be updated as the project continues to evolve - see ordered-system.