Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Ordering

Creates durable Orders from a buyer's current basket, locks purchase-time pricing, and owns order lifecycle transitions from New to Completed or Cancelled.

Core DomainBusiness Critical

Business Purpose & Boundary

OrderingDomainv1.0.0OrderingCreates durable Orders from a buyer's current basket, locks purchase-time pricing, and owns order lifecycle transitions ...Ownercommerce-fulfillment-teamDiagramOpen docs is BookWorm’s Core bounded context for committed customer purchases (BuyerEntityv1.0.0BuyerRepresents a customer's ordering profile and delivery address within the Ordering bounded context.Ownercommerce-fulfillment-teamOpen docs, OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs, Order ItemEntityv1.0.0Order ItemChild entity within an Order capturing a purchased book identifier, positive quantity, and locked checkout-time unit pri...Ownercommerce-fulfillment-teamOpen docs) and their business lifecycle (New → Completed or Cancelled). It accepts checkouts by locking purchase-time pricing onto immutable order lines, maintains buyer profiles and delivery addresses, projects real-time order summaries, and orchestrates post-checkout basket cleanup and customer email triggers through Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs. Explicitly out of scope are pre-order mutable baskets (ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs), live catalog descriptions (CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs), external payment settlement, physical shipping execution, and email rendering or transport (PlatformDomainv1.0.0PlatformProvides cross-cutting capabilities for recurring scheduled triggers and durable, idempotent transactional email notific...Ownerplatform-engineering-teamDiagramOpen docs).

Warning

Only explicit Ordering commands transition an OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs‘s business status. Post-checkout orchestration retries, timeouts, and PlatformDomainv1.0.0PlatformProvides cross-cutting capabilities for recurring scheduled triggers and durable, idempotent transactional email notific...Ownerplatform-engineering-teamDiagramOpen docs email delivery outcomes never mark an order Completed or Cancelled.

Core Responsibilities & Capabilities

CapabilityOwning Service / AgentPrimary Entities
Order Creation & Lifecycle TransitionsOrder APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docsOrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs, Order ItemEntityv1.0.0Order ItemChild entity within an Order capturing a purchased book identifier, positive quantity, and locked checkout-time unit pri...Ownercommerce-fulfillment-teamOpen docs
Buyer & Delivery Address ManagementOrder APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docsBuyerEntityv1.0.0BuyerRepresents a customer's ordering profile and delivery address within the Ordering bounded context.Ownercommerce-fulfillment-teamOpen docs
Order Summary ProjectionsOrder APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docsOrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs
Post-Checkout Saga OrchestrationOrder OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docsOrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs

Cross-Domain Interactions (Context Map)

Neighboring DomainDirectionIntegration MechanismBusiness Data Exchanged
ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docsUpstream (Shopping → Ordering)Sync (gRPC)Customer basket book IDs and quantities fetched at checkout
CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docsUpstream (Catalog → Ordering)Sync (gRPC)Current unit and promotional prices locked onto Order ItemEntityv1.0.0Order ItemChild entity within an Order capturing a purchased book identifier, positive quantity, and locked checkout-time unit pri...Ownercommerce-fulfillment-teamOpen docs lines
ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docsDownstream (Ordering → Shopping)Async (Commands & Events)Place orderCommandv1.0.0Place orderShared Finance order-placement command consumed by Notification to render and submit a new-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs for basket cleanup; completion or failure outcome events
PlatformDomainv1.0.0PlatformProvides cross-cutting capabilities for recurring scheduled triggers and durable, idempotent transactional email notific...Ownerplatform-engineering-teamDiagramOpen docsDownstream (Ordering → Platform)Async (Commands)Order placement, completion, and cancellation email notification commands
Note

Checkout Consistency & Compensation: Concurrent checkout submissions are serialized using buyer-scoped distributed locking and request idempotency keys. If post-checkout basket cleanup fails after bounded retries, Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs issues a compensation command so Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs soft-deletes the order and suppresses confirmation emails.

Ubiquitous Language Highlights

  • Buyer: The named person associated with one or more orders, holding a delivery address distinct from ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs‘s customer identifier.
  • Order: The durable purchase record beginning in New and transitioning once to a terminal state (Completed or Cancelled).
  • Order Item & Order Total: Each line records a book identifier, positive quantity, and locked purchase-time price; the order total is strictly the sum of all line totals.
  • New / Completed / Cancelled: Explicit lifecycle states governing when orders are active versus terminally closed.

Architecture Visualizations

Ordering Context Overview

Checkout Handoff & Cleanup Interaction

Loading graph...