Architecture Decision Records (ADRs)
The decision log for DemozPay's engineering choices.
Why ADRs?
Six months from now, someone — maybe you — will ask "wait, why did we pick PostgreSQL over MongoDB?" or "why is the ledger a separate service?" ADRs answer that, in writing, with the alternatives we considered. They are the difference between "we just did it" and "here's the reasoning."
When to write one
Write an ADR when you make a decision that:
- Affects more than one team or codebase area, OR
- Locks in a choice that is expensive to reverse, OR
- Will be questioned later by people who weren't in the room.
If a decision is reversible in an afternoon, you probably don't need an ADR. If it's a 3-month migration to undo, you do.
Template
# ADR-NNN: <title in present tense>
- **Status:** Proposed | Accepted | Superseded by ADR-XXX
- **Date:** YYYY-MM-DD
- **Deciders:** name(s) or role(s)
## Context
What problem are we solving? What constraints exist?
## Decision
What we decided to do. One paragraph, plain language.
## Alternatives considered
- **Option A** — why we didn't pick it
- **Option B** — why we didn't pick it
## Consequences
- Positive: what this gives us
- Negative: what this costs us
- Follow-ups: what we now need to do
How to add one
- Copy the template above to
ADR-NNN-<short-kebab-title>.md(next number in sequence). - Fill it in.
- Open a PR. ADRs get reviewed like code.
- Once merged, status becomes Accepted.
- If a later decision supersedes this one, update the status to
Superseded by ADR-XXXand leave the old file in place — never delete ADRs.