Skip to content
forms-raw_singleitemedit-icon
navigation
modification_btn
docs
messages
flatprojectmap.handlebars
Plugin - Organogram
modificationbutton
docs_htmltables.handlebars

Plugin - Organogram

docs_html.handlebars
documentation.handlebars

Organogram Plugin – Site Organogram & Responsibility Mapping (v1)

Draft specification for Shiftbulk plugin


1. Overview

1.1 Plugin Name

Organogram – Site Organogram & Responsibility Mapping module.

1.2 Purpose

The Organogram plugin provides a Site Organogram Registry and Responsibility Dashboard for the Shiftbulk ecosystem, tightly linked to Atlas.

Definition:
“A structured representation of the organisational roles, reporting lines, and responsibility assignments mapped onto the physical site hierarchy. It links people and roles to Atlas entities (company, site, area, equipment) and clarifies who is accountable for risk, controls and performance at each level.”

Key v1 Scope: Focused entirely on site organograms and responsibility mapping for Atlas-linked companies, sites and areas. Equipment-level assignments are optional but supported.

Organograms are created as standalone site / area structures that reference Atlas nodes. Later versions will allow:

  • Deeper integration with Kestrel, Falcon and other risk plugins
  • Using Organograms to drive risk owner assignment and escalation rules

Organogram integrates into existing Shiftbulk structures:

  • Express + Handlebars
  • Tailwind CSS (via global layout – no {{extend}} required)
  • MongoDB + Mongoose
  • Views under plugins/organogram/views

Important: Organogram screens must render gracefully in low-data and no-data conditions, displaying friendly empty states (e.g. “No roles defined for this site yet”).

1.3 Mount Point

const organogram = require('./plugins/organogram');
                    app.use('/organogram', organogram);
                    

2. Goals & Non-Goals

2.1 Goals

  • Create a registry of site / area organograms with full metadata
  • Model hierarchical organisational units and roles linked to Atlas nodes
  • Provide a dashboard showing responsibility coverage and risk-ownership visibility across the hierarchy
  • Full CRUD capability for organogram structures and role assignments
  • Appropriate empty-state messaging for low/no-data views
  • Future-ready for tight integration with risk and control plugins (Kestrel, Falcon, etc.)

2.2 Non-Goals

  • No HR system-of-record functionality (payroll, contracts, performance reviews, etc.)
  • No full role-based access control engine (beyond basic Shiftbulk authentication)
  • No advanced workflow or approval engine in v1
  • No cross-plugin deep joins beyond simple Atlas ID references

3. Positioning in Shiftbulk

  • Organogram – Defines the organisational structure and responsibility mapping for Atlas entities (who owns which risks / areas).
  • Atlas – Defines the physical asset hierarchy (company → site → area → equipment) that Organogram attaches to.
  • Kestrel / other risk plugins – Fire protection and other risk domains that can reference Organogram roles as risk owners and champions.

4. Data Model

4.1 Mongoose Model: OrganogramPlan

File: plugins/organogram/models/OrganogramPlan.js

Collection: organogram_plans

Plan Header

  • title – required (e.g. “Saldanha Port – Operations Organogram”)
  • description – long text
  • status – draft | active | superseded | archived
  • coverageLevel – company | site | area | mixed
  • orgType – operations | maintenance | HSE | mixed

Context / Atlas Metadata

  • companyCode – optional reference to Atlas company code
  • siteCode – optional reference to Atlas site code
  • atlasRootId – Atlas node (site or area) that this organogram primarily describes
  • businessUnit – e.g. “Port Operations”, “Mining”, “Projects”
  • department – e.g. “Maintenance”, “HSE”, “Operations”

Time Horizon

  • effectiveFromYear
  • effectiveToYear – optional; null means “open-ended”
  • reviewCycleMonths – typical review frequency (e.g. 12)

Revision

  • planCode – e.g. “ORG-SALD-OPS-001”
  • revision – free text or integer
  • revisionDate
  • approvedBy
  • sourceDocument – link to signed PDF / corporate document

Organogram Lines

