Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_code-modular-monolith-structure

Modular Monolith Structure (Strict Module Facades & Owned Schemas)

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Modular Monolith Structure (Strict Module Facades & Owned Schemas) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_code-modular-monolith-structure/opengraph-image)](https://archos.sageideas.dev/d/dgm_code-modular-monolith-structure)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-modular-monolith-structure)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-modular-monolith-structure" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Modular Monolith Structure (Strict Module Facades & Owned Schemas) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["API Edge Router"]
  n1_1["Billing Module Facade"]
  n2a_2["Orders Module Facade"]
  n2b_3[("In-Process Event Bus")]
  n3_4[("Schema-Isolated DB")]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Public · In-Proc"| n1_1
  n1_1 -->|"2a. Domain API · In-Proc"| n2a_2
  n1_1 -->|"2b. Publish · Event"| n2b_3
  n2a_2 -->|"3a. Owned SQL · SQL"| n3_4
  n2b_3 -->|"3b. Merge · RAM"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • API Edge RouterSTATELESS
    Single Deployable Binary
  • Billing Module FacadeSTATELESS
    Public API + owned billing schema
  • Orders Module FacadeSTATELESS
    Cannot JOIN billing.* tables!
  • In-Process Event BusSTATEFUL
    Async decoupled module events
  • Schema-Isolated DBSTATEFUL
    Separate PG schemas / roles
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. API Edge Router → Billing Module Facade (Public)[In-Proc]
  2. Billing Module Facade → Orders Module Facade (Domain API)[In-Proc]
  3. Billing Module Facade → In-Process Event Bus (Publish)[Event]
  4. Orders Module Facade → Schema-Isolated DB (Owned SQL)[SQL]
  5. In-Process Event Bus → Schema-Isolated DB (Merge)[RAM]
  6. Schema-Isolated DB → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →