How swarup-321/smart-helmet works
MineGuard is a browser dashboard for mine-worker safety telemetry. Safety staff move from a live overview into worker records, alert review, analytics, and device or system settings; critical SOS incidents surface as an acknowledgement overlay. AppContext coordinates shared state, polling, and live socket events through the API service. The shown code supports the client-side workflow and API boundary, not backend processing or persistence. README is empty, so product capabilities are inferred from the supplied UI excerpts and source index.
Main entry points: App.jsx App router · AppContext.jsx Shared app state · api.js HTTP and socket API · Overview.jsx Live overview
Components 15
Dashboard shell
- App router
src/App.jsx - Navigation header
src/components/Header.jsx - Command palette
src/components/CommandPalette.jsx - Toast notifications
src/components/ToastContainer.jsx
Safety monitoring
- Live overview
src/components/Overview.jsx - Worker detail
src/components/WorkerDetail.jsx - Alert review
src/components/AlertsView.jsx - Safety analytics
src/components/AnalyticsView.jsx - SOS overlay
src/components/FullscreenSosOverlay.jsx
Mine operations
- Workers and devices
src/components/WorkersDevicesView.jsx - Safety settings
src/components/SettingsView.jsx
Client runtime
- Shared app state
src/context/AppContext.jsx - HTTP and socket API
src/services/api.js
Other components
- Safety staff
- MineGuard API server
Connections 30
- Safety staff → App router: uses dashboard
- App router → Navigation header: renders
src/App.jsx - App router → Live overview: routes to
src/App.jsx - App router → Worker detail: routes to
src/App.jsx - App router → Alert review: routes to
src/App.jsx - App router → Safety analytics: routes to
src/App.jsx - App router → Workers and devices: routes to
src/App.jsx - App router → Safety settings: routes to
src/App.jsx - App router → Command palette: renders
src/App.jsx - App router → SOS overlay: renders
src/App.jsx - App router → Toast notifications: renders
src/App.jsx - App router → Shared app state: reads state
src/App.jsx - Navigation header → Shared app state: reads state
src/components/Header.jsx - Command palette → Shared app state: reads state
src/components/CommandPalette.jsx - Toast notifications → Shared app state: reads state
src/components/ToastContainer.jsx - Live overview → Shared app state: reads telemetry
src/components/Overview.jsx - Worker detail → Shared app state: reads state
src/components/WorkerDetail.jsx - Alert review → Shared app state: reads state
src/components/AlertsView.jsx - Safety analytics → Shared app state: reads state
src/components/AnalyticsView.jsx - SOS overlay → Shared app state: reads incident
src/components/FullscreenSosOverlay.jsx - Workers and devices → Shared app state: reads state
src/components/WorkersDevicesView.jsx - Safety settings → Shared app state: reads preferences
src/components/SettingsView.jsx - Shared app state → HTTP and socket API: polls and subscribes
src/context/AppContext.jsx - Alert review → HTTP and socket API: requests alerts
src/components/AlertsView.jsx - Live overview → HTTP and socket API: requests data
src/components/Overview.jsx - Worker detail → HTTP and socket API: requests worker data
src/components/WorkerDetail.jsx - SOS overlay → HTTP and socket API: acknowledges incident
src/components/FullscreenSosOverlay.jsx - Workers and devices → HTTP and socket API: manages workers
src/components/WorkersDevicesView.jsx - Safety settings → HTTP and socket API: updates settings
src/components/SettingsView.jsx - HTTP and socket API → MineGuard API server: sends HTTP and socket traffic
src/services/api.js