How soumadipdutta/sparkles works
Sparkles is a smart-water monitoring portal with statewide and plant-level monitoring, analytics and reports, and critical-alert/incident-response views. The main user workflow is to open a monitoring view, inspect water-quality and operational status, then review trends or obtain a report; alert handling is a separate capability. The tree also contains a standalone FastAPI service for health-risk checks, SMS awareness, and PDF reports. The README provides no further architecture detail, and several integrated routes and frontend API calls were not sampled, so those internal links are omitted.
Main entry points: Backend/main.py Standalone API App · App.jsx Portal Router · website/main.py Integrated API App · sms_service.py SMS Service
Components 22
Monitoring Portal
- Portal Router
SIH/integrated_frontend/src/App.jsx - Statewide Overview
SIH/integrated_frontend/src/pages/StatewideOverview.jsx - Plant Telemetry
SIH/integrated_frontend/src/pages/PlantTelemetry.jsx - Reports Analytics
SIH/integrated_frontend/src/pages/ReportsAndAnalytics.jsx - Critical Alerts
SIH/integrated_frontend/src/pages/CriticalAlerts.jsx - Frontend API Client
SIH/integrated_frontend/src/services/api.js
Integrated API
- Integrated API App
SIH/integrated_backend/website/main.py - Dashboard Routes
SIH/integrated_backend/website/routes/dashboard.py - Settings Routes
SIH/integrated_backend/website/routes/settings.py - Reports Routes
SIH/integrated_backend/website/routes/reports.py - Dashboard Service
SIH/integrated_backend/website/services/dashboard.py - Settings Service
SIH/integrated_backend/website/services/settings.py - Telemetry Processor
SIH/integrated_backend/website/services/telemetry_processor.py - Report Data Service
SIH/integrated_backend/website/services/report_service.py - Firebase Access
SIH/integrated_backend/website/services/firebase.py
Standalone API
- Standalone API App
Backend/main.py - Health Risk Check
Backend/risk_services/health_risks.py - SMS Service
Backend/services/sms_service.py
Report Generation
- Report Data Service
Backend/services/report_service.py - PDF Report Builder
Backend/services/report_download_service.py
Other components
- Portal User
- SMS Provider
Connections 16
- Portal User → Portal Router: uses
- Portal Router → Statewide Overview: routes to
- Portal Router → Plant Telemetry: routes to
- Portal Router → Reports Analytics: routes to
- Portal Router → Critical Alerts: routes to
- Integrated API App → Dashboard Routes: registers
- Integrated API App → Settings Routes: registers
- Integrated API App → Reports Routes: registers
- Report Data Service → Firebase Access: reads device data
- Standalone API App → Health Risk Check: calls
- Standalone API App → SMS Service: calls
- Standalone API App → Report Data Service: calls
- Standalone API App → PDF Report Builder: generates PDF
- Standalone API App → Health Risk Check: checks risk
- Standalone API App → Report Data Service: loads report data
- SMS Service → SMS Provider: sends message