Software Architecture Handbook

Purpose

Software architecture is the set of design decisions that shape a system and are costly to change.

This handbook defines the principles, patterns and decision frameworks that guide architectural work within this organization.

Architecture is not simply the structure of a system.

It is the reasoning behind that structure.

This document focuses on enduring architectural thinking that remains valuable regardless of technology stacks or deployment models.

Scope

This handbook covers:

Implementation-specific architectural guidance belongs in capability-specific handbooks (e.g., Rails Engineering, Security Engineering).

Principles

Architecture as Trade-offs

Every architectural decision involves trade-offs.

There are no perfect architectures.

There are only architectures that optimise for different outcomes.

Engineers should:

Align Architecture with Business Goals

Architecture exists to serve business outcomes.

Architectural decisions should be guided by:

An architecture that serves business goals is more valuable than one that is technically elegant.

Evolvability over Perfection

Systems evolve.

Architecture should anticipate change without attempting to predict it.

Prefer architectures that:

An evolvable architecture that exists is better than a perfect architecture that is never built.

Minimise Accidental Complexity

Architecture should solve essential complexity, not create accidental complexity.

Essential complexity arises from the domain.

Accidental complexity arises from the architecture itself.

When evaluating architectural choices, ask:

Prefer Simple Integration

Integration between components is a primary source of complexity.

Prefer:

Document Architectural Decisions

Undocumented architecture is invisible architecture.

Every significant architectural decision should be documented so that future engineers can understand:

See the ADR Template for the standard decision documentation format.

Architectural Patterns

Layered Architecture

Organise the system into horizontal layers, each with a specific responsibility.

LayerResponsibility
PresentationUser interaction and interface
ApplicationRequest handling and orchestration
DomainBusiness logic and rules
InfrastructureTechnical capabilities and persistence

Each layer depends only on the layer directly beneath it.

Use when:

Avoid when:

Hexagonal Architecture (Ports and Adapters)

Isolate core business logic from external concerns (databases, APIs, UIs) through ports (interfaces) and adapters (implementations).

The core domain has no dependency on external systems.

Use when:

Avoid when:

Event-Driven Architecture

Components communicate through events rather than direct calls.

Producers emit events without knowing which consumers will handle them.

Use when:

Avoid when:

Microservices Architecture

Compose the system from independently deployable services, each owning its own data and domain.

Use when:

Avoid when:

Decision Documentation

Architecture Decision Records

Every significant architectural decision should be recorded as an ADR.

An ADR answers:

ADR files are stored in the adr/ directory.

See the ADR Template for the standard format.

RFCs

Major architectural changes should follow the RFC process.

An RFC proposes a significant change and invites review before a decision is made.

RFC files are stored in the rfc/ directory (see the RFC template for the format).

Decision Log

The decision log provides a chronological index of all architectural decisions.

Each entry links to the corresponding ADR and summarises the decision and its context.

System Modeling

C4 Model

The C4 model provides a hierarchical approach to communicating architecture.

LevelViewAudience
1System ContextEveryone
2ContainerTechnical team
3ComponentDevelopers
4CodeDevelopers (detail)

Each level answers different questions about the system.

Diagrams should follow the C4 conventions and be stored in assets/diagrams/.

Event Modeling

Event modeling is a collaborative technique for designing systems driven by events and commands.

It is particularly useful for event-driven and microservices architectures.

Quality Attributes

Architecture must balance competing quality attributes.

AttributeConsideration
PerformanceResponse time, throughput, latency
ScalabilityAbility to handle increased load
AvailabilityUptime, fault tolerance, disaster recovery
SecurityAuthentication, authorisation, data protection
MaintainabilityEase of change, testing, and debugging
EvolvabilityAbility to adapt to new requirements
OperabilityMonitoring, deployment, incident response
TestabilityAbility to verify correctness at every level

Every architectural decision should explicitly consider its impact on relevant quality attributes.

Architecture Review

Architecture reviews ensure that decisions are sound, well-documented and aligned with principles.

Reviews should focus on:

See the Architecture Review Playbook for the complete review workflow.

AI Integration

AI in Architecture

AI can assist architectural work through:

AI Limitations

AI cannot replace architectural judgement.

Key limitations include:

Context for AI

When using AI for architectural work, provide:

See the AI Engineering Handbook for detailed AI workflow guidance.

Capability Map

This handbook is the entry point for the Software Architecture capability. The following documents form the complete capability:

Handbooks

Glossaries

Guides

Playbooks

Checklists

Templates

Learning Paths

References

AI Workflows

Related Documents