Skip to main content

Context Map

Released at v0.1.4, applied to the k3s cluster

Derived from model/model.yaml. The checkout service is built on develop (IQVO/checkout at 51e0379, checked 2026-12-02), released at v0.1.4 and applied to the k3s cluster: the api and the A2A agent are deployed, the MCP server is registered in warehouse-infra and switched off. Every Err... name, REST route and CloudEvents type of this context named on this page exists in the service; where the built service differs from the model's design, the page says so (As built) or the context's Service and operations section lists it.

Following ddd-crew Context Mapping. This is checkout's slice of the storefront-wide context map: every relationship this context has, with the upstream (U) and downstream (D) side, the pattern and the channel.

Derived from: model.yaml → contexts[checkout].inbound, .publishes, .consumes, .rest, .sync_calls; contexts[shopping-cart].inbound, contexts[customer-payments].inbound (the rows naming checkout); contexts[pricing].inbound; network/model/model.yaml → contexts[delivery-promise].inbound, contexts[customer-ordering].inbound (caller shopper / storefront).

Legend: arrows point from upstream to downstream, except the dotted synchronous calls, which are drawn with the caller (checkout) on the left and labelled with the true direction. A thick arrow is a Kafka event relationship. The path parameters {cartId} and {offerId} are written cartId and offerId inside the diagram. The AI clients edge is as built (cmd/mcp, cmd/a2a; service ADRs 0005 and 0007) and not in the model.

Omitted, because they have no edge with this context (Separate Ways): product-content and product-discovery (checkout reads neither; the cart and pricing already carry what it needs), offer-availability, order-sourcing and shipping-and-tracking (network; their fulfilment facts reach the storefront through customer-payments, never through checkout), and the payment provider itself, which only customer-payments talks to through its provider port. Checkout never touches a warehouse.* topic (meta.hard_boundary).

Relationships​

NeighbourDirectionPatternChannelMessagesWhy this pattern
storefront-bff (experience layer)checkout upstream, BFF downstreamUI (inbound rows relationship: UI)REST POST /checkout-sessions, POST /checkout-sessions/{sessionId}/confirmations, GET /checkout-sessions/{sessionId}OpenSession, ConfirmSession; GetSessionThe BFF is the only storefront edge; it mints the Idempotency-Key, shows the binding total and polls a PLACING session.
AI clients (agents; as built, not in the model)checkout upstream, agent clients downstreamOpen Host Service, read-onlyMCP /api/mcp/checkout (switched off in warehouse-infra); A2A /api/a2a/checkout through the Agent Router (deployed)MCP get_checkout_session; A2A checkout_session_statusBoth are the GetSession read, L1 inform: an agent asks where a session stands and changes nothing. A2A is delegation only; facts still travel as CloudEvents on Kafka.
shopping-cart (Supporting)cart upstream, checkout downstreamCustomer/Supplier (checkout is the Customer)REST GET /carts/{cartId}GetCartCheckout reads the cart, its version and its readiness inside the session-open request; the read shape is negotiated for the saga.
shopping-cart (Supporting)checkout upstream, cart downstreamCustomer/Supplier (SC is the Customer)Kafka retailnetwork.checkout.eventsCheckoutCompletedThe cart closes itself (CloseOnCheckoutCompleted) on the fact, instead of checkout calling back synchronously.
pricing (Core)pricing upstream, checkout downstreamCustomer/Supplier (checkout is the Customer)REST POST /price-quotesIssuePriceQuote (command)Same domain, negotiated contract: pricing issues the binding, expiring quote and checkout records its id, totals and expiry.
customer-payments (Generic)payments upstream, checkout downstreamCustomer/Supplier (checkout is the Customer)REST POST /payment-authorizations, POST /payment-authorizations/{authorizationId}/voidsAuthorizePayment, VoidAuthorization (commands)The authorize and void shapes (idempotency keys, allocations per group) are negotiated between the two; payments owns the provider vocabulary.
customer-payments (Generic)checkout upstream, payments downstreamCustomer/Supplier (CP is the Customer)Kafka retailnetwork.checkout.eventsCheckoutCompletedPayments binds the orderId to the session's authorization on the fact (BindOrderOnCheckoutCompleted).
delivery-promise (network, Core)DP upstream, checkout downstreamOpen Host Service (network side) with a conformist consumerREST GET /delivery-offers/{offerId}GetDeliveryOffer (query)The network publishes the route for the shopper / storefront caller; checkout uses it only to pre-check, once at open, that each selected offer is still QUOTED and not expiring within 2 minutes (422 offer-not-quotable otherwise).
customer-ordering (network, Generic)CO upstream, checkout downstreamOpen Host Service (network side) behind an Anti-Corruption Layer (checkout side)REST POST /checkoutPlaceOrder (command)The ACL (internal/adapters/outbound/customerordering) is the only place that knows the network's wire names; it translates the network's "Checkout", offer-not-quotable and requotedOffers into the place-order step and the requote.
analytics consumerscheckout upstream, analytics downstreamanalytics streamKafka retailnetwork.checkout.analyticsCheckoutOpened, CheckoutDeclined, CheckoutRequoteRequired, CheckoutFailedFunnel facts only; no context consumes them.

Notes on the patterns​

  • The only Anti-Corruption Layer toward the network. The network's "Checkout" is a different word for a smaller thing: turning a cart into a customer order. Rather than letting that word and its error shapes leak into the session, the adapter translates them at the edge: the place-order step, REQUOTE_REQUIRED, FAILED. The other network edge (GetDeliveryOffer) is a plain Open Host Service read.
  • Checkout is Customer to everything it calls. All six synchronous calls are checkout asking; nobody calls checkout except the BFF, which is the point of a saga orchestrator. As built, AI clients join the BFF as readers, never commanders: the MCP tool and the A2A skill are the one GetSession read.
  • No Shared Kernel. The service-tier enum and the offer shape are re-declared inside SessionGroup and RequotedOffer; offerId, priceQuoteId and authorizationId are values copied from messages.
  • Checkout consumes nothing. consumes is empty: the session learns every outcome from the synchronous answer of the call it just made, and Idempotency-Key replay turns an unknown answer into a known one.
  • Two events carry the saga forward. CheckoutCompleted is the only integration event; the cart closes and payments binds. The other four are analytics-only.
  • The network never depends on the storefront. Checkout calls customer-ordering and delivery-promise; no network context calls a checkout route or consumes a checkout topic.
  • No warehouse-systems edge. Checkout never produces or consumes a warehouse.* topic (meta.hard_boundary).