C4 Architecture Documentation
C4 diagrams provide a shared mental model between product, engineering, security, and INFRA.
All diagrams are created using LikeC4
Required Diagrams
Section titled “Required Diagrams”C1 (Context) - Required
Section titled “C1 (Context) - Required”Shows the big picture:
- Actors interacting with the system
- External systems
- Data flows between systems
C2 (Container) - Required
Section titled “C2 (Container) - Required”Shows the high-level technical building blocks:
- Services and applications
- Databases and data stores
- Caches
- Protocols and ports
Optional Diagrams
Section titled “Optional Diagrams”C3 (Component) - Optional
Section titled “C3 (Component) - Optional”Useful when the service is non-trivial or modular:
- Internal components of a container
- How components interact
- Component responsibilities
C4 (Code) - Optional
Section titled “C4 (Code) - Optional”Recommended for critical code paths:
- Class diagrams
- Sequence diagrams
- State machines