Ordered
A distributed e-commerce system inspired by Allegro
Ordered is an e-commerce marketplace backend built from scratch as a microservices architecture. It started as a monolith - with Stripe payments, a cart, delivery addresses and full observability - which I deliberately split into six independent services using the Strangler Fig pattern, to work through the real problems of distributed systems: data consistency without distributed transactions, service discovery, centralized configuration, and observability across the whole system rather than a single app.
Ordered's architecture - six services behind a single gateway.
Worth knowing:
- Six independent domain services (orders, products, users, engagement) plus Eureka (service discovery) and an API Gateway
- Centralized configuration via Spring Cloud Config Server (native profile), with the JWT secret kept in one place
- Kafka in KRaft mode with the transactional outbox pattern for "order delivered" events
- Stateless JWT authentication with custom claims (userId, roles), read at the gateway and in each service
- A shared ordered-commons library centralizing authentication, exception handling and paginated responses
- Full observability stack: Prometheus, Grafana (auto-provisioned dashboard), Jaeger 2.x
- Gatling load tests (user-journey and product-catalog stress simulations) - 100% success, p95 ~779ms / ~207ms
- API documentation via springdoc-openapi with a gateway-aggregated Swagger UI
stack
- Java 21
- Spring Boot 4.1
- Spring Cloud (Eureka, Gateway, Config Server)
- Kafka
- PostgreSQL
- MongoDB
- Redis
- Docker
- Gatling
- GitHub Actions