DOCUMENTOVERVIEW

Orders system overview

How the orders system fits together — context, landscape, one module, one flow.

Context

SECTION 01 · C4 model

The orders system in its world

C4 · CONTEXT
C4 diagramPersonShopperSoftware SystemOrders systemExternal SystemPaymentsExternal SystemShipping123
1places orders2charges3notifies
PersonSoftware SystemExternal System

Landscape

SECTION 02 · Architecture

Services and backbone

ARCH
Layered architectureORDERS PLATFORMAppsBackboneStorefrontNext.jsOrders APIFargateEvent busmanagedorders-dbPostgres

One module — the API internals

SECTION 03 · Frontend logic

Orders API — the request chain

LOGIC
Module graphorders/apiEgress«controller»createOrderPOST /orders«service»OrderServicevalidate + place«repository»OrderRepopersist«gateway»PaymentGatewaychargeorders-dbPostgresPaymentsthird-party12345
1calls2saves3charges4SQL5HTTPS

One flow

SECTION 04 · Sequence
FLOW
Sequence diagramClientOrders APIPayments1POST /orders2charge3ok4201 Created