Cart System
Internal system that owns customer-scoped baskets throughout the pre-order journey, including basket management, Catalog-backed item presentation, and checkout cleanup coordination.
System Purpose & Boundary
The Cart System owns transient, customer-scoped shopping BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs state throughout the pre-order journey within the ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs domain. It serves Customers creating, viewing, replacing, and clearing their active Basket ItemEntityv1.0.0Basket ItemChild entry within a Basket pairing a Catalog book identifier with a positive requested quantity.Ownercommerce-fulfillment-teamOpen docs selections. Product metadata and pricing (CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs), accepted order history (OrderingDomainv1.0.0OrderingCreates durable Orders from a buyer's current basket, locks purchase-time pricing, and owns order lifecycle transitions ...Ownercommerce-fulfillment-teamDiagramOpen docs), 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.
Basket DatabaseContainerv1.0.0Basket DatabaseAuthoritative Redis key-value store owned by the Shopping bounded context for customer-scoped pre-checkout shopping bask...Ownercommerce-fulfillment-teamDiagramOpen docs is authoritative only for active pre-order shopping intent—never for reconstructing accepted orders. Basket updates replace the entire item list rather than merging partial edits, and read responses enrich items with live Catalog titles and prices.
Contained Capabilities
| Service / Agent | Role in System | Primary Data Store | Interaction Style (Sync / Async) |
|---|---|---|---|
| Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | Serves customer HTTP basket endpoints, internal gRPC basket snapshots, and post-checkout cleanup handlers | Basket DatabaseContainerv1.0.0Basket DatabaseAuthoritative Redis key-value store owned by the Shopping bounded context for customer-scoped pre-checkout shopping bask...Ownercommerce-fulfillment-teamDiagramOpen docs | Sync (HTTP/gRPC) & Async (Kafka) |
External Interactions & Trust Boundaries
- Customer entry point: Authenticated customers manage their own basket through the API Gateway, with ownership derived strictly from the Identity ProviderSystemv1.0.0Identity ProviderExternal identity infrastructure that authenticates BookWorm users and provides OAuth-compatible identity verification f...Ownerplatform-engineering-teamDiagramOpen docs token.
- Catalog & Ordering sync calls: Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs batch-resolves book titles and prices from Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs over gRPC on read, and serves basket snapshots to 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 over gRPC during checkout.
- Post-checkout cleanup: Consumes Place orderCommandv1.0.0Place orderShared Finance order-placement command consumed by Notification to render and submit a new-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs from 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 publishes Basket deletion completedEventv1.0.0Basket deletion completedIndicates that Basket successfully deleted the submitted basket during checkout cleanup. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs or Basket deletion failedEventv1.0.0Basket deletion failedIndicates that Basket could not delete the submitted basket during checkout cleanup. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs so Finance and Ordering can track cleanup outcomes.
- Read-time enrichment: Distinct book IDs are batched into a single Catalog lookup; missing catalog items remain in the basket response without inventing metadata. - Explicit cleanup outcomes: Reporting deletion success or failure explicitly prevents stale baskets from being reused after checkout.
System Visualizations
System Context
Cart Context
Component Topology
Architecture Decisions
Architecture Decision Records (5)
Decisions that apply to this Cart System. Search, filter by status, or sort by clicking a column.Related Documentation
- 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 basket cleanup flow.
- Checkout InteractionDiagramv1.0.0Checkout InteractionEnd-to-end checkout acceptance and independent basket cleanup, order email, and Finance timeout outcomes across Ordering...Ownercommerce-fulfillment-teamOpen diagram — Interaction between Shopping, Ordering, and Finance.
- domains/bookworm/subdomains/shopping/engineering/basket-api-contracts — Basket API contracts and boundaries.
- domains/bookworm/subdomains/shopping/guides/checkout-lifecycle — Pre-order to checkout handoff guide.