How snehagawande05/jalsaathi works
JalSaathi is a civic issue-reporting and maintenance-prioritization platform. Residents discover and filter map-based reports, submit a location and optional photo, track their reports, and upvote issues; administrators manage reports and status changes. The Express API routes requests to issue, ward, hotspot, and statistics services backed by Supabase and its photo storage. The README documents hotspots and priority lists, while unsampled route and page implementations limit confidence about their exact calls; those capability links are therefore not asserted beyond documented or indexed wiring.
Main entry points: app.js HTTP routes · api.ts API client · issueService.js Issue lifecycle · page.tsx Issue reporting
Components 28
Resident web app
- Issue discovery
client/app/page.tsx - Issue reporting
client/app/report/page.tsx - Issue tracking
client/app/issues/[id]/page.tsx - My reports
client/app/my-reports/page.tsx - Admin console
client/app/admin/page.tsx - Sign-in page
client/app/login/page.tsx - Issue map
client/components/map/MapViewer.tsx - Location picker
client/components/map/LocationPickerMap.tsx - Auth state
client/lib/authContext.tsx
API and access
- API client
client/lib/api.ts - HTTP routes
server/src/app.js - Token verification
server/src/middleware/auth.js
Issue operations
- Issue endpoints
server/src/routes/issues.js - Admin endpoints
server/src/routes/admin.js - Profile endpoints
server/src/routes/me.js - Issue lifecycle
server/src/services/issueService.js - Issue photos
server/src/services/storageService.js
Area insights
- Ward endpoints
server/src/routes/wards.js - Hotspot endpoints
server/src/routes/hotspots.js - Stats endpoints
server/src/routes/stats.js - Ward lookup
server/src/services/wardService.js - Hotspot analysis
server/src/services/hotspotService.js - Priority and stats
server/src/services/statsService.js
Supabase data
- Supabase Auth
- Supabase database
- Supabase Storage
Other components
- Residents
- Maintenance admins
Connections 34
- Residents → Issue discovery: browses
client/app/page.tsx - Residents → Issue reporting: submits report
- Residents → Issue tracking: tracks and votes
- Maintenance admins → Admin console: manages issues
README.md - Issue discovery → Issue map: renders map
client/app/page.tsx - Sign-in page → Auth state: authenticates
client/lib/authContext.tsx - Auth state → Supabase Auth: signs in
client/lib/authContext.tsx - Auth state → API client: fetches profile
client/lib/authContext.tsx - Issue reporting → Location picker: selects location
- Issue reporting → API client: submits report
- Issue tracking → API client: loads issue
- My reports → API client: loads reports
- Admin console → API client: manages issues
- API client → HTTP routes: sends requests
client/lib/api.ts - HTTP routes → Issue endpoints: mounts issues
server/src/app.js - HTTP routes → Admin endpoints: mounts admin
server/src/app.js - HTTP routes → Profile endpoints: mounts profile
server/src/app.js - HTTP routes → Ward endpoints: mounts wards
server/src/app.js - HTTP routes → Hotspot endpoints: mounts hotspots
server/src/app.js - Issue endpoints → Issue lifecycle: delegates issues
- Admin endpoints → Issue lifecycle: delegates updates
- Profile endpoints → Issue lifecycle: delegates reports
- Ward endpoints → Ward lookup: loads wards
- Hotspot endpoints → Hotspot analysis: loads hotspots
- Issue lifecycle → Issue photos: uploads photos
server/src/services/issueService.js - Issue lifecycle → Supabase database: reads and writes
server/src/services/issueService.js - Ward lookup → Supabase database: reads wards
server/src/services/wardService.js - Issue photos → Supabase Storage: stores photos
server/src/services/storageService.js - Supabase Auth → HTTP routes: provides tokens
- Token verification → Supabase Auth: verifies token
server/src/middleware/auth.js - Token verification → Supabase database: reads profile
server/src/middleware/auth.js - Stats endpoints → Priority and stats: loads statistics
- Priority and stats → Supabase database: queries metrics
server/src/services/statsService.js - Hotspot analysis → Supabase database: queries hotspots