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

Read the architecture guide →

Internal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkout cleanup.

InternalHTTP + gRPCOpenAPI V1AsyncAPI V1

Service Responsibility & Boundary

Basket API 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 and Basket ItemEntityv1.0.0Basket ItemChild entry within a Basket pairing a Catalog book identifier with a positive requested quantity.Ownercommerce-fulfillment-teamOpen docs state 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 exposes authenticated HTTP endpoints for the storefront, serves internal gRPC 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 during checkout, enriches basket reads with live 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, and performs asynchronous post-checkout cleanup with 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 over Kafka.

Service Profile

PropertyValue
Bounded Context / DomainShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs
Owner TeamCommerce Fulfillment TeamTeamCommerce Fulfillment TeamStream-Aligned team owning customer shopping baskets, checkout coordination, order lifecycle, and financial saga orchest...Open docs
Runtime StyleREST API, gRPC Server/Client, and Async Kafka Consumer/Producer
Public / Gateway ExposureYes via API Gateway (HTTP) and Internal Only (gRPC)
Authentication & Authorization PolicyMicrosoft Entra ID JWT via Identity ProviderSystemv1.0.0Identity ProviderExternal identity infrastructure that authenticates BookWorm users and provides OAuth-compatible identity verification f...Ownerplatform-engineering-teamDiagramOpen docs; customer role with basket read/write scopes; basket owner derived strictly from token
Owned Data Store(s)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 (Redis key-value store, no SQL database)
Key Resilience / Idempotency Pattern24-hour message-ID idempotency guard, per-user rate limiting, and dead-letter routing on Basket Dead Letter QueueChannelv1.0.0Basket Dead Letter QueueKafka dead-letter topic owned by the platform team that captures Basket API messages after retry exhaustion or deseriali...Ownerplatform-engineering-teamOpen docs

Contracts & Data Ownership

Basket API stores only customer ID, book IDs, and positive quantities in 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. Basket updates replace the entire item collection rather than merging partial changes, and basket records are never used to reconstruct accepted orders.

Note

On read, Basket API batches distinct book IDs into a single gRPC lookup against 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 to attach current titles, regular prices, and sale prices. If Catalog returns no match for a book ID, the item remains in the response without inventing metadata.

Warning

Both Basket API and Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs consume Place orderCommandv1.0.0Place orderShared Finance order-placement command consumed by Notification to render and submit a new-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs on the same Kafka topic. When 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 retries on timeout, both consumers receive the retry.

Sends messages (4)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummaryChannels
Get book over gRPC
v1.0.0queryReturns one Catalog book by identifier through the book.v1 gRPC contract.
-
Get books over gRPC
v1.0.0queryReturns multiple Catalog books by identifier through the book.v1 gRPC contract.
-
Basket deletion completed
v1.0.0eventIndicates that Basket successfully deleted the submitted basket during checkout cleanup.
-
Basket deletion failed
v1.0.0eventIndicates that Basket could not delete the submitted basket during checkout cleanup.
-

Receives messages (6)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummaryChannels
Create basket
v1.0.0commandCreates a basket containing the supplied item identifiers and quantities.
-
Update basket
v1.0.0commandReplaces a basket's item collection with the supplied items.
-
Delete basket
v1.0.0commandDeletes the current basket.
-
Get basket
v1.0.0queryReturns the current basket and its item details.
-
Get basket over gRPC
v1.0.0queryReturns the current basket through the basket.v1 gRPC contract.
-
Place order
v1.0.0commandShared Finance order-placement command consumed by Notification to render and submit a new-order email.
-

Architecture Visualizations & Specifications

Basket API Context

Loading graph...

Service Interactions

Owned Entities

  • API and contracts indexCustom DocAPI and contracts indexConsolidated index of BookWorm HTTP v1, gRPC, AG-UI, MCP, A2A, and Kafka/Wolverine contracts grouped by service with aut...Ownerplatform-engineering-teamOpen doc — Consolidated HTTP, gRPC, and Kafka contract reference.
  • 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 — Redis key structure and durability characteristics.
  • 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.