02 — System Diagram

🔍 Open the Interactive Diagram Viewer — pan, mouse-wheel zoom, fit-to-screen, full-screen, per-area tabs, the full ERD, and a focus mode that draws one model and its neighbours at a chosen depth. FinAccountingProfile fans out to many tables, so its links can be hidden to declutter the overview.

Regenerate the viewer after any DSL, menu_config.yaml or diagram_config.yaml change: python scripts/build_diagram_viewer.py coast_15_finance.

Financial Sources

flowchart LR
  SOU0[FinSource]
  SOU1[FinSourceSnapshot]

Postings & Batches

flowchart LR
  POS2[FinPostingBatch] --> POS3[FinPostingDocument]
  POS3[FinPostingDocument] --> POS3[FinPostingDocument]
  POS3[FinPostingDocument] --> JOU4[FinJournalLine]

Ledger Exchange

flowchart LR
  EXP5[FinExportAttempt]
  POS6[FinPostingAck]
  REC7[FinReconciliationItem]

External Payments

flowchart LR
  PAY8[FinPaymentNotice]

Accounting Configuration

flowchart LR
  ACC9[FinAccountingProfile] --> ACC10[FinAccountMapping]
  ACC9[FinAccountingProfile] --> POS11[FinPostingPeriod]

Audit & Exceptions

flowchart LR
  AUD12[FinAudit]
  EXC13[FinException]
flowchart LR
  ACC9[FinAccountingProfile] --> POS2[FinPostingBatch]
  SOU0[FinSource] --> POS3[FinPostingDocument]
  POS2[FinPostingBatch] --> EXP5[FinExportAttempt]
  POS3[FinPostingDocument] --> POS6[FinPostingAck]
  SOU0[FinSource] --> REC7[FinReconciliationItem]
  POS3[FinPostingDocument] --> REC7[FinReconciliationItem]
  ACC9[FinAccountingProfile] --> PAY8[FinPaymentNotice]

No shared tables and no foreign keys: sibling applications are linked by canonical_ref strings, cid + ref pairs and messages. Nothing here is posted to a real ledger: the ledger is simulated.

flowchart LR
  subgraph coast_15_finance
    S[FinSource]
    D[FinPostingDocument]
    A[FinPostingAck]
    O[FinSourceSnapshot observations]
    N[FinPaymentNotice]
    X[FinException]
  end
  subgraph coast_05_rating
    PS[posting snapshot]
    HD[document header]
  end
  subgraph coast_08_portcosts
    PC[approved port cost]
  end
  subgraph coast_09_cartage
    CC[approved cartage cost]
  end
  subgraph coast_07_accounts
    AF[agency financial fact]
    ST[settlement statement]
  end
  subgraph coast_16_assurance
    CASE[AssuranceCase]
  end
  subgraph SIM[simulated ledger adapter]
    L[mock_ledger]
  end
  PS -. "rating.posting_snapshot (the one billing source)" .-> S
  HD -. "rating.billing_document_issued (observation)" .-> O
  PC -. "portcost.cost_approved" .-> S
  CC -. "cartage.cost_approved" .-> S
  AF -. "accounts.financial_fact_committed" .-> S
  ST -. "accounts.statement_issued (observation)" .-> O
  D -- "export (simulated)" --> L
  L -- "finance.record_ledger_acknowledgment" --> A
  L -- "finance.record_payment_notice" --> N
  D -. "finance.posting_status" .-> PS
  D -. "finance.posting_status" .-> PC
  D -. "finance.posting_status" .-> AF
  N -. "finance.payment_notice" .-> PS
  N -. "finance.payment_notice" .-> AF
  X -. "finance.exception_raised" .-> CASE