System Diagram

The Domestic Vessel Safety Management System data model, mapped — 54 models, 151 relationships.

🔍 For serious exploration, open the Interactive Diagram Viewer — pan, mouse-wheel zoom, fit-to-screen, full-screen, per-module tabs, the full 151-relationship ERD, and a focus mode that draws one model and its neighbours at a chosen depth. Person (53 links) and Vessel (34) are the role and vessel 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

Ten 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 FLEET["🚢 Fleet & SMS"]
        Vessel --> VesselCertificate
        Vessel --> SafetyManagementSystem
        SafetyManagementSystem --> SmsSection
        SafetyManagementSystem --> SmsRevision
    end

    subgraph PEOPLE["👥 People & competence"]
        Person --> PersonRole
        Person --> PersonQualification
        Person --> TrainingRecord
        Person --> Induction
    end

    subgraph FIT["😴 Fitness & fatigue"]
        FatigueRiskManagementPlan
        Person --> FitnessForDutyDeclaration
    end

    subgraph RISK["⚠️ Risk & controls"]
        Hazard --> RiskAssessment --> RiskControl
        RiskAssessment --> ManagementOfChange
    end

    subgraph PROC["📋 Procedures & emergency"]
        Procedure --> ProcedureAcknowledgement
        EmergencyPlan --> EmergencyDrill
    end

    subgraph MAINT["🛠️ Maintenance & inspections"]
        MaintenanceItem --> MaintenancePlan --> MaintenanceWork
        MaintenanceItem --> Defect
        VesselInspection --> InspectionResult --> Defect
    end

    subgraph OPS["⚓ Voyage operations"]
        Voyage --> VoyageReadiness
        Voyage --> CrewAssignment
        Voyage --> VesselLogEntry
    end

    subgraph INC["🚨 Incidents & actions"]
        Incident --> IncidentInvestigation --> CorrectiveAction
        Incident --> CorrectiveAction
    end

    subgraph ASSURE["✅ Assurance & records"]
        Audit --> AuditFinding --> CorrectiveAction
        SafetyManagementSystem --> SmsReview
    end

    Vessel --> Hazard
    Vessel --> Procedure
    Vessel --> MaintenanceItem
    Vessel --> Voyage
    Vessel --> Incident
    Vessel --> Audit
    Defect --> CorrectiveAction

Fleet, certificates & SMS

The vessel and its authority to operate. A certificate record is separate from its verification; the SMS carries sections, revisions and authority statements.

