E-Shop Architecture

All labeled model states are shown. Enable scripts to switch between them.

AS-IS

Filters

Context Map

Which contexts and services depend on each other?

Context mapContext map of ecommerce · blueprint v2.8 covering the whole model (1 arch files): 7 bounded contexts, 0 outside the selection, 11 dependencies, 11 of them carrying derived contract traffic over 13 service-to-service edges. 2 cross-context policy binding(s), 2 of them named in the hover of 2 edge(s). 1 reaction(s) have an operation bound to no context and are in no hover.Context mapecommercewhole model · 1 arch file(s) · 7 context(s) · 8 service(s) · 11 dependencies · 0 outsideconformist · HTTP ×1 operation(s) · Reads a customer's standing discounts while an order is being created, and strikes every line price with what comes back (customers.QRY002). Conformist in the strict sense: the order service holds the discount shape this context publishes, field for field under the same names, translates nothing and enforces none of Customers' rules. Downstream because nothing in Customers knows the order flow exists or was shaped by it - it publishes no event, so this dependency is a read made at the moment it is needed and nothing else. It is the dependency that prices the shop. A read that fails is not treated as a failure: the order flow substitutes an empty discount set and carries on at full list price with nobody told (customers.ASM003, counted by customers.KPI001, and the wider case customers.FN001). conformist · MSG ×2 operation(s) · via inventory.stock-reserved, orders.submitted · queues inventory-events, orders-events · Consumes Stock Reserved. It is the trigger for Send Order Confirmation (orders.CMD002) and the only thing that moves an Order from submitted to confirmed, which is this context's only terminal state. · policy "confirm-on-stock-reserved" (owned by Orders) reacts to Stock Reserved from Inventoryconformist · MSG ×2 operation(s) · via inventory.stock-reserved, orders.submitted · queues inventory-events, orders-events · Consumes Order Submitted. Reserve Stock (inventory.CMD001) reacts to it, so every reservation this context makes originates in an Orders event. · policy "reserve-on-order-submit" (owned by Inventory) reacts to Order Submitted from Ordersconformist · HTTP ×2 operation(s) · Reads product and category data for browse, search, and product pages.conformist · HTTP ×4 operation(s) · Reads a customer's orders to render order history and order detail, and calls Create Draft Order and Submit Order when the shopper checks out. The storefront decides nothing about an order: it carries the intent and Orders applies every rule that governs it. conformist · HTTP ×1 operation(s) · Reads stock levels to show availability on the product page.conformist · HTTP ×7 operation(s) · Carries the shopper's own account acts to the context that owns them: registering, and correcting their details afterwards. It also reads the profile back to render it, and the discounts on it - the same read the order flow makes when it prices, called here by the person the discounts belong to. Conformist in the strict sense - the storefront adopts the customer model whole, adds no field of its own and enforces none of the validation, which belongs to Customers. The shopper never sees a customer id; the storefront holds it and every other context in this model receives it. conformist · HTTP·MSG ×3 operation(s) · via checkout.item-added · queues storefront-events · Reads the current cart to render the cart page and the header cart badge, calls Add to Cart when the shopper presses the button, and subscribes to Item Added to Cart so the badge and the cart page stay fresh without polling. The storefront sends the SKU and the quantity; the price the line is charged at is captured by Checkout, not by the page that displayed it (storefront.ASM003). conformist · HTTP ×5 operation(s) · Calls the catalog admin commands directly, with no staging copy in between (shop-admin.DC001). Conformist in the strict sense: the back office adopts Catalog's product and category model whole, adds no concept of its own to what it sends, and applies none of the rules - every one of them belongs to Catalog. conformist · HTTP ×3 operation(s) · Reads the whole order book, not one customer's slice of it, and moves an order to its next status with Set Order Status (orders.CMD004). This is the only place in the model where the shop writes to an order rather than the shopper doing it, and the only write this back office makes outside the catalog. Conformist: the status vocabulary is Orders', the transition rules are Orders', and this context adds neither. conformist · HTTP ×6 operation(s) · Reads a customer's record while an operator is handling a question about their order, reads the standing discounts on the same screen, and reads the whole customer list - once as the customer list, and once to put a name against the customer id an order carries. Read-only in this model, and that is now a statement with a date on it. The running shop also closes accounts from here, and customers.DC003 has decided closure belongs on the storefront under an admin role instead. This list is therefore not the whole of what the back office calls: the delete it still has is a surface the decision retires, held as customers.FN002 rather than declared here as though it were settled. BC004BC004SUPPORTCheckoutCheckoutServiceservices 1inbound 1outbound 0BC001BC001CORECatalogProductQueryServiceProductCatalogAdminServiceservices 2inbound 2outbound 0BC007BC007GENERICCustomersCustomerServiceservices 1inbound 3outbound 0BC003BC003SUPPORTInventoryInventoryServiceservices 1inbound 2outbound 1BC002BC002COREOrdersOrderServiceservices 1inbound 3outbound 2BC006BC006SUPPORTShopAdminShopAdminWebAppservices 1inbound 0outbound 3BC005BC005SUPPORTStorefrontStorefrontWebAppservices 1inbound 0outbound 5UDUDUDUDUDUDUDUDUDUDUDHTTP ×1MSG ×2MSG ×2HTTP ×2HTTP ×4HTTP ×1HTTP ×7HTTP·MSG ×3HTTP ×5HTTP ×3HTTP ×6
Legend

