This project is a domain-driven design study. It is not associated with, endorsed by or affiliated with any company, and it uses no company's code, data, logos or trademarks. All names, figures and examples are illustrative or synthetic. · November 2026
Every order is placed only after each shipment group has a confirmed delivery promise.
Shoppers see status and tracking built from 21 event types out of three other contexts.
Cancellation and compensation unwind partial checkouts instead of leaving half-placed orders.
Add a circuit breaker to the delivery-promise call so checkout degrades predictably instead of stopping.
Generic subdomain of the retail network (commerce tier) and the shopper's front door. At checkout it groups the cart into shipment groups, obtains a delivery promise for each group from delivery-promise synchronously (re-quote, make, confirm), and only then places the order with the shopper and ship-to address (or a pickup point, ADR 0016) - synthetic PII held only here…
It groups the cart, secures a delivery promise per group, places the order and builds tracking from upstream events.
Placement stops if delivery-promise is down, and it alone holds shopper addresses with no PII policy yet.
Registers shoppers, finds them by email and keeps saved addresses.
Secures a delivery promise per shipment group, re-quoting if it drifts.
Places orders to an address or pickup point; shoppers list and open them.
Rolls group status up to the order from promise, sourcing and shipping.
Shows delivery windows, packages, scans and ETAs for each shipment group.
Lets shoppers cancel while a group is unlocked; sourcing accepts or refuses.
OpenTelemetry SDK -> OTLP/gRPC Collector (Jaeger traces, Prometheus metrics); JSON logs on stdout shipped by Alloy to Loki
Ranked against all 45 briefed repositories (dot = one repository, highest on the left).
Checkout availability depends on a synchronous delivery-promise call: its outage stops order placement end to end
A 5 s per-call timeout exists; a circuit breaker is the next step.
Shopper and address PII is custody-sensitive even when synthetic; the context is the single holder and a future breach surface
Define retention, erasure and encryption policy for shopper addresses before any real data.
21 consumed event types from three contexts plus a compensation path: tracking-view correctness depends on every upstream contract…
Integration suites run consumed events against real Postgres and Kafka in testcontainers.
Every REST, MCP and A2A endpoint is unauthenticated by decision (fleet-wide auth revert…
No mitigation on the roadmap yet: this one needs an owner.
Customer ordering is the shopper's front door, and it only places orders whose delivery dates are confirmed
| Style | Hexagonal / ports-and-adapters with DDD aggregates (CustomerOrder, Shopper, ShipTo); the only outbound HTTP is the synchronous delivery-promise client; layering enforced by fitness tests |
| Layout | cmd/api (REST + three Kafka consumers + outbox relay + compensation in one process), cmd/mcp (:8090), cmd/a2a (:8093, Agent Card at /.well-known/agent-card.json)… |
| Storage | PostgreSQL via pgx with 12 embedded migrations (incl. compensation cancels, pickup destination, notification_policies), transactional outbox… |
| Testing | Unit + integration with testcontainers Postgres/Kafka, godog BDD (12 feature files) over features/*.feature, MCP tool-registry golden file, architecture fitness tests (incl… |
| REST | 14 operations over 12 paths on :8080: /checkout, /orders, /orders/{orderId}, /orders/{orderId}/tracking, /orders/{orderId}/cancellations… |