A distributed e-commerce marketplace, built to learn distributed systems — not to sell anything.
Inspired by Allegro. Decomposed from a monolith into independent services with Kafka, service discovery, centralized config, and a full observability stack.
ordered-system started as ordered-backend, a single Spring Boot monolith with a product catalog, cart, orders, Stripe payments, reviews, and JWT auth — fully functional and fully observable on its own. Once that had done its job of teaching Kafka, the outbox pattern, and a mixed PostgreSQL/MongoDB/Redis datastore setup, it was decomposed using the Strangler Fig pattern into the services below — because a monolith, however well-built, can't teach service discovery, distributed config, or coordinating a multi-service deployment. That's what this decomposition is for.
Internet
│
┌──────▼──────┐
│ gateway │ JWT verification, routing,
│ │ aggregated Swagger docs
└──────┬──────┘
│
┌───────────┬───────────┼───────────┬───────────┐
┌────▼────┐ ┌────▼─────┐┌────▼─────┐┌────▼──────────┐
│ order │ │ product ││ user ││ engagement │
│ service │ │ service ││ service ││ service │
└────┬────┘ └────┬─────┘└────┬─────┘└────┬───────────┘
│ │ │ │
PostgreSQL PostgreSQL PostgreSQL MongoDB
+ Redis
Full write-up: docs/ARCHITECTURE.md.
| Repo | What it is |
|---|---|
| 🚪 ordered-gateway | Reactive API gateway — routing, JWT verification, docs aggregation |
| 🔍 ordered-eureka | Service discovery |
| ⚙️ ordered-config-server | Centralized config (JWT secret) |
| 📦 ordered-order-service | Orders, checkout, Stripe payments |
| 🛒 ordered-product-service | Catalog, cart, stock reservations |
| 👤 ordered-user-service | Users, auth, JWT issuance |
| ⭐ ordered-engagement-service | Reviews, browsing history |
| 🧩 ordered-commons | Shared library — JWT claims filter, exception handling |
| 🐳 ordered-infra | Docker Compose (dev + prod), Caddy, Prometheus/Grafana/Jaeger — start here to run everything |
| 🧪 ordered-load-tests | Gatling load tests + end-to-end smoke test |
| 🏛️ ordered-backend | The original monolith (frozen/archived — this is where it all started) |
Java 21 · Spring Boot 4.1 · Spring Cloud (Gateway, Eureka, Config) · PostgreSQL · MongoDB · Redis · Kafka (KRaft, outbox pattern) · JWT · Stripe + Resilience4j · Docker · Caddy · Prometheus / Grafana / Jaeger · Gatling
git clone https://github.com/ordered-system/ordered-infra.git
cat ordered-infra/docs/GETTING_STARTED.mdBuilt by Adam Dybcio · MIT licensed