How neto-santana-22/hidroscan works
Hidroscan is a water-monitoring and resource-management system: residents and staff use a role-based web interface to review readings, alerts, requests, and operational work. The backend models properties and devices, records meter readings, detects consumption anomalies, and supports valve commands, occurrences, work orders, and reports. The excerpts show key service-level calls and data access; most page-to-API wiring and several backend routes were not sampled, so those links are omitted rather than inferred.
Main entry points: MainLayout.tsx Role-based pages · occurrences/services.py Occurrence workflow · reports/services.py Report generation · App.tsx App and login
Components 28
Web interface
- App and login
frontend/src/App.tsx - Demo authentication
frontend/src/contexts/AuthContext.tsx - Role-based pages
frontend/src/layouts/MainLayout.tsx - Monitoring page
frontend/src/pages/MonitoringPage.tsx - Resident pages
frontend/src/pages/ResidentOverviewPage.tsx - Consumption page
frontend/src/pages/ResidentConsumptionPage.tsx - Resident requests page
frontend/src/pages/ResidentRequestsPage.tsx - Technician alerts page
frontend/src/pages/TechnicianAlertsPage.tsx - Equipment page
frontend/src/pages/TechnicianEquipmentPage.tsx - Technician history
frontend/src/pages/TechnicianHistoryPage.tsx - Work orders page
frontend/src/pages/TechnicianOrdersPage.tsx
Accounts and access
- Users and verification
accounts/models.py - Account services
accounts/services.py
Water monitoring
- Properties and devices
hidroscan/models.py - Device and audit services
hidroscan/services.py - Meter readings
monitoring/models.py - Reading registration
monitoring/services.py - Audit log
hidroscan/models.py
Operations
- Valve commands
control/services.py - Occurrence workflow
occurrences/services.py - Occurrences
occurrences/models.py - Resident requests
resident_requests/models.py - Work orders
workorders/models.py
Alerts and reporting
- Alerts
alerts/models.py - Anomaly evaluation
alerts/engine.py - Report generation
reports/services.py
Other components
- Resident or staff
- Email service
Connections 26
- Resident or staff → App and login: submits login
frontend/src/App.tsx - App and login → Demo authentication: calls login
frontend/src/App.tsx - App and login → Role-based pages: renders when authenticated
frontend/src/App.tsx - Role-based pages → Monitoring page: routes to
frontend/src/layouts/MainLayout.tsx - Role-based pages → Resident pages: routes to
frontend/src/layouts/MainLayout.tsx - Role-based pages → Consumption page: routes to
frontend/src/layouts/MainLayout.tsx - Role-based pages → Resident requests page: routes to
frontend/src/layouts/MainLayout.tsx - Role-based pages → Technician alerts page: routes to
frontend/src/layouts/MainLayout.tsx - Role-based pages → Equipment page: routes to
frontend/src/layouts/MainLayout.tsx - Role-based pages → Technician history: routes to
frontend/src/layouts/MainLayout.tsx - Role-based pages → Work orders page: routes to
frontend/src/layouts/MainLayout.tsx - Account services → Users and verification: creates and verifies
accounts/services.py - Account services → Email service: sends verification
accounts/services.py - Device and audit services → Properties and devices: creates device
hidroscan/services.py - Device and audit services → Audit log: writes audit
hidroscan/services.py - Reading registration → Properties and devices: locks device
monitoring/services.py - Reading registration → Meter readings: records reading
monitoring/services.py - Anomaly evaluation → Alerts: creates or updates
alerts/engine.py - Occurrence workflow → Occurrences: creates and updates
occurrences/services.py - Occurrence workflow → Audit log: records audit
occurrences/services.py - Occurrence workflow → Alerts: resolves linked alert
occurrences/services.py - Valve commands → Properties and devices: updates valve state
control/services.py - Valve commands → Audit log: records command
control/services.py - Report generation → Meter readings: queries readings
reports/services.py - Report generation → Alerts: queries alerts
reports/services.py - Report generation → Occurrences: queries occurrences
reports/services.py