Interactive · Step-by-step
Learn software design, one animation at a time.
Each lesson takes a messy design, shows you why it hurts, then walks through the refactor step by step. Use → ← or the buttons to move through each idea at your own pace.
🗺️ See the roadmap — from result down to foundations →
Each track is a journey in order — e.g. DevOps: lego blocks → the services/apps built from them → deploy & run → scale & secure. Pick a track, then narrow by level.
Core principles
DRY
Don't Repeat Yourself — one source of truth. Watch duplicated logic drift into bugs.
⭐ PrincipleKISS
Keep It Simple — clever code is a cost. Compare a cryptic version to the obvious one.
⭐ PrincipleYAGNI
You Aren't Gonna Need It — stop building for imagined futures. Watch speculation add cost.
Design approaches · ways of working
TDD
Test-Driven Development — Red, Green, Refactor. Let failing tests drive the design.
⭐ApproachDomain-Driven Design
Model the domain in the experts' language — bounded contexts & aggregates.
ApproachSchema-Driven
One schema as the source of truth — generate types, validation, clients, docs.
ApproachData-Driven
Move business rules into data; a small engine interprets them — change without redeploy.
SOLID principles
Single Responsibility
A class should have one reason to change. Watch a bloated class split into focused parts.
O · SOLIDOpen / Closed
Open for extension, closed for modification. Add features without editing old code.
L · SOLIDLiskov Substitution
Subtypes must be usable anywhere their base is — without surprises.
I · SOLIDInterface Segregation
Many small interfaces beat one fat one — depend only on what you use.
D · SOLIDDependency Inversion
Depend on abstractions, not concretions — the engine behind DI.
Design patterns · all 23 Gang-of-Four
⭐ = you'll reach for these constantly in real-world code. Each lesson ends with the principle it helps you apply.
Creational — how objects get made
Factory Method
Let a factory decide which concrete class to build — clients stay decoupled.
CreationalAbstract Factory
Create whole families of matching objects with one factory.
⭐CreationalBuilder
Assemble a complex object step by step with a readable fluent chain.
CreationalPrototype
Clone a configured instance instead of rebuilding from scratch.
⭐CreationalSingleton
One shared instance, one access point — plus why you should often avoid it.
Structural — how objects compose
Adapter
Translate one interface into another so incompatible code works together.
StructuralBridge
Split an abstraction from its implementation so both vary independently.
⭐StructuralComposite
Treat single objects and trees of them uniformly.
⭐StructuralDecorator
Wrap an object to add behavior at runtime — no subclass explosion.
⭐StructuralFacade
One simple entry point over a complex subsystem — hide the wiring.
StructuralFlyweight
Share common state across many objects to save memory.
StructuralProxy
A stand-in that controls access — lazy loading, caching, protection.
Behavioral — how objects interact
Chain of Responsibility
Pass a request along handlers until one handles it — like middleware.
⭐BehavioralCommand
Turn a request into an object — unlock undo, redo, queues, and macros.
BehavioralInterpreter
Represent a small grammar as objects and evaluate sentences.
⭐BehavioralIterator
Traverse a collection without exposing its internal structure.
BehavioralMediator
A hub that coordinates components so they don't couple to each other.
BehavioralMemento
Snapshot & restore state without breaking encapsulation.
⭐BehavioralObserver
One subject, many listeners — events ripple out to subscribers.
BehavioralState
Give each state its own object — kill the giant status conditionals.
⭐BehavioralStrategy
Swap interchangeable algorithms behind one interface at runtime.
BehavioralTemplate Method
Fix an algorithm's skeleton in a base class; subclasses fill the steps.
BehavioralVisitor
Add operations to a structure without changing its classes.
Real-world combinations · lego blocks to build apps
Reusable building blocks — a few patterns combined solve a whole feature. Snap these together to build the applications below.
Dependency Injection
Factory + Singleton + registry — wire the whole app from one place.
⭐ComboRepository + Unit of Work
Hide persistence behind an interface; commit changes in one transaction.
⭐ComboCache-Aside Layer
Proxy + eviction Strategy — hit/miss/LRU in front of a slow store.
⭐ComboResilient API Client
Timeout + Retry/backoff + Circuit Breaker + Fallback, layered.
⭐ComboBackground Job Worker
Command job + queue + worker pool — offload slow async work.
ComboPlugin System
Strategy + Factory + registry — extend without touching the core.
ComboNotification Service
Observer + Strategy channels + Template Method — multi-channel sends.
ComboUndo / Redo
Command + Memento — multi-level undo with exact state restore.
ComboEvent Bus
Observer + Mediator — decoupled app-wide events by name.
ComboRequest Pipeline
Chain + Strategy + Factory — composable web middleware.
▲ Architecture · system-level design
Event Loop
How one thread stays non-blocking — stack, tasks, microtasks.
⭐ArchitectureMessage Queue + DLX
Decouple producer/consumer; dead-letter the poison messages.
⭐ArchitecturePub / Sub
Publish to topics; a broker fans out to subscribers at scale.
ArchitectureCQRS
Separate the write model from the read model; scale each alone.
ArchitectureEvent Sourcing
Store events as the source of truth; rebuild state by replay.
▲▲ Distributed systems · resilience & scale
Circuit Breaker
Fail fast when a dependency is down — stop cascading failures.
⭐DistributedRate Limiter
Token bucket — protect resources and enforce fairness.
DistributedSaga
Distributed transactions via local steps + compensations.
DistributedCAP & Consistency
During a partition, choose consistency or availability.
⭐DistributedConsistent Hashing
The hash ring — add/remove nodes moving only ~K/N keys.
DistributedService Discovery
Find healthy instances dynamically — client-side vs server-side.
DistributedWorkflow Engine
Durable, resumable orchestration of long-running processes.
▲▲ Data & storage · how data is stored, moved & found
OLTP vs OLAP
Row-store transactions vs column-store analytics — two shapes, two jobs.
DataData Warehouse
Consolidate every source into one query-optimized analytical store.
⭐DataETL Pipelines
Extract → Transform → Load — reliable, repeatable data movement.
DataStar & Snowflake Schemas
Dimensional modeling — facts + dimensions for fast analytics.
⭐DataVector Search
Embeddings + nearest-neighbor — search by meaning, not keywords.
⭐DataSearch Index
Inverted index — term → docs for fast full-text search.
DataDistributed IDs
Snowflake / UUID / ULID — unique ids with no central coordinator.
▲▲ Security · threats & auth
OWASP Top 10
The most critical web risks — and how to defend against them.
⭐SecurityOAuth2
Delegated, scoped, revocable access — the Authorization Code flow.
⭐SecurityLogin, Sessions & Auth
Hash passwords, issue sessions/JWTs, expire & refresh.
Security · appliedSigned URLs (S3)
Time-boxed, scoped access to private objects — no shared secrets.
▲▲ DevOps & platform · ship it & run it
Containers & Docker
Package app + deps into an immutable image — "build once, run anywhere".
⭐DevOpsKubernetes
Declarative orchestration — desired state, self-healing, scaling.
⭐DevOpsGitOps (Argo CD & Flux)
Git is the source of truth; an agent reconciles the cluster to match.
⭐DevOpsCI/CD Pipeline
Automate build → test → deploy; a failing stage stops the line.
⭐DevOpsObservability
Metrics, logs & traces — what, why and where, correlated.
DevOpseBPF
Safe, low-overhead kernel programmability for observability & networking.
DevOpsInfrastructure as Code
Declare infra in code; plan the diff, apply to converge, detect drift.
⭐DevOps · mindsetBuild vs Buy
Use OSS/managed services for commodity infra — build only your core.
★ Application designs · everything combined
Capstones — real systems built by stacking the ideas above.
URL Shortener
Read-heavy: base62 ids, caching, sharding, rate limiting.
System designRealtime Chat
Event loop + pub/sub fan-out + queue for history at scale.
System designE-commerce Checkout
Saga + Strategy + Circuit Breaker + Queue + CQRS.
⭐System design · finaleAI Agent
The whole site at once — think/act/observe loop, RAG memory, tools, workflow, resilience.
No topics match your search.
Built as a personal learning lab · no build step · open any file in a browser.