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

Read the architecture guide →

Internal BookWorm workflow system that coordinates post-checkout basket cleanup and order notifications through Durable Task Scheduler; it does not process payments.

Internal

System Purpose & Boundary

The Finance System coordinates post-checkout basket cleanup, bounded retry timers, and order lifecycle notification requests 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 reacts to checkout and order-status events emitted by Order SystemSystemv1.0.0Order SystemInternal system that creates and manages accepted customer Orders, preserving purchase-time items and prices while ownin...Ownercommerce-fulfillment-teamDiagramOpen docs and orchestrates follow-up actions across Cart SystemSystemv1.0.0Cart SystemInternal system that owns customer-scoped baskets throughout the pre-order journey, including basket management, Catalog...Ownercommerce-fulfillment-teamDiagramOpen docs and Notification SystemSystemv1.0.0Notification SystemInternal platform system that consumes order commands, renders email templates, and submits messages over SMTP. Ownerplatform-engineering-teamDiagramOpen docs. Authorizing or settling payments, exposing customer-facing APIs, and owning authoritative Order status are explicitly out of scope.

Warning

Despite its name, the Finance System does not process payments or own Order truth. Order SystemSystemv1.0.0Order SystemInternal system that creates and manages accepted customer Orders, preserving purchase-time items and prices while ownin...Ownercommerce-fulfillment-teamDiagramOpen docs remains the sole authority for Order aggregates and business status (New, Completed, Cancelled). Finance orchestration timeouts or cancellations never automatically cancel an Order in Ordering.

Contained Capabilities

Service / AgentRole in SystemPrimary Data StoreInteraction Style (Sync / Async)
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 docsRuns one durable saga instance per Order to coordinate basket cleanup retries and lifecycle email commandsAzure Durable Task SchedulerAsync (Kafka triggers & publishers)

External Interactions & Trust Boundaries

System Visualizations

System Context

Component Topology

Architecture Decisions

Architecture Decision Records (7)

Decisions that apply to this Finance 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: Coordinate checkout with a persisted Order sagaAcceptedNov 3, 2026Finance uses Azure Durable Task Scheduler (DTS) keyed by Order ID to coordinate asynchronous checkout work without owning the Order aggregate.
ADR-002: Persist saga state and messages in Finance PostgreSQLSupersededNov 3, 2026Finance combines EF Core saga storage with Wolverine PostgreSQL envelope persistence and transaction integration in its own database.
ADR-003: Integrate through Kafka contracts correlated by Order IDAcceptedNov 3, 2026Finance exchanges environment-scoped integration messages through Kafka and partitions messages exposing OrderId by that identifier.
ADR-004: Bound placement retries with scheduled saga timeoutsAcceptedNov 3, 2026Finance uses Wolverine timeout messages and a persisted counter to bound placement-command reissues, cancelling only the saga on exhaustion.
ADR-005: Keep Finance workflow outcomes separate from Order statusAcceptedNov 3, 2026Finance reports cleanup outcomes and tracks its own saga lifecycle while Ordering remains authoritative for Order completion and cancellation.
ADR-006: Delegate email delivery through shared Finance commandsAcceptedNov 3, 2026Finance supplies order and recipient data through commands while Notification owns rendering, email persistence, and SMTP submission.
  • 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 and post-checkout coordination flow.
  • Order Lifecycle and Status TransitionsFlowv1.0.0Order Lifecycle and Status TransitionsCheckout creates a New Order owned by Ordering API, Finance coordinates post-order cleanup and notifications, and explic...Ownercommerce-fulfillment-teamView flowOpen docs — Order status transitions and saga separation.
  • domains/bookworm/subdomains/ordering/guides/02-understand-order-and-finance-status — Lifecycle separation between Order status and Finance orchestration.