Skip to content

Repository files navigation

ordered-backend

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

What is it

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.

Why was it "frozen"?

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.

Where to find the active code

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

Stack (this repository)

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

Highlights from this stage

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

About

Legacy e-commerce monolith built with Spring Boot

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages