PostgreSQL 16 is the primary datastore for the Order Service.
The team already operates Postgres, and orders need multi-row transactions.
Technical specification
As it stood on 30 June 2025. See it today
Computed from 5 decision records. 7 decisions are in force, 1 superseded and 0 proposed.
Where order data lives and how it is kept consistent.
PostgreSQL 16 is the primary datastore for the Order Service.
The team already operates Postgres, and orders need multi-row transactions.
How records are keyed, and who is allowed to mint keys.
Primary keys are UUIDv7, generated by the application.
Time-ordered keys insert at the end of the index, and keep the client-side generation we already rely on.
The contract every client of the Order Service relies on.
The public API is REST over HTTPS with JSON request and response bodies.
Every consumer can call it without special tooling.
How the service knows who is calling it.
Partner systems authenticate with static API keys, rotated yearly.
Quickest route to onboarding the first three partners.
Browser users authenticate with server-side sessions and a secure cookie.
Simple, well understood, easy to revoke.
Session state is stored in Redis with a 14-day sliding expiry.
Shared across all Order Service instances.
How other services learn that an order has changed.
Domain events are published with PostgreSQL LISTEN/NOTIFY.
No new infrastructure; good enough for two consumers.
Every arrow is one arc in the linkbase, read straight from
links/supersession.xml. The ADR files themselves contain no links.
flowchart RL adr_0004_d1["ADR-0004"]:::live adr_0001_d2["ADR-0001 decision 2"]:::fossil adr_0004_d1 -- replaces --> adr_0001_d2
In force Superseded Proposed
Primary keys are UUIDv4, generated by the application.