logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·31.10.26
← Back to news

The Twelve-Factor App

Original article
12factor.net|107 points|53 comments|by jxmorris12|Aug 27, 2026

Understanding the Twelve-Factor App

In the current technological landscape, software is predominantly delivered as a service—commonly referred to as web apps or Software-as-a-Service (SaaS).

The Methodology

The Twelve-Factor App is a strategic framework designed for building SaaS applications. Its primary objectives are to ensure that software is:

  1. Automated via Declarative Formats: This reduces the overhead and time×cost\text{time} \times \text{cost}time×cost associated with onboarding new engineers.
  2. OS-Agnostic: By maintaining a strict contract with the underlying operating system, the app achieves maximum portability across different environments.
  3. Cloud-Ready: Designed for modern cloud platforms, removing the necessity for traditional server management and dedicated systems administration.
  4. Consistent Across Environments: By minimizing the gap between development and production, teams can achieve continuous deployment and higher agility.
  5. Scalable: The architecture allows for growth without requiring fundamental changes to the codebase or tooling.

Summary of Goals and Benefits

GoalPrimary Benefit
Declarative Setup↓\downarrow↓ Onboarding Time
Clean OS Contract↑\uparrow↑ Portability
Cloud Native↓\downarrow↓ SysAdmin Overhead
Dev/Prod Parity↑\uparrow↑ Deployment Agility
Seamless Scaling↓\downarrow↓ Architectural Friction

Context and Origins

The authors of this methodology drew from their direct experience developing hundreds of applications and their indirect observation of hundreds of thousands of apps through the Heroku platform.

This framework is a synthesis of real-world observations of SaaS applications in production. It aims to triangulate the "ideal" path for development, focusing on how apps grow organically, how developers collaborate, and how to prevent the inevitable decay known as software erosion.

The goal is to establish a shared technical vocabulary to describe systemic development problems and provide conceptual blueprints for their solutions. The structural approach is heavily influenced by the work of Martin Fowler, specifically his texts on Refactoring and Patterns of Enterprise Application Architecture.

Cloud Architecture Concept

Core Principles (Partial List)

The methodology is language-agnostic and works regardless of the backing services (e.g., Redis, PostgreSQL, RabbitMQ) utilized.

  • I. Codebase: A single repository tracked in version control (e.g., git) that maps to many deployment instances.
  • II. Dependencies: Isolate and explicitly define all dependencies; do not rely on implicit system-wide packages.
  • III. Backing Services: Treat all external resources (databases, caches) as attached resources.
  • IV. Build, Release, Run: Maintain a strict separation between the build stage, the release stage, and the execution stage.
  • V. Processes: The application must run as one or more stateless processes.
  • VI. Disposability: Ensure fast startup and graceful shutdowns to maximize robustness.
  • VII. Dev/Prod Parity: Keep the development, staging, and production environments as identical as possible.
  • VIII. Admin Processes: Execute administrative or management tasks as one-off processes.

Example: Declarative Dependency Management

Instead of manually installing packages on a server, a twelve-factor app uses a manifest:

# Example dependency declaration
dependencies:
  - name: postgres-client
    version: 13.0
  - name: redis-server
    version: 6.2