How vedantika-salunkhe11/hyperlocal-rainfall works
This is a hyperlocal waterlogging and environmental-risk mapping prototype. Citizens register or sign in, view locality weather, risk, reports and hotspots, then submit and track geolocated observations; administrators review area summaries and moderate reports. The frontend accesses an Express API, which uses JSON-file persistence and weather/elevation data to support risk calculations. The graph preserves the documented analytics and account-management capabilities. Some route internals and page wiring were not sampled, so those connections are omitted rather than inferred.
Main entry points: App.jsx Application views · jsonStore.js JSON persistence · server.js HTTP server · api.js API client
Components 25
Web experience
- Application views
frontend/src/App.jsx - Risk map
frontend/src/components/RiskMap.jsx - Report submission
frontend/src/components/ReportForm.jsx - Report lists
frontend/src/components/ReportList.jsx - Hotspot view
frontend/src/pages/Hotspots.jsx - Admin management
frontend/src/pages/Admin.jsx - Analytics view
frontend/src/pages/Analytics.jsx - API client
frontend/src/services/api.js - Weather API client
frontend/src/services/weatherApi.js
API workflows
- HTTP server
backend/server.js - Authentication routes
backend/routes/auth.js - Report management
backend/controllers/reportApiController.js - Risk endpoint
backend/controllers/riskController.js - Area summaries
backend/routes/areas.js - Hotspot endpoint
backend/routes/hotspots.js - Analytics endpoint
backend/routes/analytics.js
Risk and weather
- Weather service
backend/services/weatherService.js - Risk calculation
backend/services/riskCalculator.js
Identity and data
- Access control
backend/middleware/auth.js - Account security
backend/services/authService.js - JSON persistence
backend/services/jsonStore.js
Other components
- Citizen
- Administrator
- Open-Meteo
- Open-Elevation
Connections 28
- Citizen → Application views: uses
README.md - Administrator → Application views: uses
README.md - Application views → API client: requests data
frontend/src/App.jsx - Application views → Risk map: renders
frontend/src/App.jsx - Application views → Report submission: renders
frontend/src/App.jsx - Application views → Report lists: renders
frontend/src/App.jsx - Hotspot view → API client: loads hotspots
frontend/src/pages/Hotspots.jsx - Admin management → API client: loads admin data
frontend/src/pages/Admin.jsx - Application views → Analytics endpoint: requests analytics
- API client → HTTP server: sends requests
README.md - HTTP server → Authentication routes: mounts routes
backend/server.js - HTTP server → Area summaries: mounts routes
backend/server.js - HTTP server → Hotspot endpoint: mounts routes
backend/server.js - HTTP server → Analytics endpoint: mounts routes
backend/server.js - Authentication routes → Account security: uses security
backend/routes/auth.js - Authentication routes → JSON persistence: reads and writes
backend/routes/auth.js - Access control → Account security: verifies tokens
backend/middleware/auth.js - Access control → JSON persistence: loads users
backend/middleware/auth.js - Report management → JSON persistence: reads and writes
backend/controllers/reportApiController.js - Report management → Weather service: gets weather
backend/controllers/reportApiController.js - Risk endpoint → JSON persistence: reads reports
backend/controllers/riskController.js - Risk endpoint → Weather service: gets weather
backend/controllers/riskController.js - Area summaries → JSON persistence: reads locations
backend/routes/areas.js - Area summaries → Weather service: gets area weather
backend/routes/areas.js - Hotspot endpoint → JSON persistence: reads reports
backend/routes/hotspots.js - Weather service → Open-Meteo: fetches forecasts
- Weather service → Open-Elevation: fetches elevation
- API client → Weather API client: uses weather client