- Documentation
- /
- Fins
- /
- System Diagram
System Diagram
The ERP Finance Simulator data model, mapped — 23 models
🔍 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. Company, JournalBatch and InboundMessage are hub tables, so their links can be hidden to declutter the overview.
Architecture overview
Two spines meet at the posting boundary: the master-data side (Company → GL/cost/profit/tax) that everything validates against, and the transaction side (Inbound Message → Journal Batch → Accounting Document → Acknowledgement) that carries a posting through.
flowchart LR
subgraph MASTER["🗂️ Master data"]
Company
GLAccount
CostCentre
ProfitCentre
TaxCode
FiscalPeriod
DocumentNumberSequence
end
subgraph PARTNERS["🤝 Partners"]
Supplier
Customer
end
subgraph JOURNAL["📒 Journals"]
JournalBatch
JournalEntry
JournalLine
end
subgraph DOC["📑 Accounting documents"]
AccountingDocument
AccountingDocumentLine
end
subgraph MSG["📨 Message processing"]
InboundMessage
PostingAttempt
PostingError
Acknowledgement
end
subgraph SIM["🎛️ Simulation & events"]
SimulationRule
SimulationRuleHit
OutboundEvent
WebhookSubscription
end
Company --> GLAccount
Company --> CostCentre
Company --> ProfitCentre
Company --> TaxCode
Company --> FiscalPeriod
Company --> DocumentNumberSequence
Company --> Supplier
Company --> Customer
Company --> JournalBatch
JournalBatch --> JournalEntry
JournalEntry --> JournalLine
JournalLine --> GLAccount
JournalLine --> CostCentre
JournalLine --> ProfitCentre
JournalLine --> TaxCode
JournalLine --> Supplier
JournalLine --> Customer
JournalBatch --> AccountingDocument
AccountingDocument --> AccountingDocumentLine
InboundMessage --> JournalBatch
InboundMessage --> PostingAttempt
InboundMessage --> PostingError
PostingAttempt --> PostingError
JournalLine --> PostingError
InboundMessage --> Acknowledgement
SimulationRule --> SimulationRuleHit
InboundMessage --> SimulationRuleHit
PostingAttempt --> SimulationRuleHit
Master data
Company is the root; GLAccount, CostCentre, ProfitCentre, TaxCode, FiscalPeriod
and DocumentNumberSequence hang off it — the reference data a posting is validated against.
Journals & accounting documents
JournalBatch → JournalEntry → JournalLine is the posting request (each line coded to a GL
account, cost/profit centre, tax code, supplier/customer). A successful post produces an
AccountingDocument → AccountingDocumentLine — the document of record.
Message processing
InboundMessage is the integration inbox (idempotent on message_sid, the envelope's message id); each PostingAttempt
is a validate/post try; PostingError records why one failed; Acknowledgement is the reply.
Simulation & events
SimulationRule → SimulationRuleHit forces failures for testing; OutboundEvent is the outbox
delivered to WebhookSubscription consumers as documents post.
Regenerating this diagram
The interactive viewer is generated — after any DSL, menu_config.yaml or
schema/diagram_config.yaml change, re-run:
python scripts/build_diagram_viewer.py fins