service
Cart API

Cart API

The public-facing API for shopping carts. Handles commands to add and remove items and to check out, and publishes an event when a cart is checked out.

ServiceCart API

Overview

The Cart API is the front door to the Cart System. It validates incoming commands, persists cart contents to the Cart DatabaseCart DatabaseContainerv1.0.0PostgreSQL database that is the system of record for shopping carts and their items.MapView docs, asks the Promotion SystemPromotion SystemSystemv1.0.0Internal system that calculates the discounts and promotions that apply to a cart. It owns promotion rules and returns c...Ownershopping-platformMapView docs to calculate discounts via Calculate DiscountCalculate DiscountCommandv1.0.0Command to calculate the discount that applies to a cart. Ownershopping-platformSchemaMapView docs, and publishes a Cart Checked OutCart Checked OutEventv1.0.0Published when a customer has checked out their cart. Ownershopping-platformSchemaMapView docs event when the customer checks out.

Sends 2 messages

Checkout event and discount requests

Receives 3 messages

Cart commands handled by this service

Responsibilities

AreaDescription
Cart managementValidates and applies Add Item To CartAdd Item To CartCommandv1.0.0Command to add an item to a shopping cart. Ownershopping-platformSchemaMapView docs, Remove Item From CartRemove Item From CartCommandv1.0.0Command to remove an item from a shopping cart. Ownershopping-platformSchemaMapView docs and Checkout CartCheckout CartCommandv1.0.0Command to check out a shopping cart. Ownershopping-platformSchemaMapView docs.
DiscountsRequests pricing from the Promotion System via Calculate DiscountCalculate DiscountCommandv1.0.0Command to calculate the discount that applies to a cart. Ownershopping-platformSchemaMapView docs.
Event publishingEmits Cart Checked OutCart Checked OutEventv1.0.0Published when a customer has checked out their cart. Ownershopping-platformSchemaMapView docs when a cart is checked out.
PersistenceReads from and writes to the Cart DatabaseCart DatabaseContainerv1.0.0PostgreSQL database that is the system of record for shopping carts and their items.MapView docs (system of record).

Architecture diagram

Messages for this service

Sends messages (2)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
Cart Checked Out
v1.0.0eventPublished when a customer has checked out their cart.
Calculate Discount
v1.0.0commandCommand to calculate the discount that applies to a cart.

Receives messages (3)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
Add Item To Cart
v1.0.0commandCommand to add an item to a shopping cart.
Remove Item From Cart
v1.0.0commandCommand to remove an item from a shopping cart.
Checkout Cart
v1.0.0commandCommand to check out a shopping cart.
Event-driven architecture documentation: Acme Inc