|$ curl https://forge-ai.dev/api/markdown?path=docs/architecture
$cat docs/software-architecture-&-sdlc.md
updated Today·25-35 min read·published

Software Architecture & SDLC

ArchitectureSDLCPatternsBeginner to Advanced🎯Free Tools
Introduction

Software architecture is the set of structural decisions that shape how a system is organized, how its parts communicate, where data lives, and how the system evolves under change. The software development lifecycle (SDLC) is the process that takes an idea from requirements through design, implementation, testing, deployment, and maintenance.

These two concerns are inseparable. Architecture without lifecycle discipline becomes whiteboard fiction that never survives contact with production. An SDLC without architectural thinking ships features that cannot scale, cannot be secured, or cannot be changed without rewriting half the system.

This section teaches both: the major architectural styles you will encounter in production, the SDLC models that organize how teams deliver software, and — most importantly — the requirements that should drive every choice. Prefer HOW to apply a pattern, WHY it exists, and WHAT constraints justify it over memorizing diagrams.

You will leave with a shared vocabulary for ADRs, quality attributes, process gates, and pattern selection — usable whether you are a staff engineer designing a platform, a tech lead choosing Scrum vs Kanban, or an AI agent generating architecture proposals that must cite evidence.

info

Pair with System Design for distributed-systems depth and Architecture Roadmap for a staged learning path.
What Software Architecture Is (and Is Not)

Architecture is the set of decisions that are expensive to reverse: service boundaries, consistency models, data ownership, trust boundaries, and deployment topology. Framework choice, folder naming, and library preference are design details unless they lock you into an irreversible path.

Good architecture creates options: the ability to change a database adapter, scale a hot path independently, or onboard a second team without a rewrite. Bad architecture creates accidental coupling — shared databases used as APIs, god modules, and undocumented temporal dependencies.

Architecture is…Architecture is not…
Decisions with high blast radiusEvery class diagram in the repo
Tradeoffs among quality attributesA single "best" stack for all products
Documented intent (ADRs, C4)Undocumented tribal knowledge
Evolvable under feedbackA frozen big-design-up-front blueprint
Aligned with team topologyCopy-pasted from a FAANG blog post
📝

note

Conway's Law: organizations design systems that mirror their communication structure. Architecture and team design co-evolve — ignore either and you get friction.
What the SDLC Is

The SDLC is the organized sequence of activities that turn stakeholder needs into running, maintained software. Classic textbooks list phases; modern teams still perform the same kinds of work — they just overlap them in time and automate the repetitive gates.

Requirements

Discover who needs what, why, and how success is measured. Separate functional behavior from quality attributes (NFRs). Produce acceptance criteria and prioritized backlogs.

Design

Translate requirements into structure: APIs, data models, module boundaries, threat models, and ADRs. Spike risky unknowns before committing.

Implementation

Build vertical slices that prove the architecture. Keep fitness functions and contract tests in the same PR pipeline as feature code.

Testing

Verify behavior and NFRs: unit, integration, contract, E2E, performance, security. Shift-left means catching defects where they are cheapest to fix.

Deployment

Release safely with automation, progressive delivery, feature flags, and known rollback paths. Deployment is a product capability, not a hero weekend.

Maintenance

Operate, observe, respond to incidents, pay down debt, and evolve architecture with production evidence — not conference fashion.

Feedback loops close the cycle: production metrics and incidents feed new requirements; failed tests feed design changes; customer research feeds prioritization. A lifecycle without feedback is Waterfall theater regardless of sprint names.

Architecture vs SDLC — How They Relate

Architecture answers structural questions: modular monolith or microservices? Sync APIs or events? Layered or hexagonal? SDLC answers process questions: Waterfall or Agile? Scrum or Kanban? When do we gate a release?

DimensionArchitectureSDLC
Primary questionHow is the system structured?How does the team deliver change?
Key artifactsADRs, C4 diagrams, module boundariesBacklog, sprint plan, release notes, DoD
Failure modeWrong boundaries, accidental complexityThrashing, late discovery, no feedback
Decision cadenceInfrequent, high-impactContinuous ceremonies and gates
Driven byNFRs, domain shape, team topologyRisk, regulation, market speed
Success signalChange is local, ops is calmPredictable delivery, learning rate

Architecture decisions typically crystallize during design phases but are validated (and sometimes reversed) during implementation, testing, and operations. Feedback from production — incidents, latency, cost — is an architectural input, not just an ops concern.

When Architecture Decisions Happen in the Lifecycle

Not every architectural choice belongs at the start. Evolutionary architecture deliberately postpones irreversible decisions until evidence exists — but some decisions are expensive to reverse and need early attention.

Lifecycle momentTypical decisionsReversibility
Requirements / discoveryQuality attributes, compliance envelope, consistency needsHigh — still on paper
High-level designMonolith vs services, data ownership, sync vs asyncMedium — costly after first release
Detailed design / spikePorts & adapters, messaging topology, CQRS necessityMedium — spikes reduce risk
ImplementationModule boundaries, API contracts, schema evolutionDepends on coupling
Testing / hardeningSLOs, chaos experiments, fitness functionsAdjustments, not rewrites
Deploy / operateRuntime topology, autoscaling, platform choicesOperational levers
Maintenance / growthExtract services, introduce EDA, retire debtPlanned migrations

