How mirusnan2025it-del/h2s-wristband works
SIH11 is an H₂S safety-monitoring application: workers submit or capture a chemical test-strip image, the backend validates and analyzes it, and the result supports safety review and manager oversight. The graph follows the documented upload/live-analysis workflow and the sampled vision pipeline. It also includes the documented worker history, alerts, manager reporting, and calibration capabilities. Some API and vision modules were not sampled, so uncertain internal call relationships are omitted.
Main entry points: main.py FastAPI Application · App.jsx Role-Based App · api.js API Client · pipeline.py Vision Pipeline
Components 26
Worker and Manager UI
- Role-Based App
SIH11/frontend/src/App.jsx - Image and Live Capture
SIH11/frontend/src/pages/worker/WorkerUpload.jsx - Live Frame Capture
SIH11/frontend/src/pages/worker/WorkerLive.jsx - API Client
SIH11/frontend/src/services/api.js - Worker History and Alerts
SIH11/frontend/src/pages/worker/WorkerHistory.jsx - Manager Oversight
SIH11/frontend/src/pages/manager - Calibration Controls
SIH11/frontend/src/pages/manager/ManagerCalibration.jsx
API and Access
- FastAPI Application
SIH11/backend/app/main.py - Authentication and Roles
SIH11/backend/app/api/auth.py - Worker Endpoints
SIH11/backend/app/api/worker.py - Analysis Endpoints
SIH11/backend/app/api/analysis.py - Manager Endpoints
SIH11/backend/app/api/manager.py - Calibration Endpoints
SIH11/backend/app/api/calibration.py
Strip Analysis
- Vision Pipeline
SIH11/backend/app/vision/pipeline.py - YOLO Strip Detection
SIH11/backend/app/ml/yolov11/detector.py - Image Quality Checks
SIH11/backend/app/vision/quality.py - Dust Contamination
SIH11/backend/app/vision/contamination.py - Strip Calibration
SIH11/backend/app/vision/calibration.py - Color Analysis
SIH11/backend/app/vision/color_analysis.py - Expiry Assessment
SIH11/backend/app/vision/expiry.py - Strip Validation
SIH11/backend/app/vision/validation.py
Safety Operations
- MongoDB or Memory Store
SIH11/backend/app/core/database.py - Security Utilities
SIH11/backend/app/core/security.py - Risk, Reports and Worker Views
SIH11/frontend/src/pages/manager/ManagerDashboard.jsx
Other components
- Worker
- Manager
Connections 31
- Worker → Role-Based App: uses
- Manager → Role-Based App: uses
- Role-Based App → Image and Live Capture: routes to
- Role-Based App → Live Frame Capture: routes to
- Role-Based App → Worker History and Alerts: routes to
- Role-Based App → Manager Oversight: routes to
- Role-Based App → Calibration Controls: routes to
- Image and Live Capture → API Client: uploads image
- Live Frame Capture → API Client: submits frame
- Worker History and Alerts → API Client: requests records
- Manager Oversight → API Client: requests oversight data
- Calibration Controls → API Client: reads and updates
- API Client → FastAPI Application: HTTP requests
- FastAPI Application → Authentication and Roles: registers router
- FastAPI Application → Worker Endpoints: registers router
- FastAPI Application → Analysis Endpoints: registers router
- FastAPI Application → Manager Endpoints: registers router
- FastAPI Application → Calibration Endpoints: registers router
- FastAPI Application → MongoDB or Memory Store: initializes
- Analysis Endpoints → Vision Pipeline: runs analysis
- Vision Pipeline → YOLO Strip Detection: detects strip
- Vision Pipeline → Image Quality Checks: checks image
- Vision Pipeline → Dust Contamination: checks contamination
- Vision Pipeline → Strip Calibration: normalizes colors
- Worker Endpoints → MongoDB or Memory Store: reads and writes records
- Manager Endpoints → MongoDB or Memory Store: reads operational data
- Calibration Endpoints → MongoDB or Memory Store: reads and updates settings
- Authentication and Roles → MongoDB or Memory Store: accesses users
- Authentication and Roles → Security Utilities: uses security functions
- Manager Oversight → Risk, Reports and Worker Views: shows oversight
- Risk, Reports and Worker Views → API Client: fetches dashboard data