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
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
| decision | convention (pick one, everywhere) |
|---|---|
| casing | snake_case or camelCase for fields; plural nouns in paths (/transfers) |
| ids | opaque strings with type prefixes (tr_8Jk2…), never sequential integers that leak volume |
| money | {"amount": 1500000, "currency": "NGN"} in minor units (Trust course) |
| time | RFC 3339 UTC strings (2026-10-06T14:31:59Z); dates as YYYY-MM-DD |
| enums | lowercase strings; clients must handle unknown values (new states appear) |
| nulls | omit or null consistently; document which fields can be absent |