How viveeeekkkkkkk/infrasense works
INFRASENSE is a smart-city infrastructure monitoring application combining a public-facing web interface, citizen incident reporting, and an administrative monitoring dashboard. The main workflow is to open the app, inspect infrastructure status and alerts, and optionally submit a complaint; administrators can review monitoring data and schedule maintenance. The graph also preserves the map, location, and shared UI capabilities. Backend internals are not detailed in the supplied excerpts, so its implementation and persistence are not inferred.
Main entry points: App.jsx App routing · Dashboard.jsx Dashboard · LocationContext.jsx Location services · AuthContext.jsx Admin state
Components 20
Web application
- App routing
frontend/src/App.jsx - Homepage
frontend/src/pages/Homepage.jsx - Backend API and sockets
backend/server.js
Monitoring and maps
- Dashboard
frontend/src/pages/Dashboard.jsx - Alerts page
frontend/src/pages/Alerts.jsx - Map page
frontend/src/pages/MapPage.jsx - Interactive map
frontend/src/components/MapView.jsx - Status grid
frontend/src/components/StatusGrid.jsx - Trend charts
frontend/src/components/Charts.jsx - Alert panel
frontend/src/components/AlertPanel.jsx - Maintenance view
frontend/src/components/MaintenanceView.jsx
Citizen reporting
- Complaint workflow
frontend/src/pages/Complaints.jsx
Shared state and UI
- Admin state
frontend/src/context/AuthContext.jsx - Location services
frontend/src/context/LocationContext.jsx - Theme state
frontend/src/context/ThemeContext.jsx - Navigation
frontend/src/components/Navbar.jsx - Theme toggle
frontend/src/components/ThemeToggle.jsx - Footer
frontend/src/components/Footer.jsx
Other components
- Visitor or admin
- Nominatim geocoding
Connections 30
- Visitor or admin → App routing: opens
README.md - App routing → Homepage: routes to
frontend/src/App.jsx - App routing → Dashboard: routes to
frontend/src/App.jsx - App routing → Complaint workflow: routes to
frontend/src/App.jsx - App routing → Alerts page: routes to
frontend/src/App.jsx - App routing → Map page: routes to
frontend/src/App.jsx - App routing → Navigation: renders
frontend/src/App.jsx - App routing → Footer: renders
frontend/src/App.jsx - App routing → Admin state: provides
frontend/src/App.jsx - App routing → Location services: provides
frontend/src/App.jsx - App routing → Theme state: provides
frontend/src/App.jsx - Dashboard → Status grid: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Trend charts: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Alert panel: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Maintenance view: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Backend API and sockets: fetches data
frontend/src/pages/Dashboard.jsx - Dashboard → Backend API and sockets: opens socket
frontend/src/pages/Dashboard.jsx - Complaint workflow → Backend API and sockets: submits complaint
frontend/src/pages/Complaints.jsx - Complaint workflow → Location services: uses location
frontend/src/pages/Complaints.jsx - Complaint workflow → Admin state: checks admin
frontend/src/pages/Complaints.jsx - Dashboard → Admin state: checks admin
frontend/src/pages/Dashboard.jsx - Homepage → Location services: uses location
frontend/src/pages/Homepage.jsx - Homepage → Admin state: checks admin
frontend/src/pages/Homepage.jsx - Map page → Interactive map: renders
frontend/src/pages/MapPage.jsx - Interactive map → Location services: uses location
frontend/src/components/MapView.jsx - Location services → Nominatim geocoding: geocodes addresses
frontend/src/context/LocationContext.jsx - Interactive map → Nominatim geocoding: reverse geocodes
frontend/src/components/MapView.jsx - Navigation → Admin state: uses admin state
frontend/src/components/Navbar.jsx - Navigation → Theme toggle: renders
frontend/src/components/Navbar.jsx - Theme toggle → Theme state: toggles theme
frontend/src/components/ThemeToggle.jsx