DashboardSupportWelcome

👤 USER DOCS

Getting Started

Daily Operations

Shift Workspace & TasksPre-Shift SetupLine-Up CardsShift ReportsForms

Staff & Locations

Staff SchedulingManaging Locations

Oversight

Manager ReportsAnalyticsPre-Shift & Compliance

Incidents & Feedback

Incident ReportingAnonymous FeedbackMessages & Announcements

AI & Settings

AI ChatgearApp Settings

Administration

Dashboard & OnboardingAdmin

⚙️ DEVELOPER DOCS

Getting Started

Getting StartedDevelopmentDeployment Guide

Architecture

Architecture OverviewData FlowArchitecture Decision Records

Core Domain

Core DomainDatabase ReferenceLocations DomainAuth & RBACScheduling DomainReports DomainIncidents DomainNotifications DomainAudit Log & OptimizationDesign Audit Findings

Frontend

Frontend ArchitectureFormsLoading SkeletonsComponentsPWA & NotificationsimageScreenshots

API Reference

API Reference

Endpoints

POS Sales APIOptimization Data APISchedule Shifts APIEmployee Export APIReports APIIncidents APIAI Chat APIPush Notifications APIWebhooks APICron API

Contributing

ContributingcodeCode Examples

Security

Security & Compliance
Danvas IconDanvas
Danvas IconDanvas

Incidents Domain

Technical lifecycle and audit trail of operational incidents

Overview

The incidents domain provides a robust system for tracking safety and operational issues. It includes multi-level severity, automated Slack/Matrix notifications, and a collaborative commenting system with a full audit trail.

Database Schema

Incidents (incidents)

The primary record for an operational issue.

ColumnTypeDescription
userIdtextThe staff member who reported the incident.
locationIdtextReferences locations.id.
typetextInjury, Near Miss, Spill / Slip Hazard, Complaint, Maintenance, Stockout.
severitytextlow, medium, high, critical.
statustextreported, investigating, deferred, resolved.
visibilitytextmanager_only or employee_visible.
isInventoryAlertbooleanSet to true automatically for Stockout type; triggers DM notifications to Kitchen Manager.

Incident Comments (incident_comments)

Allows collaborative investigation and updates.

ColumnTypeDescription
incidentIdtextReferences incidents.id.
userIdtextThe commenter's Clerk ID.
contenttextThe text of the comment.

Notification & Escalation

When an incident is created or escalated, notifications are dispatched via @repo/slack and @repo/matrix.

  • On Creation: A Slack message is sent to the configured channel for the location.

Reports Domain

Technical deep dive into shift and manager report data models

Notifications Domain

Technical architecture of Slack, Matrix, and Web Push integrations

On this page

OverviewDatabase SchemaIncidents (incidents)Incident Comments (incident_comments)Notification & EscalationAudit LoggingRelated
incidents
  • On Escalation: The incident priority is raised, and an urgent alert is broadcast to the team's Matrix room.
  • Audit Logging

    Every change to an incident is captured in the audit_log table.

    • incident.created: When first submitted.
    • incident.status_changed: When a manager moves the incident through its lifecycle.
    • incident.escalated: When higher-level attention is requested.
    • incident.comment_added: When a user provides an update.

    Related

    Incident Reporting Guide

    Database Schema

    Slack Routing