How vivekanand1190/municipal_grievance works
FixMyCity is a municipal grievance platform: citizens authenticate, file geolocated, classified complaints with photo evidence, and track or support reports; municipal staff review, assign, and resolve them, with feedback and analytics completing the loop. The graph preserves the README’s public map, duplicate checks, notifications, and analytics capabilities. Some subsystem wiring is based on README/API documentation because the corresponding source excerpts are partial; uncertain links are omitted.
Main entry points: complaints.js Complaint workflows · auth.js Authentication routes · portal.js Report and track · db.js Grievance data
Components 21
Citizen experience
- Report and track
frontend/citizen/portal.js - Complaint history
frontend/citizen/my-complaints.js - Public reports map
frontend/public-map.html - Citizen login
frontend/citizen/login.js
Administration
- Admin dashboard
frontend/admin/dashboard.js - Staff map
frontend/admin/map.html - Analytics dashboard
frontend/admin/analytics.js - Admin login
frontend/admin/login.js
Application services
- HTTP server
backend/index.js - Authentication routes
backend/routes/auth.js - Complaint workflows
backend/routes/complaints.js - JWT authorization
backend/auth.js - Complaint classifier
backend/classifier.js - Email notifications
backend/mailer.js
Data and integrations
- Grievance data
backend/db.js - Uploaded evidence
backend/uploads - Analytics charts
backend/generate_charts.py
Other components
- Citizen
- Municipal staff
- MongoDB
- Ethereal SMTP
Connections 33
- Citizen → Citizen login: signs in
- Citizen login → Authentication routes: requests session
- Authentication routes → Grievance data: looks up citizen
- Authentication routes → JWT authorization: signs token
- Citizen → Report and track: files report
- Report and track → Complaint workflows: submits complaint
- Complaint workflows → JWT authorization: checks identity
- Complaint workflows → Complaint classifier: classifies text
- Complaint workflows → Uploaded evidence: stores photo
- Complaint workflows → Grievance data: checks and records
- Report and track → Complaint workflows: checks nearby
- Report and track → Complaint workflows: supports report
- Report and track → Complaint history: opens history
- Complaint history → Complaint workflows: loads reports
- Complaint history → Complaint workflows: submits feedback
- Citizen → Public reports map: views reports
- Public reports map → Complaint workflows: requests map data
- Municipal staff → Admin login: signs in
- Admin login → Authentication routes: requests session
- Authentication routes → Grievance data: looks up admin
- Municipal staff → Admin dashboard: manages cases
- Admin dashboard → Complaint workflows: lists and updates
- Municipal staff → Staff map: views case locations
- Staff map → Complaint workflows: requests geotags
- Municipal staff → Analytics dashboard: reviews analytics
- Analytics dashboard → Complaint workflows: requests statistics
- Complaint workflows → Grievance data: queries statistics
- Complaint workflows → Analytics charts: runs chart analysis
- Complaint workflows → Email notifications: sends status update
- Email notifications → Ethereal SMTP: delivers email
- Grievance data → MongoDB: reads and writes
- HTTP server → Authentication routes: mounts routes
- HTTP server → Complaint workflows: mounts routes