Order System
Internal system that creates and manages accepted customer Orders, preserving purchase-time items and prices while owning the Order business lifecycle.
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.
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 / Agent | Role in System | Primary Data Store | Interaction 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 docs | Exposes authenticated HTTP endpoints and SSE dashboards, snapshots checkout items, and publishes lifecycle events | Order 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 docs | Sync (HTTP/gRPC) & Async (Kafka) |
External Interactions & Trust Boundaries
- Customer & admin entry points: Authenticated requests enter via the API Gateway with Identity ProviderSystemv1.0.0Identity ProviderExternal identity infrastructure that authenticates BookWorm users and provides OAuth-compatible identity verification f...Ownerplatform-engineering-teamDiagramOpen docs JWT validation, per-user rate limiting, and required idempotency keys on state-changing order operations.
- Checkout enrichment: During order creation, 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 synchronously queries Cart SystemSystemv1.0.0Cart SystemInternal system that owns customer-scoped baskets throughout the pre-order journey, including basket management, Catalog...Ownercommerce-fulfillment-teamDiagramOpen docs for the customer’s basket and Product Catalog SystemSystemv1.0.0Product Catalog SystemInternal BookWorm system that owns catalog management, product discovery, and catalog search index ingestion within the ...Ownercatalog-experience-teamDiagramOpen docs for authoritative prices over internal gRPC.
- Post-checkout coordination: Publishes User checked outEventv1.0.0User checked outReports that an Order was placed and its checkout details are ready for Finance coordination. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs, Order completedEventv1.0.0Order completedReports that an Order transitioned from New to Completed. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs, and Order cancelledEventv1.0.0Order cancelledReports that an Order transitioned from New to Cancelled. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs to Finance SystemSystemv1.0.0Finance SystemInternal BookWorm workflow system that coordinates post-checkout basket cleanup and order notifications through Durable ...Ownercommerce-fulfillment-teamDiagramOpen docs over Kafka, and consumes basket-cleanup outcomes back from Finance.
- Buyer write locks & idempotency: Distributed locks and short-lived idempotency markers in 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 docs prevent duplicate checkouts and concurrent buyer mutations. - Event-sourced audit trail: Order domain events append to an event stream in Order DatabaseContainerv1.0.0Order DatabaseAuthoritative PostgreSQL system of record owned by the Ordering bounded context for buyers, accepted orders, purchase-ti...Ownercommerce-fulfillment-teamDiagramOpen docs to support order history and summary views.
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.Related Documentation
- 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.