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. InfraAsset, InfraTerminal fan out to many tables, so their 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 prt_01_infra.

Restrictions & Defects

flowchart LR
  INF0[InfraDefect] --> INF1[InfraAssessment]
  INF0[InfraDefect] --> INF2[InfraRestriction]
  INF1[InfraAssessment] --> INF2[InfraRestriction]
  INF0[InfraDefect] --> INF3[InfraRemedialWork]
  INF2[InfraRestriction] --> INF4[InfraVerification]
  INF3[InfraRemedialWork] --> INF4[InfraVerification]

Assets & Inspection

flowchart LR
  INF5[InfraAsset] --> INF6[InfraInspectionPlan]
  INF6[InfraInspectionPlan] --> INF7[InfraInspection]
flowchart LR
  INF5[InfraAsset] --> INF8[InfraDependency]
  INF5[InfraAsset] --> INF9[InfraSafetyHold]
  INF10[InfraObligationTask]
  INF11[InfraCaseLink]

Terminal Structure

flowchart LR
  INF12[InfraPort] --> INF13[InfraTerminal]
  INF13[InfraTerminal] --> INF14[InfraArea]
flowchart LR
  INF14[InfraArea] --> INF5[InfraAsset]
  INF5[InfraAsset] --> INF0[InfraDefect]
  INF7[InfraInspection] --> INF0[InfraDefect]
  INF5[InfraAsset] --> INF2[InfraRestriction]

No shared tables and no foreign keys: sibling applications are linked by canonical (cid) strings and by events. The published event is consumed by all five siblings (they filter on a subject dependency or a correlated case); the three consumed events come from safety and assurance. All handlers are scaffolds (Phase 2).

flowchart LR
  subgraph prt_01_infra
    RS[InfraRestriction]
    SH[InfraSafetyHold]
    OT[InfraObligationTask]
    CL[InfraCaseLink]
    DP[InfraDependency]
  end
  M[prt_02_maint]
  O[prt_03_ops]
  B[prt_04_berth]
  S[prt_05_safety]
  A[prt_06_assurance]
  RS -. "infrastructure.restriction_changed" .-> M
  RS -. "infrastructure.restriction_changed" .-> O
  RS -. "infrastructure.restriction_changed" .-> B
  RS -. "infrastructure.restriction_changed" .-> S
  RS -. "infrastructure.restriction_changed" .-> A
  S -. "safety.restriction_changed" .-> SH
  A -. "assurance.obligation_assigned" .-> OT
  A -. "assurance.case_closed" .-> CL
  DP -. "dependent_cid" .-> M
  DP -. "dependent_cid" .-> O
  DP -. "dependent_cid" .-> B