Skip to main content

Context Map

Generated from the model

This page is generated from model/model.yaml by scripts/gen_pages.py. Edit the model, then regenerate; CI fails when the page and the model disagree.

Following the ddd-crew Context Mapping notation. On every edge, U is upstream and D downstream; the pattern names how the downstream relates to the upstream's model: OHS Open Host Service, PL Published Language, CF Conformist, ACL Anti-Corruption Layer, C/S Customer/Supplier. Thick arrows are Kafka events (CloudEvents 1.0), thin arrows synchronous calls. The storefront is in-org with the retail network (decision D1): it may consume retailnetwork.* topics and call the network's OHS storefront routes, and the network never depends on the storefront (no network context consumes a storefront topic or calls a storefront route). The storefront never calls an in-org or restricted network route (GET /orders/{id}/ship-to, POST /promises, promise :confirm / :cancel, POST /inventory-feeds, policy routes).

The seam to the retail network​

Derived from: model.yaml → contexts[*].consumes (network producers), contexts[*].sync_calls (network targets), external. The experience layer (storefront-bff, storefront-web) is not a bounded context: the browser reaches only the BFF under /api/storefront (the Storefront Edge), and the BFF composes the six contexts and the network OHS routes.

Inside the storefront​

Derived from: model.yaml → contexts[*].publishes[*].consumers, contexts[*].sync_calls, contexts[*].inbound[*].relationship. Omitted: analytics-only events, which have no integration consumer.

Every edge​

UpstreamDownstreamPatternEvents (Kafka)Synchronous calls
checkoutcustomer-paymentsC/SCheckoutCompleted-
checkoutshopping-cartC/SCheckoutCompleted-
customer-orderingcheckoutACL + OHS-cmd PlaceOrder (REST POST /checkout)
customer-paymentscheckoutC/S-cmd AuthorizePayment (REST POST /payment-authorizations); cmd VoidAuthorization (REST POST /payment-authorizations/{authorizationId}/voids)
delivery-promisecheckoutOHS-qry GetDeliveryOffer (REST GET /delivery-offers/{offerId})
delivery-promiseshopping-cartOHS-qry QuoteDeliveryOffers (REST POST /delivery-quotes)
offer-availabilitypricingCFCatalogItemCreated, CatalogItemDiscontinued-
offer-availabilityproduct-contentCFCatalogItemCreated, CatalogItemDiscontinued-
offer-availabilityproduct-discoveryC/S + CF + OHS + ops-onlyCatalogItemCreated, CatalogItemDiscontinued, ListingCreated, ListingAvailabilityChanged, ListingSuppressed, ListingRestoredqry ListCatalog (REST GET /catalog); qry ListListings (REST GET /listings?nodeId=&catalogItemId=)
offer-availabilityshopping-cartCFCatalogItemCreated, CatalogItemDiscontinued-
order-sourcingcustomer-paymentsCFFulfillmentShipped, FulfillmentCancelled, FulfillmentUnsourceable-
pricingcheckoutC/S-cmd IssuePriceQuote (REST POST /price-quotes)
pricingproduct-discoveryC/S + CFItemPriceChanged, ItemPriceWithdrawnqry ListItemPrices (REST GET /item-prices)
pricingshopping-cartC/SItemPriceChanged, ItemPriceWithdrawn, DeliveryChargeScheduleChanged, TaxTableChanged-
product-contentproduct-discoveryC/S + CFProductContentPublished, ProductContentRetired, CategoryTreePublishedqry ListProductContents (REST GET /product-contents); qry ListCategories (REST GET /categories)
shipping-and-trackingcustomer-paymentsCFPackageLost, PackageReturned-
shopping-cartcheckoutC/S-qry GetCart (REST GET /carts/{cartId})
customer-paymentspayment-provider (external)ACLnoneprovider port: Authorize, Capture, Void, Refund, Reauthorize

Why these patterns​

  • offer-availability → storefront consumers is Conformist (Published Language). Network item and listing facts are taken as is; only catalogItemId is the join key.
  • delivery-promise → shopping-cart is OHS / PL, Conformist. The quote contract is open to any client; the cart stores what the quote returned.
  • customer-ordering → checkout is OHS + ACL. The checkout ACL translates the network's "Checkout", offer-not-quotable and requotedOffers into storefront terms (place-order step, requote required).
  • order-sourcing, shipping-and-tracking → customer-payments is Conformist. Shipment, cancellation, lost and returned facts drive capture, release and refund.
  • pricing → cart, discovery and checkout is Customer/Supplier. Same domain, negotiated contract.
  • customer-payments → payment-provider is ACL. The provider vocabulary stays in one adapter package; the storefront never sees a card number.
  • Sibling data used in a decision is a local, event-fed read model. Synchronous calls exist only where a user request needs an answer, plus the declared ops-only bootstrap reads of product-discovery.