Project method
The 21-step design method
Every project follows this exact sequence. Simple projects cover each step briefly; advanced projects go deeper. High-level design comes before detailed API and database design, so the details serve a chosen structure. This is a teaching order: real design work loops back as decisions change.
A. Understand (steps 1–5)
1. Business problem and stakeholders. What problem, for whom, why now; stakeholders and their priorities; business goals and success metrics (→ 17).
2. Functional requirements. What the system does, as testable statements; must-have separated from out-of-scope (→ 15).
3. Non-functional requirements. Measurable acceptance criteria: availability (%), latency (p50/p99), throughput, consistency needs, durability, security and compliance, cost ceiling (→ 16).
4. Scope, assumptions and constraints. Explicit in/out of scope; assumptions marked by which would change the design if wrong (→ 17).
5. User journeys and workflows. The main journeys end to end, including the unhappy paths: failures, cancellations, retries (→ 18).
B. Size (step 6)
6. Capacity and workload estimation. Users → QPS (mean, peak, burst), read/write ratio, storage growth, bandwidth, user geography, cache working set — arithmetic shown, assumptions stated (→ 19, 20).
C. Shape (steps 7–9)
7. Domain model and data ownership. Entities, value objects, aggregates, invariants; bounded contexts if more than one; which component owns which data (→ 54–56, 81).
8. High-level design and component boundaries. Component diagram (C4 container level → 45): services or modules, stores, queues, caches, external systems — and why each boundary is where it is (→ 145).
9. Critical request and event flows. The top three workflows traced through the components: sequence diagrams for the hardest paths (→ 46).
D. Detail (steps 10–12)
10. API and event contract design. Contract-first (→ 36): operations, protocol choice (→ 31–33, 40), request and response shapes, pagination (→ 37), versioning (→ 35), idempotency keys where retries occur (→ 38), event schemas (→ 34).
11. Database schema and storage design. Store selection with justification (→ 62), schema, indexes derived from query patterns (→ 64), lifecycle rules (→ 81), partitioning or sharding only if the step-6 numbers demand it (→ 73).
12. Low-level design. Inside the critical components: key modules, algorithms, state machines (→ 46).
E. Harden (steps 13–16)
13. Consistency and concurrency. Consistency level per data item (→ 129); races and their resolution (→ 71, 38, 116); outbox or saga where flows span stores (→ 118, 139).
14. Security and privacy. Threat model (→ 158); authentication and authorization (→ 39 or 159–163); data protection (→ 164–165); privacy and consent where personal data exists (→ 170).
15. Failure handling and resilience. Behavior when each dependency is down; timeout, retry, and circuit-breaker settings (→ 151–152); bulkheads and degraded modes (→ 153–154).
16. Scalability and performance. Scaling story per tier (→ 90–95); caching layers with invalidation strategy (→ 82–89); traffic control (→ 96–98); bottleneck analysis against the step-6 numbers (→ 103).
F. Ship and run (steps 17–20)
17. Testing and validation. Test strategy per level (→ 197–198); load and chaos plans against the step-3 targets (→ 199–200).
18. Deployment and infrastructure. Environments, compute choice (→ 179–184), IaC (→ 185), pipeline with security gates (→ 186), rollout strategy with verification and rollback-vs-roll-forward decided in advance (→ 187), flags (→ 188).
19. Observability and production operations. SLIs and SLOs (→ 203); dashboards and burn-rate alerts (→ 201–202); runbooks and readiness (→ 207).
20. Disaster recovery and operational procedures. RPO/RTO and the matching DR tier (→ 195); backup and restore testing (→ 80); recovery drills; the top three failure modes' runbooks.
G. Decide and review (step 21)
21. Alternatives considered (including the simpler option), cost and architecture review. For each contested decision: the options, the choice, the consequences — as ADRs (→ 57). The simpler alternative must appear and be rejected for a stated reason, or adopted. Monthly cost estimate (→ 208); what you would revisit at 10× scale; an honest list of weaknesses.