Back to Projects

Case Study

SwachhNagar

A civic tech platform for smart waste management — enabling real-time garbage tracking, citizen complaint routing, and route optimization for municipal corporations. Built for Smart India Hackathon 2024.

Full Stack Developer React · Node.js · Express MongoDB Maps API SIH 2024
SwachhNagar — Smart Waste Management Dashboard

SwachhNagar dashboard — real-time garbage tracking, complaint management, and collection route optimization

SIH
Selected for Smart India Hackathon 2024 via Vadodara Hackathon
3-in-1
Citizen app · Admin dashboard · Collection crew tracking
Real-time
Live garbage vehicle tracking and complaint status updates

01 — Problem

India's Waste Management Crisis

Municipal corporations across India struggle with inefficient garbage collection routes, zero visibility into collection status, and an avalanche of untracked citizen complaints. Citizens have no way to know when their garbage will be collected, and corporations have no real-time data on where their vehicles are or which areas are overloaded.

No Route Visibility

Garbage collection crews follow fixed paper routes with no optimization — leading to missed areas and redundant trips.

Lost Complaints

Citizens call helplines that log complaints on paper — with no tracking, no escalation, and no accountability for resolution.

Zero Real-Time Data

Municipal admins have no live map of collection status, vehicle positions, or hotspot zones that need urgent attention.

No Citizen Feedback Loop

After filing a complaint, citizens receive zero updates — breeding distrust between municipalities and residents.


02 — Solution

Smart, Connected Waste Management

SwachhNagar connects citizens, collection crews, and municipal administrators on one platform — giving every stakeholder real-time visibility and automated workflows.

Core Insight: The problem isn't a lack of garbage collection staff — it's a lack of coordination and visibility. By adding a lightweight digital layer on top of existing infrastructure (GPS tracking + a complaint portal), the same workforce can serve 2–3x more area effectively.

The platform has three distinct interfaces: a citizen portal for filing and tracking complaints, an admin dashboard for monitoring city-wide collection status and managing crews, and a crew mobile view showing optimized daily routes and assigned complaint pickups.


03 — Features

What SwachhNagar Does

Live Vehicle Tracking

GPS-based real-time tracking of collection vehicles on an interactive map. Admins see all vehicles, routes, and estimated arrival times at a glance.

Citizen Complaint System

Citizens can file garbage overflow complaints with location, photo, and description. Complaints are auto-routed to the nearest available crew with a ticket ID for tracking.

Route Optimization

Admin panel generates optimized daily routes for collection crews based on area density, complaint hotspots, and vehicle capacity — reducing fuel costs and missed pickups.

Real-Time Status Updates

Citizens receive live updates as their complaint progresses — Received → Assigned → In Progress → Resolved. No more calling helplines to check status.

Admin Analytics Dashboard

Municipal admins see zone-wise complaint heatmaps, collection efficiency metrics, crew performance, and daily/weekly trend charts.

Crew Mobile Interface

Collection crews get a simplified mobile view with their assigned route, complaint addresses, and one-tap status updates as they complete pickups.


04 — Tech Stack

Architecture & Technologies

Frontend
  • React.js
  • React Router
  • Google Maps API
  • Chart.js
  • Tailwind CSS
Backend
  • Node.js
  • Express.js
  • MongoDB Atlas
  • Mongoose ORM
  • JWT Auth
Infra & APIs
  • Google Maps JS API
  • Directions API
  • Geolocation API
  • Socket.io (live)
  • Vercel Deploy
Category Technology Why This Choice
Database MongoDB Atlas Flexible schema for complaint data with varying metadata; geospatial indexing for location queries
Maps Google Maps JS API Reliable in India with Directions + Distance Matrix APIs needed for route optimization
Real-time Socket.io WebSocket-based live updates for vehicle positions and complaint status without polling
Auth JWT + Role-based Three distinct user roles (citizen, crew, admin) with route-level permission guards
Frontend React + Chart.js Dynamic dashboard with real-time re-rendering; Chart.js for analytics visualizations

05 — Challenges & Learnings

Hard Problems Solved

Real-Time Vehicle Tracking at Scale

Broadcasting GPS coordinates from multiple collection vehicles simultaneously to all connected admin dashboards without excessive server load was a key challenge.

Solution: Implemented a Socket.io room-based architecture where each municipal zone has its own room. Vehicles emit position updates to their zone room only — admins subscribe to only the zones they manage. This reduced server broadcast load by ~80% compared to broadcasting to all clients.

Complaint Location Accuracy in Dense Urban Areas

Browser Geolocation API returns imprecise coordinates in dense urban areas — sometimes off by 200–300 meters — which could route crews to the wrong lane.

Solution: Added a map-pin drag interface. After GPS auto-fill, citizens can drag the pin to the exact complaint location on the map. The system stores the manually adjusted coordinates if they differ from GPS by more than 50 meters.

Route Optimization Within API Cost Limits

Google Directions API charges per request — generating optimized routes for 20+ daily stops per crew would cost significantly on a hackathon budget.

Solution: Implemented a nearest-neighbor greedy algorithm as a pre-filter to cluster stops geographically before calling the Directions API. This reduced API calls by 70% while maintaining route quality within acceptable bounds for a city-scale deployment.

06 — Impact

What SwachhNagar Achieves

SwachhNagar transforms waste management from a disconnected, paper-based operation into a real-time, data-driven system. Municipal corporations gain visibility into their entire fleet and complaint backlog at a glance, while citizens get a transparent feedback loop for the first time.

This project deepened my skills in real-time systems with Socket.io, geospatial data handling with MongoDB, maps integration, and designing multi-role platforms where different user types need radically different interfaces from the same backend.

Hackathon Achievement: SwachhNagar was selected for Smart India Hackathon 2024 via the Vadodara Hackathon 5.0 regional qualifier at Parul University — competing among top student teams across India building civic tech solutions.
View on GitHub All Projects