Backend
System architecture & data modeling
How I'd structure the services, request flow, and data model behind a production-style e-commerce checkout — the kind of design that happens before a single UI pixel gets drawn.
Service architecture
Requests enter through a single gateway and fan out to focused services, each owning its own data. Orders hand off fulfillment asynchronously via a queue instead of blocking the checkout request.
Checkout request flow
A single checkout call, end to end: session validation, order creation, payment capture, and confirmation — with the order persisted as pending before payment even runs, so nothing is lost if a downstream call fails.
Core data model
The relational backbone: users place orders, orders contain line items, and each line item pins the product's price at time of purchase so later price changes don't rewrite order history.
