Design Patterns & Architecture Study
Original study notes, runnable examples, and architecture tutorials.
Inspiration: refactoring.guru catalog and GeeksforGeeks catalog (coverage only — all prose, diagrams, and code here are original). See CONTRIBUTING.
Single source of truth: all study content lives under
content/— see content/MAPPING.md for the symlink map (patterns/,architecture/,principles/,practice/at root and underdocs/are views ontocontent/).
1. Design Patterns
Per-pattern study pages grouped by category, plus a unified selection guide.
- Creational (5): Factory Method · Abstract Factory · Builder · Prototype · Singleton — overview: Creational
- Structural (7): Adapter · Bridge · Composite · Decorator · Facade · Flyweight · Proxy — overview: Structural
- Behavioral (11): Chain of Responsibility · Command · Interpreter · Iterator · Mediator · Memento · Observer · State · Strategy · Template Method · Visitor — overview: Behavioral
- Each pattern page now includes its complex scenario, edge cases, and expanded anti-pattern guidance (merged from the former depth pages).
2. Architecture (Application / System)
Two tracks: how code is structured inside one project vs how services communicate at scale. Overview and decision guidance: architecture tutorial and selection guide §2.
- Application (6): Layered · Hexagonal · Onion · Clean · Vertical Slice · MVC / MVVM / MVP
- System (7): Monolithic · Modular Monolith · Microservices · Event-Driven · Serverless · SOA · CQRS & Event Sourcing
- Each architecture page now includes its complex scenario, edge cases, and expanded failure-mode guidance (merged from the former depth pages).
3. Principles
Study catalog of 110 principles across 11 categories — see principles index and selection guide §3.
- SOLID (1–5) · General Design (6–20) · Architecture (21–33) · Distributed Systems (34–52) · Performance (53–61) · Security (62–69) · Testing (70–77) · API (78–84) · Development (85–92) · Functional (93–100) · BEAM/OTP (101–110)
4. Practice
Capstone exercises combining patterns and architecture — see practice index.
- Resilient E-Commerce Order Pipeline · Concurrent Multi-Format Report Generator · Moderated Multi-Room Chat Router · Extraction-Ready Modular Monolith · Replayable Event-Driven Payments · Isolated Multi-Tenant SaaS
5. Guides
- Selection guide — patterns, architecture, and principles in one place (problem → 2–3 candidates + confused-pair tables)
- Contributing — originality rules and page templates
- GitHub Pages — local preview and deploy
Suggested study order
- Strategy, Observer, Factory Method — core vocabulary.
- Decorator, Adapter, Facade, Command, State.
- Builder, Abstract Factory, Composite, Iterator, Template Method.
- Layered, Monolithic — the baseline everything else reacts to.
- Vertical Slice, Modular Monolith — first escapes from pure layering.
- Hexagonal, Onion, Clean — ports, rings, and dependency rules as a group.
- Singleton, Bridge, Proxy, Chain of Responsibility, Mediator.
- Microservices, Event-Driven — distribution and async as a group.
- Prototype, Flyweight, Memento, Interpreter, Visitor.
- SOA, Serverless, CQRS & Event Sourcing — enterprise, functions, and data separation last.
Running examples
./run.sh elixir strategy # or dart / go / rust
./run.sh all # run all 92 examples
make run LANG=elixir PATTERN=strategy
make run-all
- Elixir:
cd examples/elixir/strategy && elixir main.exs - Dart:
cd examples/dart/strategy && dart main.dart - Go:
cd examples/go/strategy && go run main.go - Rust:
cd examples/rust/strategy && cargo run --quiet
Each pattern folder has the same scenario in all four languages.