{
                      sequence,
                      atlasPath,           // company/site/area[/equipment] path or Atlas IDs
                      orgUnitName,        // “Shiploader Operations”, “CV223 Maintenance”, etc.
                      roleTitle,          // “Operations Superintendent”, “Area Engineer”
                      personName,         // optional; can be null for vacant roles
                      responsibilitySummary,
                      riskFocusAreas,     // e.g. ["Fire", "Structural Integrity", "Energy Isolation"]
                      reportsToUnitRef,   // reference to another line/sequence as parent
                      isRiskOwner,        // boolean – owns risk at this Atlas level
                      isAccountable,      // boolean – A in RACI
                      isConsulted,        // optional – C in RACI
                      isInformed,         // optional – I in RACI
                      tags,               // e.g. ["night-shift", "contractor-interface"]
                      isActive
                    }
                    

Lifecycle

  • owner – person or team responsible for maintaining the organogram
  • tags – arbitrary labels (e.g. “interim”, “BCP”, “fire-focus”)
  • isActive
  • Timestamps: createdAt, updatedAt

5. Routes

5.1 Dashboard & Browsing

  • GET /organogram – Dashboard
  • GET /organogram/site/:siteCode – Site-specific overview

5.2 CRUD

  • GET /organogram/plans
  • GET /organogram/plans/new
  • POST /organogram/plans
  • GET /organogram/plans/:id
  • GET /organogram/plans/:id/edit
  • POST /organogram/plans/:id
  • POST /organogram/plans/:id/delete

5.3 Optional Lifecycle

  • POST /organogram/plans/:id/activate
  • POST /organogram/plans/:id/supersede

6. Controllers

File: plugins/organogram/controllers/organogramController.js

6.1 summarizePlans()

Returns counts + basic health classification (e.g. number of active plans, sites with organograms, sites with none).

6.2 computeCoverageStats()

Optional helper for Atlas-linked coverage (e.g. which sites/areas have risk owners assigned and which do not).

6.3 Methods

  • dashboard()
  • siteDetail()
  • listPlans()
  • newPlanForm()
  • createPlan()
  • showPlan()
  • editPlanForm()
  • updatePlan()
  • deletePlan()

7. Views & Tailwind Layout

No {{extend}} should be used – the global Express layout applies automatically.

7.1 Dashboard

  • Show summary cards (e.g. number of sites with organograms, % coverage)
  • Grid of sites / business units with quick coverage indicators
  • Low/no-data friendly states (“No organograms captured yet”)

7.2 Site View

Shows the organogram for a given site or Atlas root, with a tree or grouped layout and indicators for risk owner coverage per area.

7.3 Plans List View

  • Filter bar (status, site, coverageLevel, orgType)
  • Table of Organogram plans
  • Actions (view, edit, duplicate, delete)
  • Empty-state message

7.4 New / Edit

Full header, context metadata and Organogram line table with add/remove rows (including Atlas link, role, person and responsibility fields).

7.5 Show View

Displays header, context, metadata and the Organogram in table and/or tree form, including responsibility and risk owner flags.


8. Integration

8.1 Views Root

path.join(__dirname, 'plugins/organogram/views')

8.2 Partials

{
                      dir: path.join(__dirname, 'plugins/organogram/views/organogram/partials'),
                      namespace: 'organogram'
                    }
                    

8.3 Atlas Integration

v1 reuses existing Atlas selectors and IDs only. No changes are required in Atlas; Organogram stores references to Atlas nodes for each line.

8.4 Tailwind

No extra CSS required beyond the shared layout utilities.


9. Validation & Error Handling

9.1 Validation

  • Title required
  • Status and coverageLevel enums required
  • At least minimal context metadata (e.g. siteCode or atlasRootId)
  • Organogram line validation (e.g. orgUnitName and roleTitle required if line is active; reportsToUnitRef must reference a valid line or be null)

9.2 Error Handling

Re-render form with validation messages and user-entered values preserved.

9.3 404 Handling

Redirect to list or main 404 page if a plan or site cannot be found.


10. LLM Implementation Instructions

10.1 File Structure

plugins/
                      organogram/
                        index.js
                        models/
                          OrganogramPlan.js
                        controllers/
                          organogramController.js
                        views/
                          organogram/
                            dashboard.handlebars
                            site.handlebars
                            plans/
                              index.handlebars
                              new.handlebars
                              edit.handlebars
                              show.handlebars
                            partials/
                              status_badge.handlebars
                              coverage_badge.handlebars
                              responsibility_badge.handlebars
                    

10.2 Requirements

  • CommonJS
  • No diffs – produce full file outputs
  • Views use Tailwind only
  • Empty-state handling required everywhere
  • Atlas IDs must be treated as opaque references (no direct Atlas queries in v1)
modal1
modal2
modal3
docs_javascript
new_issue_button.handlebars
shortcut_edit