How hwy21i/sirasense works
SiraSense is a crowdsourced road-hazard reporting and repair-prioritization application for Addis Ababa. Citizens submit hazard details, photos, and mapped locations; the client calculates transparent priority scores and presents reports on maps. Administrators review reports and update their status. The sampled client service uses in-memory mock data, while the sampled Express backend exposes a health endpoint; the README describes broader GIS, duplicate-detection, persistence, export, and offline capabilities that are not represented by sampled server implementation. Arrows follow explicit routing, imports, or documented behavior.
Main entry points: App.tsx App routing · hazardService.ts Hazard service · ReportHazardWizardPage.tsx Hazard report wizard · InteractiveMapPage.tsx Interactive hazard map
Components 23
Citizen experience
- Hazard report wizard
client/src/pages/citizen/ReportHazardWizardPage.tsx - Location picker
client/src/components/map/LocationPickerMap.tsx - Photo upload
client/src/components/common/FileDropzone.tsx
Map and prioritization
- Hazard service
client/src/services/hazardService.ts - Priority calculator
client/src/utils/priorityCalculator.ts - Demo hazard data
client/src/data/mockData.ts - Interactive hazard map
client/src/pages/citizen/InteractiveMapPage.tsx - Map visualization
client/src/components/map/HazardMap.tsx - Priority score widget
client/src/components/home/PriorityScoreWidget.tsx
Report administration
- Reports queue
client/src/pages/admin/AdminReportsPage.tsx - Report review
client/src/pages/admin/AdminReportReviewPage.tsx - Priority settings
client/src/pages/admin/SuperAdminSettingsPage.tsx
Client platform
- App routing
client/src/App.tsx - Offline reports
client/src/context/OfflineContext.tsx - Authentication context
client/src/context/AuthContext.tsx - Service worker
client/public/sw.js
API backend
- Health route
server/src/routes/health.routes.ts - Health controller
server/src/controllers/health.controller.ts - Express API app
server/src/app.ts - API router
server/src/routes/index.ts - Environment config
server/src/config/env.ts
Other components
- Citizen
- Administrator
Connections 26
- Citizen → App routing: uses
- Administrator → App routing: uses
- App routing → Hazard report wizard: routes to
client/src/App.tsx - App routing → Interactive hazard map: routes to
client/src/App.tsx - App routing → Reports queue: routes to
client/src/App.tsx - App routing → Report review: routes to
client/src/App.tsx - App routing → Priority settings: routes to
client/src/App.tsx - Hazard report wizard → Hazard service: submits to
client/src/pages/citizen/ReportHazardWizardPage.tsx - Hazard report wizard → Offline reports: queues offline
client/src/pages/citizen/ReportHazardWizardPage.tsx - Hazard report wizard → Location picker: uses
client/src/pages/citizen/ReportHazardWizardPage.tsx - Hazard report wizard → Photo upload: uses
client/src/pages/citizen/ReportHazardWizardPage.tsx - Hazard service → Priority calculator: calculates scores
client/src/services/hazardService.ts - Hazard service → Demo hazard data: reads and updates
client/src/services/hazardService.ts - Interactive hazard map → Hazard service: loads reports
client/src/pages/citizen/InteractiveMapPage.tsx - Interactive hazard map → Map visualization: renders
client/src/pages/citizen/InteractiveMapPage.tsx - Reports queue → Hazard service: loads reports
client/src/pages/admin/AdminReportsPage.tsx - Report review → Hazard service: reviews and updates
client/src/pages/admin/AdminReportReviewPage.tsx - Report review → Map visualization: renders
client/src/pages/admin/AdminReportReviewPage.tsx - Priority score widget → Priority calculator: calculates score
client/src/components/home/PriorityScoreWidget.tsx - Priority score widget → Demo hazard data: uses demo data
client/src/pages/public/LandingPage.tsx - Authentication context → Demo hazard data: loads demo users
client/src/context/AuthContext.tsx - Express API app → API router: mounts
server/src/app.ts - Express API app → Environment config: configures from
server/src/app.ts - API router → Health route: registers
server/src/routes/index.ts - Health route → Health controller: dispatches to
server/src/routes/health.routes.ts - Service worker → Offline reports: supports offline mode