erDiagram
    Organisation ||--o{ Vessel : "owns / operates"
    Vessel ||--o{ VesselOperatingArea : "approved for"
    OperatingArea ||--o{ VesselOperatingArea : "covers"
    Vessel ||--o{ VesselCertificate : "holds"
    CertificateType ||--o{ VesselCertificate : "typed by"
    Vessel ||--o{ SafetyManagementSystem : "governed by"
    SafetyManagementSystem ||--o{ SmsSection : "contains"
    SmsSection ||--o{ SmsSection : "sub-section of"
    SafetyManagementSystem ||--o{ SmsRevision : "revised by"
    Vessel ||--o{ StatementOfAuthority : "delegates"

People & competence

Who may crew the vessel — roles, qualifications, training, induction, and the crewing assessment that sets minimum safe crew.

erDiagram
    Organisation ||--o{ Person : "employs"
    Person ||--o{ PersonRole : "appointed to"
    Role ||--o{ PersonRole : "defines"
    Person ||--o{ PersonQualification : "holds"
    QualificationType ||--o{ PersonQualification : "typed by"
    Person ||--o{ TrainingRecord : "completes"
    TrainingCourse ||--o{ TrainingRecord : "delivered as"
    Vessel ||--o{ Induction : "of"
    Person ||--o{ Induction : "receives"
    Vessel ||--o{ CrewingAssessment : "for"

Fitness & fatigue

Managing fatigue and fitness for duty — the plan, the work/rest history, the per-voyage declaration, and the drug & alcohol policy.

erDiagram
    Vessel ||--o{ FatigueRiskManagementPlan : "has"
    SafetyManagementSystem ||--o{ FatigueRiskManagementPlan : "under"
    Person ||--o{ WorkRestRecord : "logs"
    Person ||--o{ FitnessForDutyDeclaration : "declares"
    Voyage ||--o{ FitnessForDutyDeclaration : "for"
    Vessel ||--o{ DrugAlcoholPolicy : "adopts"

Risk & controls

Hazards become risk assessments with controls; change runs through management of change.

erDiagram
    Vessel ||--o{ Hazard : "exposed to"
    Hazard ||--o{ RiskAssessment : "assessed by"
    RiskAssessment ||--o{ RiskControl : "reduced by"
    RiskAssessment ||--o{ ManagementOfChange : "informs"
    Vessel ||--o{ ManagementOfChange : "changes"

Procedures & emergency

Documented procedures are separately acknowledged; emergency plans are proven by drills.

erDiagram
    Vessel ||--o{ Procedure : "has"
    SafetyManagementSystem ||--o{ Procedure : "under"
    Procedure ||--o{ ProcedureAcknowledgement : "acknowledged in"
    Person ||--o{ ProcedureAcknowledgement : "signs"
    Vessel ||--o{ EmergencyPlan : "has"
    EmergencyPlan ||--o{ EmergencyDrill : "tested by"

Maintenance & inspections

Keeping the vessel seaworthy. A repair (MaintenanceWork) is separate from defect verification; inspections run against templated items and can raise defects.

erDiagram
    Vessel ||--o{ MaintenanceItem : "comprises"
    MaintenanceItem ||--o{ MaintenanceItem : "sub-item of"
    MaintenanceItem ||--o{ MaintenancePlan : "planned by"
    MaintenancePlan ||--o{ MaintenanceWork : "generates"
    MaintenanceItem ||--o{ Defect : "develops"
    MaintenanceWork ||--o{ Defect : "rectifies"
    InspectionTemplate ||--o{ InspectionTemplateItem : "contains"
    Vessel ||--o{ VesselInspection : "inspected in"
    InspectionTemplate ||--o{ VesselInspection : "used by"
    VesselInspection ||--o{ InspectionResult : "records"
    InspectionTemplateItem ||--o{ InspectionResult : "answered by"
    Defect ||--o{ InspectionResult : "raised from"

Voyage operations

A voyage is gated by a readiness assessment; assignments, passenger counts and the log record the execution.

erDiagram
    Vessel ||--o{ Voyage : "sails"
    Voyage ||--o{ VoyageReadiness : "gated by"
    Voyage ||--o{ CrewAssignment : "crewed by"
    Voyage ||--o{ PassengerRecord : "counts"
    Voyage ||--o{ VesselLogEntry : "logged in"
    Voyage ||--o{ Defect : "surfaces"

Incidents & actions

Reporting, investigation and action are separate; a finding, a defect, a drill or a control can each spawn an action.

erDiagram
    Vessel ||--o{ Incident : "occurs on"
    Incident ||--o{ IncidentInvestigation : "investigated by"
    Incident ||--o{ CorrectiveAction : "actioned by"
    IncidentInvestigation ||--o{ CorrectiveAction : "recommends"
    Defect ||--o{ CorrectiveAction : "triggers"
    RiskControl ||--o{ CorrectiveAction : "triggers"
    EmergencyDrill ||--o{ CorrectiveAction : "triggers"
    AuditFinding ||--o{ CorrectiveAction : "closed by"

Assurance & records

Audits and findings, the periodic SMS review (separate from any revision it triggers), and the controlled-document, evidence, consultation and notification records.

erDiagram
    Vessel ||--o{ Audit : "audited in"
    SafetyManagementSystem ||--o{ Audit : "of"
    Audit ||--o{ AuditFinding : "raises"
    SafetyManagementSystem ||--o{ SmsReview : "reviewed in"
    Vessel ||--o{ Document : "controls"
    Vessel ||--o{ Evidence : "captures"
    Vessel ||--o{ ConsultationRecord : "consults"
    Vessel ||--o{ Notification : "notifies"

The interactive viewer at asset/system_diagram_viewer.html is generated from schema/menu_config.yaml and generated/json/vesselsafety_relationship_metadata.json by apps/vesselsafety/scripts/build_diagram_viewer.py. Re-run that script after any DSL or menu change so the ERD always matches the schema.