Twelve-Factor App Checklist for TPMs
In my previous post on TPM System Design. I talked about a checklist I use when reviewing design docs to ensure my programs follow the Twelve-Factor App methodology.
I figured I would share it here for other TPMs interested in adopting Twelve-Factor principles for system design.
Checklist
| Factor | Checklist | Pass Criteria |
|---|---|---|
| I. Codebase | Single repo with many deploys? | Git repo shared; libs for duplicates |
| II. Dependencies | Explicit manifests, no system reliance? | Lockfiles (e.g., package.json) enforced |
| III. Config | All in env vars? No code secrets? | Config external; vaults for secrets |
| IV. Backing services | Swappable via config (DBs, queues)? | Connection strings configurable |
| V. Build, release, run | Strict separation for rollbacks? | Immutable artifacts; release tagging |
| VI. Processes | Stateless for horizontal scale? | No local state; external sessions |
| VII. Port binding | Self-contained service export? | PORT env; no server provisioning |
| VIII. Concurrency | Process model for load handling? | Web/worker dynos; adaptive scaling |
| IX. Disposability | Fast start/shutdown (<10s)? | Lightweight containers; graceful SIGTERM |
| X. Dev/prod parity | Identical environments (time/tools/personnel)? | Same stacks; small gaps |
| XI. Logs | Streamed events, no app rotation? | Stdout to collectors (e.g., OpenTelemetry) |
| XII. Admin processes | One-offs as app processes? | Scripts via same runtime (e.g., db:migrate) |