Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_code-clean-architecture-dependency-rule

Clean Architecture & The Dependency Rule (Inward-Only Coupling)

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Clean Architecture & The Dependency Rule (Inward-Only Coupling) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_code-clean-architecture-dependency-rule/opengraph-image)](https://archos.sageideas.dev/d/dgm_code-clean-architecture-dependency-rule)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-clean-architecture-dependency-rule)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-clean-architecture-dependency-rule" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Clean Architecture & The Dependency Rule (Inward-Only Coupling) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["HTTP / CLI / Queue"]
  n1_1["Interface Adapters"]
  n2a_2["Application Use Cases"]
  n2b_3["Pure Domain Entities"]
  n3_4[("Infra Implementations")]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Map DTO · Adapter"| n1_1
  n1_1 -->|"2a. Run case · In-Proc"| n2a_2
  n1_1 -->|"2b. Invariants · Pure"| n2b_3
  n2a_2 -->|"3a. Via Port · DI"| n3_4
  n2b_3 -->|"3b. Merge · RAM"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • HTTP / CLI / QueueSTATELESS
    External Delivery Driver
  • Interface AdaptersSTATELESS
    Controllers, DTOs & Presenters
  • Application Use CasesSTATELESS
    Orchestrates domain workflows
  • Pure Domain EntitiesSTATELESS
    Zero imports from SQL/HTTP/React
  • Infra ImplementationsSTATEFUL
    Postgres/Stripe via inverted Port
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. HTTP / CLI / Queue → Interface Adapters (Map DTO)[Adapter]
  2. Interface Adapters → Application Use Cases (Run case)[In-Proc]
  3. Interface Adapters → Pure Domain Entities (Invariants)[Pure]
  4. Application Use Cases → Infra Implementations (Via Port)[DI]
  5. Pure Domain Entities → Infra Implementations (Merge)[RAM]
  6. Infra Implementations → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →