Skip to main content

Shopping Cart

Built on develop, not deployed

Derived from model/model.yaml. The shopping-cart service is built on develop (IQVO/shopping-cart at 95bc5bc, checked 2026-10-27) and not deployed (no warehouse-infra entry). Every Err... name, REST route and CloudEvents type of this context named on this page exists in the service; where the built service differs from the model's design, the page says so (As built) or the context's Service and operations section lists it.

Supporting

Shopping Cart (shopping-cart, code SC, tier storefront) holds a shopper's intent: cart lines (one per item, quantities merged), the destination postal prefix, the delivery quote delivery-promise returned for the cart (one group per shipment, with its offers and their expiry, plus the tiers that were unavailable), the shopper's tier selection per group, and a labelled, non-binding estimate (effective prices plus selected tier charges plus tax band) so the total cost is visible up front. The cart is guest-first: shopperId is optional (decision D4), and a signed-in shopper's carts can be merged. Every line or destination change clears the quote and the selections; the binding total is the checkout session's PriceQuote, never the estimate (gap S2). pricing owns the prices, charges and tax bands the estimate is computed from; the cart never calls pricing synchronously — it follows its events.

This context's pages​

PageWhat it holdsddd-crew tool it follows
Business ContextThe problem, actors, decisions, relation to real storefronts, out of scope(narrative)
Ubiquitous LanguageTerms, code identifiers, terms not to confuseBounded Context Canvas (UL section)
Core Domain ChartWhy this context is SupportingCore Domain Charts
Bounded Context CanvasPurpose, classification, roles, inbound and outbound messages, decisions, metricsBounded Context Canvas v5
Context MapEvery neighbour, direction and patternContext Mapping
Aggregate Design CanvasCart: states, invariants, commandsAggregate Design Canvas v1.1
Domain EventsPublished and consumed CloudEvents, with an example envelopeDomain Message Flow Modelling (message catalogue)
Domain Message FlowCart building, quoting and selecting delivery, price changes landing, checkoutDomain Message Flow Modelling
EventStormingProcess-level boards with hotspotsEventStorming glossary & cheat sheet
Use CasesOne section per command: trigger, flow, errors, events, idempotency(application layer, fleet convention)
Class DiagramDomain model and hexagonal ports and adapters (the model's design, with the as-built packages)(UML, fleet convention)
Entity RelationshipPostgres schema as built (migration 0001)(fleet convention)
Sequence DiagramsAdapter to Kafka for every command use case(UML, fleet convention)

Service and operations​

  • Service: IQVO/shopping-cart on develop (95bc5bc, 2026-10-27): binaries cmd/api; REST contract apis/openapi.yaml, event contract apis/asyncapi.yaml, schema in internal/adapters/outbound/postgres/migrations/ (see Entity Relationship). 5 ADRs, listed in the ADR index.
  • Configuration: mandatory at boot (the service exits naming the missing variable): DATABASE_URL, KAFKA_BROKERS, DELIVERY_PROMISE_URL, OFFER_AVAILABILITY_CONSUMER_GROUP, PRICING_CONSUMER_GROUP, CHECKOUT_CONSUMER_GROUP. There is no in-memory mode. Packaging: no Helm chart in the repo yet (charts/ is absent on develop).
  • Deployment: not deployed. warehouse-infra develop has no terraform/apps.yaml entry and no helm-values/shopping-cart.yaml, so no database, consumer group or gateway route is provisioned. The kind cluster was not checked in this refresh.
  • Observability: service ADR 0005, Adopt the fleet observability standard (logs, metrics, traces), Accepted (2026-10-26). Logs, metrics and traces leave over OTLP/gRPC (OTEL_EXPORTER_OTLP_ENDPOINT, code default localhost:4317; OTEL_SERVICE_NAME); a collector that is down only drops telemetry. The Tier-2 business counter is cart.lines.added (unit {line}, in internal/adapters/outbound/telemetry/cart_metrics.go), with attribute outcome = added or rejected and reason on the outcomes that are not a success. No warehouse-infra dashboard queries it yet.

Elsewhere​

  • REST contract: storefront/apis/shopping-cart/openapi.yaml (a copy of the service's spec on develop), rendered under the API reference.
  • The storefront-wide Context Map, Subdomain Classification and Ubiquitous Language.
  • The Model Gap Register tracks gap S1 (who maps quote groups to checkout lines: the cart's one-line-per-item rule and the quote's groups) and gap S2 (price change between cart and checkout: the estimate is labelled non-binding, the binding total is the checkout session's PriceQuote).
  • delivery-promise owns the offers the cart quotes and holds — a quote holds no capacity; offer-availability and pricing feed the cart's purchasability and estimate views; checkout reads the cart at session open and closes it on CheckoutCompleted.