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
Shoppers see a labelled estimate of prices, delivery charges and tax before they commit.
A cart is ready only when every shipment group has a tier and no offer has expired.
Agents already read carts through a read-only MCP server and A2A agent, both off by default.
Harden the delivery-promise outage path, then switch the MCP server and A2A agent on in a deployment.
Shopping Cart holds a shopper's intent between browsing and purchase: cart lines, the destination postal prefix, the delivery quote delivery-promise returned per shipment group, the shopper's tier selection per group, and a labelled, non-binding estimate (effective prices + selected tier charges + tax band) so the total cost is visible up front…
It holds lines, destination, delivery quotes and tier choices, and keeps a labelled estimate fresh from price and tax events.
Quoting fails if delivery-promise is down, the estimate is non-binding, and a dead-lettered event silently skips an update.
Create, merge and list carts for each shopper.
Add, change or remove lines within clear quantity and line limits.
A postal prefix sets the destination and splits lines into shipment groups.
Delivery-promise returns offers per group, with expiry and no capacity held.
Shoppers pick a delivery tier per group; readiness needs every group set.
A labelled, non-binding total of prices, delivery charges and tax band.
OpenTelemetry SDK -> OTLP/gRPC -> in-cluster Collector -> Jaeger (traces) and Prometheus (metrics); stdout JSON logs shipped by Alloy to Loki (fleet observability standard ADR)
Ranked against all 45 briefed repositories (dot = one repository, highest on the left).
The estimate is non-binding by design; divergence from checkout's binding quote at confirmation is an accepted UX risk
The estimate is labelled non-binding; checkout requotes offers when it rejects one.
Delivery quoting depends synchronously on the delivery-promise Open Host Service…
Hardening the outage path so quoting degrades instead of failing the cart flow.
Freshness rides on seven consumed event types; a poison message dead-letters and silently skips an update until reprocessed
No mitigation on the roadmap yet: this one needs an owner.
Every REST, A2A and MCP endpoint is unauthenticated by decision (fleet-wide auth revert 2026-09-11, TestNoAuthMiddlewareReintroduced)…
No mitigation on the roadmap yet: this one needs an owner.
Shopping Cart keeps a shopper's intent current, so full cost and delivery choice show before checkout
| Style | Hexagonal (ports and adapters) with a Cart aggregate, transactional outbox + inbox (exactly-once effect), saga participant |
| Layout | cmd/{api (REST :8080, outbox relay, consumers, scheduler), a2a (agent :8093), mcp (server :8090)}; internal/{domain (cart aggregate, estimate, shared), application (usecases, ports)… |
| Storage | PostgreSQL (cart aggregate, transactional outbox, inbox, idempotency keys; golang-migrate) + Kafka (produces retailnetwork.shopping-cart.analytics… |
| Testing | Domain invariant unit tests, use cases over in-memory doubles, httptest adapter tests, godog BDD (17 feature files), testcontainers integration against real Postgres + Kafka… |
| REST | 11 operations over 9 paths on :8080: /carts, /carts/{cartId}, /carts/{cartId}/lines, /carts/{cartId}/lines/{catalogItemId}… |