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.
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
