Skip to main content
Study disclaimer

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.

retail-network

retail-network is a model of a large-scale retail and logistics network: a storefront that promises an arrival date, a network of nodes (vendor fulfillment centres, sortation centres, delivery stations, air hubs) joined by lanes, the decision of which node fulfils each order, the middle and last mile, tracking, and the measurement of every node against what it declared.

It is a separate organization from the warehouse-systems WMS/WES fleet. The fleet is one vendor of the network: its fulfillment centres, cross-docks and returns centres register as vendor nodes, and its network-fulfillment context is the only fleet service that talks to the network, through the network's Vendor API.

As built

All twelve contexts are built as services (eleven re-checked against each repository's develop on 2026-10-26; customer-returns, the twelfth, read from its develop on 2026-12-02) and wired in warehouse-infra develop; each has adopted the fleet observability standard. Each ships a read-only MCP server (cmd/mcp, Streamable HTTP on :8090, no auth, its own reads only) exposed by the gateway as /api/mcp/ + the context id — for example /api/mcp/delivery-promise — and, except customer-returns, whose repository carries no console remote yet, a console Module Federation remote mounted as /mfes/ + the context id (for example /mfes/delivery-promise/): read-only screens over the existing REST reads. Four contexts now have an analytics read side: shipping-and-tracking, last-mile-delivery, delivery-promise and order-sourcing each run a projector over their OWN topics into a separate analytical database and a read-only reports binary (/reports/... on :8092). The other eight have none, and there are no report screens yet. The two seams of customer-returns are built on both sides: the reverse-label route of shipping-and-tracking and the return advices and outcomes of vendor-connectivity are in those services' develop contracts, and the model draws them (see the context). customer-returns also ships a read-only A2A agent (cmd/a2a, one L1 skill; released at v0.1.10 and applied to the k3s cluster, pods checked 2026-12-02), reached with its MCP server through the Agent Router at /api/a2a/customer-returns and /api/mcp/customer-returns. The model is derived from public fulfillment-network research and the fleet's repositories. The canonical model is network/model/model.yaml; every page is derived from it, and a CI gate fails the build when a page names a message the model does not have. Where a service had to decide something the model left open, the decision is an assumption in that service's ADRs and appears in the gap register.

The twelve bounded contexts​

Derived from: model.yaml → contexts[*].classification, contexts[*].tier, the main event edges. Dark = Core, blue = Supporting, grey = Generic. The full map with every relationship pattern is on Context Map.

ContextOne sentence
delivery-promiseQuotes and makes the arrival-date promise from a feasible witness path with capacity held, and judges it kept or broken. Core.
order-sourcingDecides late which node really fulfils each shipment group, re-optimizes until release, locks at commitment. Core.
node-topologyNodes, their declared operational profile, lanes, regions and service areas.
offer-availabilityCatalogue items, one listing per (item, node), and what each node claims it can ship.
vendor-connectivityThe Vendor API: purchase orders, fill-or-kill acknowledgements, labels, shipment confirmations, async transactions. The fleet's seam.
linehaul-transportationThe middle mile: pickup departures at vendor cutoffs, scheduled departures with capacity, loads.
last-mile-deliveryDelivery stations: delivery waves with stop capacity, routes for delivery partners, attempts.
node-performanceScorecards measured from facts, never from declarations; grades feed the promise.
customer-orderingCheckout and the customer order; the only holder of the (synthetic) ship-to address. Generic.
shipping-and-trackingLabels and the package journey timeline. Generic.
seller-inboundSellers plan, pack, label and ship stock, including case-packed master cartons identified by SSCC, to vendor nodes; receipts close each shipment.
customer-returnsThe shopper-facing return authorization of a shipped or delivered order group: the disposition is decided at authorization (keep, nearest returns centre or origin node), and the graded outcome comes back as a restock fact. No money, no address, no free text.

How to read this site​

  1. public research: what is publicly known, with citations.
  2. Strategic Design: vision, subdomains, core domain chart, capability map, context map, EventStorming, message flows, ubiquitous language, event standard (the ddd-crew strategic set), and the Model Gap Register of what the model does not decide yet.
  3. Nodes & Promise: the node model, the promise algorithm with a worked example, and order assignment.
  4. WMS/WES Integration: exactly how the warehouse-systems fleet plugs in, what crosses the seam, and what the fleet must change.
  5. Bounded Contexts: the same 14-page ddd-crew pack for each of the twelve contexts, and API Reference for their REST contracts.
  6. ADRs: the nine domain decisions (Proposed) and an index of every service repository's own ADRs.