How eramiya-vimalanathan/edge-ai-based-industrial-safety-violation-detection-system works
This repository presents an industrial PPE-safety monitoring product, with a React supervisor dashboard and an Express API. The visible camera workflow processes media through local person/PPE detection, then exposes camera, alert, worker, and reporting views; however, the sampled implementation does not establish the README’s full camera-to-IoT pipeline. The API’s worker route uses in-memory mock data, not the documented SQLite store. Dashboard pages and API route wiring are included where documented or indexed; unverified runtime integrations are omitted.
Main entry points: App.tsx Application router · cameras.tsx Camera monitoring · dashboard.tsx Live dashboard · app.ts Express application
Components 23
Supervisor dashboard
- Application router
artifacts/safety-monitor/src/App.tsx - Worker management
artifacts/safety-monitor/src/pages/workers.tsx - Camera monitoring
artifacts/safety-monitor/src/pages/cameras.tsx - Live dashboard
artifacts/safety-monitor/src/pages/dashboard.tsx - Alerts
artifacts/safety-monitor/src/pages/alerts.tsx - Warning logs
artifacts/safety-monitor/src/pages/warning-logs.tsx - Reports
artifacts/safety-monitor/src/pages/reports.tsx - Zones
artifacts/safety-monitor/src/pages/zones.tsx - Sensors
artifacts/safety-monitor/src/pages/sensors.tsx - Settings
artifacts/safety-monitor/src/pages/settings.tsx - Authentication
artifacts/safety-monitor/src/hooks/use-auth.tsx
Camera detection
- Detection model loader
artifacts/safety-monitor/src/lib/detection-model.ts - PPE detection engine
artifacts/safety-monitor/src/lib/ppe-detection.ts
API service
- Express application
artifacts/api-server/src/app.ts - REST route modules
artifacts/api-server/src/routes - Worker API
artifacts/api-server/src/routes/workers.ts - WebSocket service
artifacts/api-server/src/lib/websocket.ts
Application state
- Camera media state
artifacts/safety-monitor/src/context/camera-video-context.tsx - Local warning state
artifacts/safety-monitor/src/context/local-warning-logs-context.tsx - Notification state
artifacts/safety-monitor/src/context/notification-context.tsx - In-memory records
artifacts/api-server/src/lib/mock-data.ts - SQLite database
lib/db/src/schema/index.ts
Other components
- Supervisor
Connections 30
- Supervisor → Application router: uses
README.md - Application router → Worker management: routes to
artifacts/safety-monitor/src/App.tsx - Application router → Camera monitoring: routes to
artifacts/safety-monitor/src/App.tsx - Application router → Live dashboard: routes to
artifacts/safety-monitor/src/App.tsx - Application router → Alerts: routes to
artifacts/safety-monitor/src/App.tsx - Application router → Warning logs: routes to
artifacts/safety-monitor/src/App.tsx - Application router → Reports: routes to
artifacts/safety-monitor/src/App.tsx - Application router → Zones: routes to
artifacts/safety-monitor/src/App.tsx - Application router → Sensors: routes to
artifacts/safety-monitor/src/App.tsx - Application router → Settings: routes to
artifacts/safety-monitor/src/App.tsx - Application router → Authentication: provides auth
artifacts/safety-monitor/src/App.tsx - Application router → Camera media state: provides media
artifacts/safety-monitor/src/App.tsx - Application router → Local warning state: provides logs
artifacts/safety-monitor/src/App.tsx - Application router → Notification state: provides notifications
artifacts/safety-monitor/src/App.tsx - Camera monitoring → PPE detection engine: runs detection
artifacts/safety-monitor/src/pages/cameras.tsx - PPE detection engine → Detection model loader: loads model
artifacts/safety-monitor/src/lib/ppe-detection.ts - Camera monitoring → Camera media state: uses media
artifacts/safety-monitor/src/pages/cameras.tsx - Camera monitoring → Local warning state: records warnings
artifacts/safety-monitor/src/pages/cameras.tsx - Camera monitoring → Notification state: adds notifications
artifacts/safety-monitor/src/pages/cameras.tsx - Live dashboard → PPE detection engine: uses detections
artifacts/safety-monitor/src/pages/dashboard.tsx - Live dashboard → Camera media state: uses media
artifacts/safety-monitor/src/pages/dashboard.tsx - Live dashboard → Local warning state: uses warnings
artifacts/safety-monitor/src/pages/dashboard.tsx - Live dashboard → Notification state: uses notifications
artifacts/safety-monitor/src/pages/dashboard.tsx - Application router → Express application: serves API
artifacts/api-server/src/app.ts - Express application → REST route modules: mounts routes
artifacts/api-server/src/app.ts - REST route modules → Worker API: registers workers
artifacts/api-server/src/routes/index.ts - Worker API → In-memory records: reads and updates
artifacts/api-server/src/routes/workers.ts - Worker management → Worker API: requests workers
README.md - Express application → WebSocket service: streams updates
README.md - Express application → SQLite database: persists records
README.md