How asjayswal01/safai_setu works
Safai Setu is a Flutter waste-management app for citizens, sanitation workers, and department heads. A citizen reports a geolocated, photo-backed complaint; department heads review complaints and assign work; workers complete tasks and submit proof; heads oversee progress and citizens track status. The README documents these capabilities and the service/backend stack. Dart implementation excerpts were not provided, so app-level links below reflect documented workflows rather than inspected calls; the notification function’s Supabase and FCM interactions are directly visible in its source.
Main entry points: head Head console · auth_gate.dart Role login · main.dart App entry · screens Citizen screens
Components 20
App shell
- App entry
lib/main.dart - Role login
lib/screens/auth/auth_gate.dart - Windows Flutter host
windows/runner/flutter_window.cpp - Windows window
windows/runner/win32_window.cpp
Citizen services
- Citizen screens
lib/screens - Complaint workflow
lib/screens/complaints - Hotspot map
lib/screens/hotspots/waste_hotspot_page.dart - Profiles
lib/screens/profile/profile_page.dart
Department operations
- Head console
lib/screens/head - Worker tasks
lib/screens/worker - Complaint service
lib/services/complaint_service.dart - Task service
lib/services/task_service.dart - Route optimizer
lib/services/route_optimization_service.dart - Location service
lib/services/location_service.dart
Backend and integrations
- Supabase backend
- Notification service
lib/services/notification_service.dart - Push dispatch
supabase/functions/send-notification/index.ts - Firebase messaging
- Google Maps
Other components
- App users
Connections 24
- App users → App entry: opens app
README.md - App entry → Role login: starts role flow
- Role login → Citizen screens: routes citizens
README.md - Role login → Head console: routes heads
README.md - Role login → Worker tasks: routes workers
README.md - Citizen screens → Complaint workflow: reports issues
README.md - Complaint workflow → Complaint service: submits complaint
- Complaint service → Supabase backend: stores reports
README.md - Citizen screens → Hotspot map: views hotspots
README.md - Hotspot map → Supabase backend: loads complaints
- Head console → Complaint service: manages reports
README.md - Head console → Task service: assigns tasks
README.md - Worker tasks → Task service: updates tasks
README.md - Task service → Supabase backend: stores tasks
README.md - Head console → Route optimizer: optimizes routes
README.md - Head console → Location service: tracks workers
README.md - Location service → Google Maps: provides map location
README.md - Head console → Google Maps: shows live map
README.md - Profiles → Supabase backend: manages profile
README.md - Notification service → Push dispatch: requests push
supabase/functions/send-notification/index.ts - Push dispatch → Supabase backend: reads tokens and records history
supabase/functions/send-notification/index.ts - Push dispatch → Firebase messaging: sends push
supabase/functions/send-notification/index.ts - Windows Flutter host → Windows window: inherits window
windows/runner/flutter_window.cpp - App entry → Windows Flutter host: runs in host