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

Read the architecture guide →

Internal system that creates and manages accepted customer Orders, preserving purchase-time items and prices while owning the Order business lifecycle.

Internal

System Purpose & Boundary

The Order System owns accepted customer purchases, BuyerEntityv1.0.0BuyerRepresents a customer's ordering profile and delivery address within the Ordering bounded context.Ownercommerce-fulfillment-teamOpen docs profiles, and the authoritative OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs lifecycle (New, Completed, Cancelled) within the OrderingDomainv1.0.0OrderingCreates durable Orders from a buyer's current basket, locks purchase-time pricing, and owns order lifecycle transitions ...Ownercommerce-fulfillment-teamDiagramOpen docs domain. It serves Customers placing and tracking orders and Administrators managing fulfillment status and viewing backoffice dashboards. Mutable shopping 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 product catalog pricing (CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs), payment settlement, and post-checkout orchestration (Finance SystemSystemv1.0.0Finance SystemInternal BookWorm workflow system that coordinates post-checkout basket cleanup and order notifications through Durable ...Ownercommerce-fulfillment-teamDiagramOpen docs) are explicitly out of scope.

Note

At checkout, the Order System snapshots book quantities and active prices 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 records so future catalog edits never alter accepted orders. Soft deletion is separated from business status: failed basket cleanup soft-deletes the order record for auditability without changing its business status.

Contained Capabilities

Service / AgentRole in SystemPrimary Data StoreInteraction Style (Sync / Async)
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 docsExposes authenticated HTTP endpoints and SSE dashboards, snapshots checkout items, and publishes lifecycle eventsOrder DatabaseContainerv1.0.0Order DatabaseAuthoritative PostgreSQL system of record owned by the Ordering bounded context for buyers, accepted orders, purchase-ti...Ownercommerce-fulfillment-teamDiagramOpen docs, Order Cache and Distributed LocksContainerv1.0.0Order Cache and Distributed LocksRedis-backed coordination and caching slice owned by the Ordering bounded context for buyer-scoped creation locks, HTTP ...Ownercommerce-fulfillment-teamDiagramOpen docsSync (HTTP/gRPC) & Async (Kafka)

External Interactions & Trust Boundaries

System Visualizations

System Context

Component Topology

Architecture Decisions

Architecture Decision Records (4)

Decisions that apply to this Order System. Search, filter by status, or sort by clicking a column.
Summary
ADR-004: Use Stripe-hosted Checkout with PCI DSS controlsProposedNov 5, 2026Propose Stripe as the payment gateway using hosted Checkout to keep card data outside BookWorm, with explicit merchant PCI DSS responsibilities and verified payment outcomes.
ADR-001: Use PostgreSQL as the Order system of recordAcceptedNov 3, 2026PostgreSQL is the authoritative store for Buyer profiles and accepted Orders; Redis and read projections do not own this business data.
ADR-002: Preserve the checkout-time purchase snapshotAcceptedNov 3, 2026Each accepted Order records the book identifiers, quantities, and prices selected at checkout so later Catalog changes do not rewrite the purchase.
ADR-003: Keep Order status separate from Finance saga stateAcceptedNov 3, 2026Ordering owns the Order's business status, while Finance owns checkout coordination state; basket cleanup outcomes do not implicitly complete or cancel an Order.
  • Order LifecycleDiagramv1.0.0Order LifecycleBusiness status lifecycle of an accepted Order showing creation in the New state and irreversible transitions to Complet...Ownercommerce-fulfillment-teamOpen diagram — Permitted order status transitions and saga separation.
  • User CheckoutFlowv1.0.0User CheckoutAn authenticated customer checks out a persisted basket through Ordering API; Finance coordinates asynchronous basket cl...Ownercommerce-fulfillment-teamView flowOpen docs — End-to-end checkout flow.
  • domains/bookworm/subdomains/ordering/engineering/01-order-consistency-and-data-ownership — Ordering consistency and ownership boundaries.
  • domains/bookworm/subdomains/ordering/guides/01-create-and-manage-orders — Guide for order creation and lifecycle management.