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

Plugin - Risk Modeling

docs_html.handlebars
documentation.handlebars

Kestrel Fire Protection Control – Functional Specification

Functional specification for the Kestrel Fire Protection Control plugin in Shiftbulk

1. Purpose of this Document

This functional specification provides a blueprint for developing the Kestrel Fire Protection Control plugin for the Shiftbulk platform. Functional specifications focus on what the system should do, not how it will be implemented. They define clear requirements and serve as a single source of truth for developers, designers and stakeholders.

The goal is to ensure that everyone understands the scope and objectives of the project and can collaborate effectively.

2. Objectives

Functional specifications offer several benefits:

  • Clarity and communication – Provide detailed instructions so all team members understand what must be built.
  • Scope management – Clearly define which features are in scope for version 1 and which are not.
  • Requirement documentation – Capture user and business requirements to ensure the solution solves the right problems.
  • Team alignment – Align expectations across development, design, QA and management to prevent costly misunderstandings.

3. Project Overview

Kestrel is a plugin for the Shiftbulk platform that enables asset-level fire-protection control and reporting. It follows the Model–View–Controller (MVC) architectural pattern, splitting the code into models (data and business logic), views (user interface) and controllers (request/response logic).

The plugin is initially focused on fire prevention for port equipment in the mining industry, but it must be designed for easy expansion into broader asset management capabilities.

Key Goals

  • Provide a red/amber/green (RAG) control matrix for fire-protection controls across the asset hierarchy (company → site → area → equipment).
  • Allow users to view, filter, and export fire risk assessment data via dashboards.
  • Record and track risk assessments, associated actions, and site champions.
  • Seamlessly integrate with existing Shiftbulk plugins such as Atlas (asset management) while remaining loosely coupled to Falcon (findings/audits).

4. Stakeholders & User Roles

Kestrel serves multiple stakeholders:

  • Maintenance Engineers: primary data entry and review of equipment-level fire controls.
  • Health, Safety & Environment (HSE) Team: monitors compliance and ensures risk assessments are up to date.
  • Site Managers and Executives: consume dashboard summaries for high-level oversight.

Role-based permissions are not implemented in v1; all authenticated users with access to Shiftbulk may view the dashboards. Editing capabilities could be gated in future releases.

5. Asset Hierarchy and Data Attachment

Kestrel must leverage the existing Atlas hierarchy: Company → Site → Area → Equipment. Fire controls can be attached at any level in this hierarchy.

Roll-up Logic

The parent’s RAG status is computed from its children:

  • Red if any child is red
  • Amber if no red but at least one amber
  • Green only if all children are green

Manual overrides may be added in future.

Temporary Assets

If a risk assessment references an asset not yet in Atlas, Kestrel will create a placeholder asset for later reconciliation.

6. Risk Assessment Model

Kestrel uses a dedicated risk assessment model (collection prefix kestrel_) rather than reusing Falcon’s schema. Each record contains at least the following fields:

  • Asset ID (equipment/site/area/company)
  • Risk Assessment Number (RA #)
  • Category (default “Fire”)
  • Date of assessment
  • Next Review Date
  • Assessor (name)
  • Document Link (URL to shared file storage)
  • Status (draft or approved)
  • Actions: an array of tasks with description, due date and completion flag
  • Created At timestamp

RAG Logic

The RAG status is automatically computed:

Status Conditions
Green Risk assessment exists and all actions are complete.
Amber Risk assessment exists but at least one action is outstanding.
Red No risk assessment exists.

Additionally, if the assessment date is older than 12 months, the status degrades one level (green → amber → red).

Action Management

Actions are stored as subdocuments within the risk assessment. They are linked but not integrated to Falcon findings. Each action includes:

  • Description
  • Optional due date
  • Completion flag

Future releases may synchronise actions with Falcon.

7. Governance and Champions

Each site may have a fire-protection champion responsible for compliance. In v1, champions are stored as simple objects with:

  • Name
  • Email
  • Phone
  • Start and end dates

The Governance column is green when a champion is assigned; training or meeting logs are deferred to future phases.

8. User Interface

Kestrel uses Tailwind CSS for styling. The main dashboard presents a RAG matrix showing each risk assessment’s status. Dedicated pages allow users to view details of an assessment and its actions.

Filters

Initially, users can filter by:

  • Showing only red or amber items
  • Equipment type

Exports

  • Data can be exported to CSV.
  • Print/PDF exports are deferred.

The application must support responsive design for desktop and mobile devices.

9. Integration with Shiftbulk

Atlas Integration

Kestrel reuses Atlas selectors for company → site → area → equipment, enabling users to navigate and select assets.

Falcon Integration

No automatic import or export of findings in v1. Future integration points are planned.

Server Configuration

To integrate the plugin, the Shiftbulk server must:

  • Add path.join(__dirname, 'plugins/kestrel/views') to the list of view roots.
  • Register any partial templates under plugins/kestrel/views/partials.
  • Require and mount the plugin at /kestrel: const kestrel = require('./plugins/kestrel'); app.use('/kestrel', kestrel);.

These steps allow Express to resolve Kestrel’s Handlebars templates and route requests to the plugin’s controllers.

10. Plugin Architecture

Kestrel adheres to the Model–View–Controller structure:

  • Models: Mongoose schemas (e.g., kestrel_RiskAssessment) that encapsulate data and business logic.
  • Views: Handlebars templates located in plugins/kestrel/views/kestrel/ for index and detail pages. Tailwind classes ensure a clean and modern UI.
  • Controllers: Modules that handle HTTP requests, fetch data from models, compute RAG statuses, and render appropriate views.
  • Routes: Defined in plugins/kestrel/index.js, mounting endpoints for listing and viewing assessments.

Folder Structure

plugins/kestrel/
                    ├─ index.js           // Express router
                    ├─ models/
                    │  └─ kestrel_riskAssessment.js
                    ├─ controllers/
                    │  └─ riskController.js
                    └─ views/kestrel/
                       ├─ index.handlebars
                       └─ detail.handlebars
                    

11. Non-Functional Requirements

  • Technology stack: Node.js, Express, Mongoose for MongoDB, Handlebars, Tailwind CSS.
  • Scalability: Designed to support future expansion into additional safety domains such as energy isolation or confined space.
  • Maintainability: Follows MVC to separate concerns and ease future development.
  • Collection naming: All MongoDB collections used by Kestrel must be prefixed with kestrel_ to avoid coll_
modal1
modal2
modal3
docs_javascript
new_issue_button.handlebars
shortcut_edit