The Twelve Factors I. Codebase One codebase tracked in revision control, many deploys II. Dependencies Explicitly declare and isolate dependencies III. Config Store config in the environment IV. Backing services Treat backing services as attached resources V. Build, release, run Strictly separate build and run stages VI. Processes Execute the app as one or more stateless processes VII. Port binding Export services via port binding VIII. Concurrency Scale out via the process model IX. Disposability Maximize robustness with fast startup and graceful shutdown X. Dev/prod parity Keep development, staging, and production as similar as possible XI. Logs Treat logs as event streams XII. Admin processes Run admin/management tasks as one-off processes

I’m only interested in 12 factor app framework because of Reddit, shoutout reddit. This framework is incredibly important to read, I think that anyone working on software will likely touch a 12 factor app and thus the principles laid out in the post will very likely come in handy.

The 12 steps only apply to apps that qualify the need aspect. This includes the following 5 things:

The 12 steps are a guideline for building these apps, specifically for SaaS apps / web apps

1: Codebase

I like the mental division here: There is always a one-to-one correlation between the codebase and the app: If there are multiple codebases, it’s not an app – it’s a distributed system. Each component in a distributed system is an app, and each can individually comply with twelve-factor. Multiple apps sharing the same code is a violation of twelve-factor. The solution here is to factor shared code into libraries which can be included through the dependency manager.

2: Dependencies

Dependencies are tightly coupled and never rely on the underlying system It (12 factor ap) declares all dependencies, completely and exactly, via a dependency declaration manifest. Furthermore, it uses a dependency isolation tool.

Research more into these topics: dependency declaration and isolation

dependency declaration and isolation must always be used together – only one or the other is not sufficient to satisfy twelve-factor.