How manikantaguptha29/sif-guard-ai works
SIF-Guard AI is a prototype safety-reporting dashboard for oil production sites. Field workers submit typed, spoken, or photo-tagged reports; browser-side keyword rules triage them, and staff review the feed, dispatch responses, and track escalation and acknowledgement. The Express API handles authentication, report access, and persistence. Separately, ml-model/ provides an offline synthetic-data training, evaluation, and inference pipeline; the README explicitly says it is not connected to the application. Frontend source was indexed but not excerpted, so detailed UI call relationships are not asserted.
Main entry points: index.html Dashboard Page · server.js Express API · db.js Storage & Crypto · quick-report.js Report Composer
Components 24
Dashboard
- Dashboard Page
frontend/index.html - Login & Auth UI
frontend/js/auth.js - Report Composer
frontend/js/quick-report.js - Keyword Triage
frontend/js/simulator.js - Report Feed
frontend/js/feed-alerts.js - Dashboard Views
frontend/js/dashboard.js - Safety Charts
frontend/js/charts.js - UI State
frontend/js/state.js
Application API
- Express API
backend/server.js - Authentication
backend/server.js - Report Handling
backend/server.js
Persistence
- Storage & Crypto
backend/db.js - Local JSON State
ML Data & Prep
- Synthetic Reports
ml-model/dataset/generate_synthetic.py - Text Prep & Splits
ml-model/preprocessing/prepare.py - Text Normalization
ml-model/preprocessing/clean.py
ML Model
- Baseline Training
ml-model/training/train_baseline.py - Rules Baseline
ml-model/evaluation/rules_baseline.py - Model Evaluation
ml-model/evaluation/evaluate.py - Model Inference
ml-model/inference/predict.py - Inference HTTP
ml-model/inference/serve.py
Other components
- Field Worker
- Safety Staff
- Upstash Redis
Connections 23
- Field Worker → Dashboard Page: uses
README.md - Safety Staff → Dashboard Page: uses
README.md - Dashboard Page → Login & Auth UI: hosts
- Dashboard Page → Report Composer: hosts
- Report Composer → Keyword Triage: triages with
- Dashboard Page → Report Feed: shows
- Dashboard Page → Dashboard Views: shows
- Dashboard Views → Safety Charts: renders
- Login & Auth UI → Express API: authenticates via
- Report Composer → Express API: submits to
- Report Feed → Express API: loads from
- Express API → Authentication: routes auth
backend/server.js - Express API → Report Handling: routes reports
backend/server.js - Authentication → Storage & Crypto: loads and saves
backend/server.js - Report Handling → Storage & Crypto: loads and saves
backend/server.js - Storage & Crypto → Local JSON State: reads or writes
backend/db.js - Storage & Crypto → Upstash Redis: reads or writes
backend/db.js - Synthetic Reports → Text Prep & Splits: supplies data
ml-model/preprocessing/prepare.py - Text Prep & Splits → Text Normalization: normalizes with
ml-model/preprocessing/prepare.py - Baseline Training → Text Normalization: uses
- Model Evaluation → Rules Baseline: scores against
ml-model/evaluation/evaluate.py - Model Inference → Text Normalization: normalizes with
ml-model/inference/predict.py - Inference HTTP → Model Inference: calls
ml-model/inference/serve.py