Skip to content
StackDecode
System Design
3. Client-Server ArchitectureAnimated

Clean Architecture

Dependencies point inward toward business rules.

The idea

Concentric circles: entities, use cases, interface adapters, frameworks. Inner circles know nothing about outer ones.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

UIControllersUse casesEntitiesDatabase
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Dependencies point inward only.

step:
1/4
at:
UI
1/8

The green dot is a request moving through the system.

Step by step

  1. 1Entities hold core rules
  2. 2Use cases orchestrate them
  3. 3Adapters convert data
  4. 4Frameworks sit on the outside

Where it is used

Long-lived business applications.

Watch out for

Over-engineering simple CRUD apps.

Related