best practice

Write an Architecture Decision Record (ADR) when a choice is costly to reverse, contested, or constrains future options. Link the ADR to the requirements that justified it.

Early decisions that usually deserve ADRs: consistency model (strong vs eventual), tenancy model (single vs multi), trust boundary (where authn/z lives), and whether the first deployable is a modular monolith or a set of services.

Late decisions that should stay flexible: concrete message broker brand, ORM, CSS framework, and hosting region — unless compliance freezes them. Prefer ports & adapters so these choices remain replaceable.

Topic Map

Work through these topics in order if you are new, or jump to the pattern matching your current decision.

1. Foundations

Mastery curriculum · SDLC phases · Requirements engineering — how work is organized and what drives structure.

2. Process models

Waterfall · Agile / Scrum · Kanban · DevOps — choose how the team flows work.

3. Structural styles

Modular monolith · Layered / N-tier · Hexagonal / Clean — organize a single deployable thoughtfully.

4. Distributed styles

Microservices · Event-driven · CQRS & event sourcing · Serverless — when distribution earns its cost.

5. Decision & craft

Choosing guide · Best practices — decision tables, ADRs, C4, fitness functions.

Requirements Drive Architecture

The most common architecture failure is pattern tourism: adopting microservices because a conference talk praised them, or event sourcing because it sounds advanced. Every style below exists to satisfy a class of requirements — and imposes costs that only make sense when those requirements are real.

Requirement signalArchitectural leanAvoid if…
One product, one team, evolving domainModular monolithYou need independent deploy per subdomain
Strict layering for junior teams / auditsLayered / N-tierDomain logic is the hard part (prefer hexagonal)
Swap DBs / UIs / vendors without rewriteHexagonal / ports & adaptersSimple CRUD with stable tech
Independent scale, team autonomy, polyglotMicroservicesTeam < ~8 or unclear boundaries
Decoupled producers, fan-out, audit streamEvent-drivenStrong consistency + simple CRUD
Divergent read/write models, audit trailCQRS ± event sourcingUniform CRUD and low complexity
Spiky load, pay-per-use, minimal opsServerless / FaaSLong CPU jobs, hard latency floors
📝

note

Deep dive: Requirements Engineering maps functional and non-functional requirements to concrete architectural implications.

Functional requirements tell you what the system must do (place order, reset password, generate invoice). Non-functional requirements tell you how well (p99 latency under 200ms, RPO under 5 minutes, WCAG 2.2 AA). Architecture is primarily shaped by the NFRs and by constraints: team size, budget, existing systems, and regulation.

When stakeholders say "make it scalable," translate that into measurable quality attributes before choosing microservices. Scalability of what? By how much? At what cost ceiling? The requirements page shows how to do that translation.

SDLC Models at a Glance

Classic phases still describe the kinds of work that must happen, even when Agile collapses them into iterations. Process models differ in how they sequence work, how they handle change, and what artifacts they demand at gates.

ModelBest whenRisk if misapplied
WaterfallFixed scope, heavy regulation, clear specsLate discovery; change is expensive
Agile / ScrumEvolving product, frequent feedbackCeremony without learning; sprint theater
KanbanFlow/ops work, uneven arrival rateNo WIP limits → invisible multitasking
DevOps cultureNeed fast, safe production changeTooling without ownership or CALMS

Waterfall sequences phases rigidly. Agile iterates them in short cycles. Kanban optimizes flow across them. DevOps collapses build/test/deploy into continuous pipelines and shared ownership of production outcomes.

Common Mistakes
  • Choosing microservices before domain boundaries are understood — distributed monolith with extra latency.
  • Skipping NFRs until "later" — later means a rewrite under incident pressure.
  • Confusing Scrum events with Agile outcomes — velocity theater without customer feedback.
  • Treating architecture as a one-time phase instead of continuous decision-making with ADRs.
  • Copying another company's architecture without copying their scale, team size, or compliance reality.
  • Optimizing for hypothetical future scale while ignoring current delivery speed and operability.

danger

If you cannot state the requirements that justify a pattern, you are not ready to adopt it. Pause and write the requirements first.
How to Use This Section

For humans: start with How to Master Architecture & SDLC, then study requirements before any pattern page. Use Choosing Architecture & SDLC when facing a real decision.

For AI agents: fetch markdown via ?format=md or /api/markdown?path=.... Do not claim mastery from titles. After each stage, produce an ADR, a C4 context/container sketch, or a decision table that cites requirements — then self-critique against the page checklists.

fetch-architecture.sh
Bash
1# List architecture paths available as markdown
2curl -s "https://forgelearn.dev/api/markdown?list=true" | grep architecture
3
4# Fetch a page as markdown (agents: prefer full content)
5curl -sL "https://forgelearn.dev/docs/architecture/requirements?format=md"

warning

Architecture advice without stated requirements is cargo cult. Always list the functional needs, NFRs, team constraints, and compliance envelope before recommending a style.

Community

Get help on Slack, Discord or VIP

Stuck on a guide? Join the community and ask.