Case study

Commerce

A web store built the way a high-traffic one should be.

Commerce screenshot

Commerce is an open-source storefront built from independent Spring Boot services that talk only through Kafka events. It's a working store, with a catalog, checkout, payments, inventory, shipping, returns, and a back office, and a lab where you can watch it keep taking orders while you try to break it.

The challenge

Online stores fail in predictable ways under load. Checkout waits on a slow payment provider, one bad message jams a queue, a crashed server takes orders down with it, and nobody can say where a lost order went. Fixing those problems after launch is expensive.

We set out to build a store that is highly available, fast, and observable from the first commit, and to prove it with measurements and experiments rather than claims.

What we built

Services that never call each other

Catalog, order, inventory, billing, shipping, notification, identity, and operations each own their own database and talk only through Kafka events. A change and the event announcing it are committed together, so nothing is lost between them.

Checkout that answers at once

Placing an order returns immediately; the order then moves through payment, inventory, and shipping on its own. Checkout speed doesn't depend on how fast the payment provider responds.

Bad data can't block good data

Messages that can't be processed are retried, then set aside on a dead-letter topic instead of blocking everything behind them. Consumers handle duplicates safely, so replays are harmless.

Every request can be followed

Logs, metrics, and traces follow each request from the browser through every service and Kafka hop. Alerts become incidents in a custom operations console, alongside Grafana dashboards.

Decisions written down first

The architecture and every major decision, with the alternatives rejected and why, were documented before any code, and still describe the system today.

Results

  • Load-tested on a single development machine to 20 orders a second with no failed checkouts and no server errors
  • Catalog pages stayed at 3 ms or less at the 95th percentile at every load step; orders went from placed to confirmed in 1.2 seconds at the highest rate
  • Resilience experiments with pass or fail verdicts show the store keeps taking orders while service instances are stopped
  • 61 end-to-end checks and a full CI/CD pipeline that promotes the same tested images from development to production

Technology

Spring BootJavaKafkaReactTypeScriptMySQLDockerOpenTelemetryPrometheusGrafana

Services behind this project

Next case study

ndurance.app

An AI endurance coach on the web and in your pocket.

Have a project in mind?

Let's talk about what we can build together.

Get in touch