Context Map

  • conformist
  • U upstream (supplies) · D downstream (consumes)
  • HTTP·MSG ×n - derived from contracts
  • context kind - core · support · generic
  • Shop (7)
scroll to zoom · drag to pan

TO-BE: MIG009

Filters
Migration MIG009: Shipments becomes a bounded context

Context Map

Which contexts and services depend on each other?

Context mapContext map of ecommerce · blueprint v2.8 covering the whole model (2 arch files): 8 bounded contexts, 0 outside the selection, 12 dependencies, 12 of them carrying derived contract traffic over 14 service-to-service edges. 3 cross-context policy binding(s), 3 of them named in the hover of 3 edge(s).Context mapecommercewhole model · 2 arch file(s) · 8 context(s) · 9 service(s) · 12 dependencies · 0 outsideNot shown: 1 of 12 edge labels had no free spot beside its edge.conformist · MSG ×1 operation(s) · via inventory.stock-reserved · Consumes Stock Reserved. Prepare Shipment (delivery.CMD001) reacts to it, so every shipment this context opens originates in an Inventory event. It is a dependency of necessity rather than of design: the event this context wants is an order being confirmed, and Orders raises none (delivery.QN002, delivery.ASM001). · policy "prepare-on-stock-reserved" (owned by Shipments) reacts to Stock Reserved from Inventoryconformist · HTTP ×1 operation(s) · Reads a customer's standing discounts while an order is being created, and strikes every line price with what comes back (customers.QRY002). Conformist in the strict sense: the order service holds the discount shape this context publishes, field for field under the same names, translates nothing and enforces none of Customers' rules. Downstream because nothing in Customers knows the order flow exists or was shaped by it - it publishes no event, so this dependency is a read made at the moment it is needed and nothing else. It is the dependency that prices the shop. A read that fails is not treated as a failure: the order flow substitutes an empty discount set and carries on at full list price with nobody told (customers.ASM003, counted by customers.KPI001, and the wider case customers.FN001). conformist · MSG ×2 operation(s) · via inventory.stock-reserved, orders.submitted · queues inventory-events, orders-events · Consumes Stock Reserved. It is the trigger for Send Order Confirmation (orders.CMD002) and the only thing that moves an Order from submitted to confirmed, which is this context's only terminal state. · policy "confirm-on-stock-reserved" (owned by Orders) reacts to Stock Reserved from Inventoryconformist · MSG ×2 operation(s) · via inventory.stock-reserved, orders.submitted · queues inventory-events, orders-events · Consumes Order Submitted. Reserve Stock (inventory.CMD001) reacts to it, so every reservation this context makes originates in an Orders event. · policy "reserve-on-order-submit" (owned by Inventory) reacts to Order Submitted from Ordersconformist · HTTP ×2 operation(s) · Reads product and category data for browse, search, and product pages.conformist · HTTP ×4 operation(s) · Reads a customer's orders to render order history and order detail, and calls Create Draft Order and Submit Order when the shopper checks out. The storefront decides nothing about an order: it carries the intent and Orders applies every rule that governs it. conformist · HTTP ×1 operation(s) · Reads stock levels to show availability on the product page.conformist · HTTP ×7 operation(s) · Carries the shopper's own account acts to the context that owns them: registering, and correcting their details afterwards. It also reads the profile back to render it, and the discounts on it - the same read the order flow makes when it prices, called here by the person the discounts belong to. Conformist in the strict sense - the storefront adopts the customer model whole, adds no field of its own and enforces none of the validation, which belongs to Customers. The shopper never sees a customer id; the storefront holds it and every other context in this model receives it. conformist · HTTP·MSG ×3 operation(s) · via checkout.item-added · queues storefront-events · Reads the current cart to render the cart page and the header cart badge, calls Add to Cart when the shopper presses the button, and subscribes to Item Added to Cart so the badge and the cart page stay fresh without polling. The storefront sends the SKU and the quantity; the price the line is charged at is captured by Checkout, not by the page that displayed it (storefront.ASM003). conformist · HTTP ×5 operation(s) · Calls the catalog admin commands directly, with no staging copy in between (shop-admin.DC001). Conformist in the strict sense: the back office adopts Catalog's product and category model whole, adds no concept of its own to what it sends, and applies none of the rules - every one of them belongs to Catalog. conformist · HTTP ×3 operation(s) · Reads the whole order book, not one customer's slice of it, and moves an order to its next status with Set Order Status (orders.CMD004). This is the only place in the model where the shop writes to an order rather than the shopper doing it, and the only write this back office makes outside the catalog. Conformist: the status vocabulary is Orders', the transition rules are Orders', and this context adds neither. conformist · HTTP ×6 operation(s) · Reads a customer's record while an operator is handling a question about their order, reads the standing discounts on the same screen, and reads the whole customer list - once as the customer list, and once to put a name against the customer id an order carries. Read-only in this model, and that is now a statement with a date on it. The running shop also closes accounts from here, and customers.DC003 has decided closure belongs on the storefront under an admin role instead. This list is therefore not the whole of what the back office calls: the delete it still has is a surface the decision retires, held as customers.FN002 rather than declared here as though it were settled. BC001BC001CORECatalogProductQueryServiceProductCatalogAdminServiceservices 2inbound 2outbound 0BC004BC004SUPPORTCheckoutCheckoutServiceservices 1inbound 1outbound 0BC007BC007GENERICCustomersCustomerServiceservices 1inbound 3outbound 0BC003BC003SUPPORTInventoryInventoryServiceservices 1inbound 3outbound 1BC002BC002COREOrdersOrderServiceservices 1inbound 3outbound 2BC008BC008SUPPORTShipmentsShipmentServiceservices 1inbound 0outbound 1BC006BC006SUPPORTShopAdminShopAdminWebAppservices 1inbound 0outbound 3BC005BC005SUPPORTStorefrontStorefrontWebAppservices 1inbound 0outbound 5UDUDUDUDUDUDUDUDUDUDUDUDHTTP ×1MSG ×2MSG ×2HTTP ×2HTTP ×4HTTP ×1HTTP ×7HTTP·MSG ×3HTTP ×5HTTP ×3HTTP ×6
Legend

Context Map

  • conformist
  • U upstream (supplies) · D downstream (consumes)
  • HTTP·MSG ×n - derived from contracts
  • context kind - core · support · generic
  • Shop (8)
Changes from selected baseline
  • + Added (outline)
scroll to zoom · drag to pan
Applied migrations: MIG005, MIG009 (shipments-becomes-a-bounded-context).

shipments-becomes-a-bounded-context (MIG009) · computed from MIG005, MIG009

Comparing TO-BE at MIG009 (shipments-becomes-a-bounded-context) with AS-IS.

28 model changes.

25 model changes are outside this view.

  • + Added: BC008: Shipments
  • + Added: SVC009: ShipmentService
  • + Added: .migrations-009-shipments-becomes-a-bounded-context.migration.yaml-Shipments--context_depends_on--default-eshop.arch.yaml-.Inventory: context_depends_on: BC008: Shipments → BC003: Inventory