# arpitdevgoswami/ppe-safety-monitoring-system architecture

> Architecture diagram of the GitHub repository arpitdevgoswami/ppe-safety-monitoring-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arpitdevgoswami/ppe-safety-monitoring-system
- Repository: https://github.com/arpitdevgoswami/ppe-safety-monitoring-system

## Overview

This repository presents a PPE safety-monitoring and industrial digital-twin product. Its documented operational flow takes video through frame processing and vision detection to safety status, then presents monitoring and spatial views; the React dashboard also exposes workforce, access, asset, incident, analytics, and settings modules. The frontend excerpts show navigation and page composition, while backend source is indexed as read but not excerpted. The README documents the vision pipeline, but does not establish a runtime connection from Python processing to the dashboard; that relationship is therefore dashed and unverified.

Main entry points: [`src/App.tsx`](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/App.tsx) (Dashboard App), [`ppe_worker_status.py`](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/ppe_worker_status.py) (Worker Status), [`src/types/index.ts`](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/types/index.ts) (Safety Domain Types), [`main.py`](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/main.py) (Frame Processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_vision["Vision Pipeline"]
  node_video(("Video Sources"))
  node_frames["Frame Processing<br/>[main.py]"]
  node_ppe_detect["PPE Detection<br/>[main.py]"]
  node_hazard_detect["Fire Smoke Detection<br/>[main.py]"]
  node_matching["Spatial Matching<br/>[ppe_matching.py]"]
  node_tracking["Worker Tracking<br/>[ppe_tracking.py]"]
  node_status["Worker Status"]
end

subgraph group_dashboard["Dashboard Experience"]
  node_app["Dashboard App<br/>[App.tsx]"]
  node_sidebar["Navigation<br/>[AppSidebar.tsx]"]
  node_overview["Safety Overview<br/>[MetricsStrip.tsx]"]
  node_factory["3D Factory Twin<br/>[FactoryScene.tsx]"]
  node_inspector["Context Inspector"]
  node_queue["Incident Queue<br/>[IncidentQueue.tsx]"]
end

subgraph group_operations["Safety Operations"]
  node_monitoring["Live Monitoring"]
  node_workforce["Workforce Directory"]
  node_attendance["Gate Attendance"]
  node_assets["PPE Asset Vault"]
  node_zones["Spatial Zones"]
  node_investigation["Incident Investigation"]
  node_analytics["Predictive Analytics"]
  node_settings["Vision Settings"]
end

subgraph group_shared["Shared UI Data"]
  node_data["Demo Safety Data<br/>[demoData.ts]"]
  node_types["Safety Domain Types<br/>[index.ts]"]
end

node_video -->|"feeds frames"| node_frames
node_frames -->|"processes PPE"| node_ppe_detect
node_frames -->|"processes hazards"| node_hazard_detect
node_ppe_detect -->|"detection results"| node_status
node_hazard_detect -->|"detection results"| node_status
node_matching -.->|"supports assessment"| node_status
node_tracking -.->|"supports assessment"| node_status
node_status -.->|"status to dashboard"| node_app
node_app -->|"renders navigation"| node_sidebar
node_app -->|"renders overview"| node_overview
node_app -->|"renders twin"| node_factory
node_app -->|"renders inspector"| node_inspector
node_app -->|"renders queue"| node_queue
node_sidebar -->|"selects page"| node_app
node_app -->|"routes to"| node_monitoring
node_app -->|"routes to"| node_workforce
node_app -->|"routes to"| node_attendance
node_app -->|"routes to"| node_assets
node_app -->|"routes to"| node_zones
node_app -->|"routes to"| node_investigation
node_app -->|"routes to"| node_analytics
node_app -->|"routes to"| node_settings
node_app -->|"loads demo data"| node_data
node_data -->|"uses domain types"| node_types
node_queue -->|"uses incident type"| node_types
node_factory -->|"uses zone types"| node_types
node_inspector -->|"uses worker types"| node_types
node_monitoring -.->|"incident selection"| node_investigation

click node_frames "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/main.py"
click node_ppe_detect "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/main.py"
click node_hazard_detect "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/main.py"
click node_matching "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/ppe_matching.py"
click node_tracking "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/ppe_tracking.py"
click node_status "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/ppe_worker_status.py"
click node_app "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/App.tsx"
click node_sidebar "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/AppSidebar.tsx"
click node_overview "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/MetricsStrip.tsx"
click node_factory "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/FactoryScene.tsx"
click node_inspector "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/ContextualInspector.tsx"
click node_queue "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/IncidentQueue.tsx"
click node_monitoring "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/LiveMonitoringPage.tsx"
click node_workforce "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/WorkforceDirectoryPage.tsx"
click node_attendance "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/GateAccessAttendancePage.tsx"
click node_assets "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/PpeAssetVaultPage.tsx"
click node_zones "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/SpatialZonesPage.tsx"
click node_investigation "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/IncidentInvestigationPage.tsx"
click node_analytics "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/PredictiveAnalyticsPage.tsx"
click node_settings "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/NeuralSettingsPage.tsx"
click node_data "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/data/demoData.ts"
click node_types "https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/types/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_video,node_frames,node_ppe_detect,node_hazard_detect,node_matching,node_tracking,node_status toneBlue
class node_app,node_sidebar,node_overview,node_factory,node_inspector,node_queue toneAmber
class node_monitoring,node_workforce,node_attendance,node_assets,node_zones,node_investigation,node_analytics,node_settings toneMint
class node_data,node_types toneRose
```

## Components

### Vision Pipeline

- **Video Sources**
- [Frame Processing](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/main.py): `main.py`
- [PPE Detection](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/main.py): `main.py`
- [Fire Smoke Detection](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/main.py): `main.py`
- [Spatial Matching](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/ppe_matching.py): `ppe_matching.py`
- [Worker Tracking](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/ppe_tracking.py): `ppe_tracking.py`
- [Worker Status](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/ppe_worker_status.py): `ppe_worker_status.py`

### Dashboard Experience

- [Dashboard App](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/AppSidebar.tsx): `src/components/AppSidebar.tsx`
- [Safety Overview](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/MetricsStrip.tsx): `src/components/MetricsStrip.tsx`
- [3D Factory Twin](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/FactoryScene.tsx): `src/components/FactoryScene.tsx`
- [Context Inspector](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/ContextualInspector.tsx): `src/components/ContextualInspector.tsx`
- [Incident Queue](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/components/IncidentQueue.tsx): `src/components/IncidentQueue.tsx`

### Safety Operations

- [Live Monitoring](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/LiveMonitoringPage.tsx): `src/pages/LiveMonitoringPage.tsx`
- [Workforce Directory](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/WorkforceDirectoryPage.tsx): `src/pages/WorkforceDirectoryPage.tsx`
- [Gate Attendance](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/GateAccessAttendancePage.tsx): `src/pages/GateAccessAttendancePage.tsx`
- [PPE Asset Vault](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/PpeAssetVaultPage.tsx): `src/pages/PpeAssetVaultPage.tsx`
- [Spatial Zones](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/SpatialZonesPage.tsx): `src/pages/SpatialZonesPage.tsx`
- [Incident Investigation](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/IncidentInvestigationPage.tsx): `src/pages/IncidentInvestigationPage.tsx`
- [Predictive Analytics](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/PredictiveAnalyticsPage.tsx): `src/pages/PredictiveAnalyticsPage.tsx`
- [Vision Settings](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/pages/NeuralSettingsPage.tsx): `src/pages/NeuralSettingsPage.tsx`

### Shared UI Data

- [Demo Safety Data](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/data/demoData.ts): `src/data/demoData.ts`
- [Safety Domain Types](https://github.com/arpitdevgoswami/ppe-safety-monitoring-system/blob/main/src/types/index.ts): `src/types/index.ts`

## Connections

- Video Sources → Frame Processing: feeds frames (evidence: `README.md`)
- Frame Processing → PPE Detection: processes PPE (evidence: `README.md`)
- Frame Processing → Fire Smoke Detection: processes hazards (evidence: `README.md`)
- PPE Detection → Worker Status: detection results (evidence: `README.md`)
- Fire Smoke Detection → Worker Status: detection results (evidence: `README.md`)
- Spatial Matching → Worker Status: supports assessment
- Worker Tracking → Worker Status: supports assessment
- Worker Status → Dashboard App: status to dashboard
- Dashboard App → Navigation: renders navigation (evidence: `src/App.tsx`)
- Dashboard App → Safety Overview: renders overview (evidence: `src/App.tsx`)
- Dashboard App → 3D Factory Twin: renders twin (evidence: `src/App.tsx`)
- Dashboard App → Context Inspector: renders inspector (evidence: `src/App.tsx`)
- Dashboard App → Incident Queue: renders queue (evidence: `src/App.tsx`)
- Navigation → Dashboard App: selects page (evidence: `src/App.tsx`)
- Dashboard App → Live Monitoring: routes to (evidence: `src/App.tsx`)
- Dashboard App → Workforce Directory: routes to (evidence: `src/App.tsx`)
- Dashboard App → Gate Attendance: routes to (evidence: `src/App.tsx`)
- Dashboard App → PPE Asset Vault: routes to (evidence: `src/App.tsx`)
- Dashboard App → Spatial Zones: routes to (evidence: `src/App.tsx`)
- Dashboard App → Incident Investigation: routes to (evidence: `src/App.tsx`)
- Dashboard App → Predictive Analytics: routes to (evidence: `src/App.tsx`)
- Dashboard App → Vision Settings: routes to (evidence: `src/App.tsx`)
- Dashboard App → Demo Safety Data: loads demo data (evidence: `src/App.tsx`)
- Demo Safety Data → Safety Domain Types: uses domain types (evidence: `src/data/demoData.ts`)
- Incident Queue → Safety Domain Types: uses incident type (evidence: `src/components/IncidentQueue.tsx`)
- 3D Factory Twin → Safety Domain Types: uses zone types (evidence: `src/components/FactoryScene.tsx`)
- Context Inspector → Safety Domain Types: uses worker types (evidence: `src/components/ContextualInspector.tsx`)
- Live Monitoring → Incident Investigation: incident selection
