- Documentation
- /
- Portcall
- /
- System Diagram
System Diagram
The PortCalls data model, mapped — 38 models, 89 relationships
🔍 For serious exploration, open the Interactive Diagram Viewer — pan, mouse-wheel zoom, fit-to-screen, full-screen, per-module tabs, the full 89-relationship ERD, and a focus mode that draws one model and its neighbours at a chosen depth.
Organisation(19 links) andPerson(12) are role and ownership columns that fan out to nearly everything, so the viewer hides those links by default — a toggle brings them back. The diagrams below are the readable, static summary of the principal links only.
Architecture Overview
Nine areas mirror the sidebar menu. Every arrow means "one row of the left model is referenced by many rows of the right model".
flowchart LR
subgraph COM["📄 Commercial & voyages"]
ServiceContract --> Voyage
Voyage --> VoyageParty
Voyage --> VoyageLeg
end
subgraph FLEET["🚢 Fleet, ports & routes"]
Vessel --> VesselCertificate
Port --> Terminal --> Berth
Port --> Route
end
subgraph CARGO["📦 Cargo & readiness"]
Commodity --> CargoBooking
CargoBooking --> CargoConsignment --> CargoTransportUnit
CargoConsignment --> DangerousGoodsDeclaration
CargoBooking --> CargoDocument
CargoBooking --> CargoReadiness
end
subgraph STOW["🏗️ Stowage & handling"]
StowagePlan --> StowagePosition
StowagePlan --> CargoSecuringInspection
CargoHandlingEquipment
end
subgraph PORT["⚓ Port calls"]
PortCall --> PortCallDeclaration
PortCall --> PortServiceRequest
PortCall --> BerthWindow
PortCall --> PortCallMilestone
end
subgraph OPS["🔀 Cargo operations"]
LoadingOperation --> LoadingTally
StatementOfFacts
end
subgraph EXEC["🧭 Voyage execution"]
VoyageReadiness
VoyagePosition
OperationalEvent --> Delay
end
subgraph PERF["📊 Performance & records"]
VoyagePerformance
Evidence
Notification
end
Voyage --> CargoBooking
Voyage --> StowagePlan
Voyage --> PortCall
Voyage --> OperationalEvent
Voyage --> VoyagePerformance
PortCall --> LoadingOperation
PortCall --> StatementOfFacts
Route --> Voyage
Vessel --> Voyage
Commercial & voyages
The commercial basis and the voyage it authorises.
flowchart LR
ServiceContract --> Voyage
Route --> Voyage
Vessel --> Voyage
Person -->|master| Voyage
Voyage --> VoyageLeg
Voyage --> VoyageParty
Organisation --> VoyageParty
Port -->|origin/destination| VoyageLeg
Fleet, ports & routes
The physical network the voyage runs on.
flowchart LR
Organisation -->|owner/operator| Vessel
Vessel --> VesselCertificate
Organisation -->|port authority| Port
Port --> Terminal
Terminal --> Berth
Port -->|origin/destination| Route
Cargo & readiness
What is carried, and whether it is fit to load.
flowchart LR
Commodity --> CargoBooking
Voyage --> CargoBooking
CargoBooking --> CargoConsignment
CargoConsignment --> CargoTransportUnit
CargoConsignment --> DangerousGoodsDeclaration
CargoBooking --> CargoDocument
CargoConsignment --> CargoDocument
CargoBooking --> CargoReadiness
Stowage, handling & port calls
How the cargo rides, and the visit that loads or discharges it.
flowchart LR
Voyage --> StowagePlan
StowagePlan --> StowagePosition
CargoConsignment --> StowagePosition
CargoTransportUnit --> StowagePosition
Voyage --> CargoSecuringInspection
StowagePlan --> CargoSecuringInspection
Terminal --> CargoHandlingEquipment
Vessel --> CargoHandlingEquipment
Voyage --> PortCall
Port --> PortCall
Terminal --> PortCall
Berth --> PortCall
PortCall --> PortCallDeclaration
PortCall --> PortServiceRequest
PortCall --> BerthWindow
PortCall --> PortCallMilestone
Operations, execution & performance
Working the cargo, running the voyage, and closing it out.
flowchart LR
PortCall --> LoadingOperation
LoadingOperation --> LoadingTally
CargoConsignment --> LoadingTally
CargoHandlingEquipment --> LoadingTally
PortCall --> StatementOfFacts
Voyage --> VoyageReadiness
Voyage --> VoyagePosition
Voyage --> OperationalEvent
OperationalEvent --> Delay
Voyage --> Delay
Voyage --> VoyagePerformance
Voyage --> Evidence
PortCall --> Evidence
Person --> Notification
Organisation --> Notification
The interactive viewer above is generated from menu_config.yaml and
generated/json/portcall_relationship_metadata.json by
apps/portcall/scripts/build_diagram_viewer.py, so the ERD always matches the
schema. Re-run that script after any DSL or menu change.