Part 0 · 2 chapters · ~12 min

Resource Modelling

Starting from the consumer's use cases, domain nouns rather than tables, ownership and references, states as documented fields, non-CRUD actions, ephemeral resources such as quotes, naming conventions and field formats.

1

Resources, states and actions

Write three or four consumer stories before any endpoint: "the mobile app shows recent transfers with their status", "a partner creates a payout and is told when it lands". Each endpoint must serve one of them.

MODELLING RESOURCES FROM THE DOMAIN
nouns the business uses, their states, and the actions between them
customersaccountsper currencytransfersstate machinebeneficiariesquotesFX, expire in 30 sstatementsgenerated documents
swipe the figure sideways, or tap expand for full screen
1/5
domain nouns
Start from the nouns the business uses (customer, account, transfer, beneficiary, quote, statement), not from database tables. Tables change; the domain vocabulary is what clients understand.
nouns from the domain, not tablesthe vocabulary outlives the schema
2

Naming and formats

decisionconvention (pick one, everywhere)
casingsnake_case or camelCase for fields; plural nouns in paths (/transfers)
idsopaque strings with type prefixes (tr_8Jk2…), never sequential integers that leak volume
money{"amount": 1500000, "currency": "NGN"} in minor units (Trust course)
timeRFC 3339 UTC strings (2026-10-06T14:31:59Z); dates as YYYY-MM-DD
enumslowercase strings; clients must handle unknown values (new states appear)
nullsomit or null consistently; document which fields can be absent