DEV Community

Cover image for GeoSmart: Citizen-Driven Waste Issue Reporting Using Visual and Location Intelligence with a Route Optimization
Varun Raj
Varun Raj

Posted on

GeoSmart: Citizen-Driven Waste Issue Reporting Using Visual and Location Intelligence with a Route Optimization

Team Members
This project was developed by:

  1. @varun_raj_ -BALA SUNDAR VARUN RAJ KALA
  2. @vitthanala_kalyanvenkat_ -KALYAN VENKAT
  3. @varshith_uppalapati - VARSHITH
  4. @nikhil_gajula - NIKHIL

We would like to express our sincere gratitude to @chanda_rajkumar for their valuable guidance and support throughout this project.

Their insights into system design, architecture, and development played a key role in shaping GEOSMART.

GEOSMART — Smart Waste Management System using Python Full Stack, MongoDB, GIS and AI
GEOSMART is a Python Full Stack Smart Waste Management Platform that transforms traditional municipal complaint systems into an AI-powered intelligent waste command centre. It combines citizen complaint registration, image-based AI verification, geographic hotspot detection, severity scoring, A* route optimization, and a real-time analytics dashboard — all in one unified runtime backed by MongoDB for application persistence.

Why GEOSMART — the civic problem it solves****
Urban waste management remains one of the most critical challenges for modern cities. Overflowing garbage bins, illegal dumping, delayed municipal response, and lack of complaint transparency create serious public health concerns and environmental damage. Most complaint systems today are reactive — citizens raise complaints manually, authorities verify them physically, and response often comes late because there is no intelligent prioritization mechanism.

To solve this real-world civic challenge, we built GEOSMART. The platform is designed to make the entire complaint-to-resolution lifecycle intelligent, transparent, and geographically aware. Instead of a passive ticketing portal, GEOSMART becomes an active waste intelligence layer sitting between citizens and municipal operations.

GEOSMART combines Complaint Intelligence + Artificial Intelligence + Geographic Intelligence + Operational Optimization into a single Python Full Stack platform. Flask is the runtime contract, and MongoDB is the application persistence layer for all complaints, hotspots, user records, and analytics data.

This matters because the scale and complexity of urban waste complaints cannot be managed through spreadsheets or manual ticketing. By unifying AI inference, GIS mapping, severity scoring, and route planning inside one application, GEOSMART gives municipal teams the situational awareness they need to act faster and with much higher confidence about where to deploy resources first.

System architecture
GEOSMART was designed as a complete Python Full Stack application so that all core services — APIs, AI inference, complaint management, routing, analytics, and administration — run inside one unified runtime. The frontend provides a responsive municipal portal built with HTML, TailwindCSS, and JavaScript. Flask acts as the application runtime, and MongoDB serves as the central storage backbone for all dynamic records including complaints, hotspots, user profiles, and AI verification results.

{
  "frontend": "HTML + TailwindCSS + JavaScript",
  "backend": "Flask (Python)",
  "database": "MongoDB",
  "machine_learning": ["YOLO", "CNN"],
  "mapping": "GIS + Leaflet Maps",
  "routing": "A* Pathfinding",
  "analytics": "Chart.js"
}
Enter fullscreen mode Exit fullscreen mode

Flask was chosen because it integrates easily with Python ML libraries like TensorFlow, OpenCV, and Ultralytics YOLO. It handles authentication, complaint APIs, AI model inference, hotspot generation, route planning, admin dataset validation, model training pipeline, and dashboard analytics — all within the same Python process. That single-runtime design removes the deployment complexity that comes from splitting web serving and ML inference across separate services.

MongoDB as the application persistence layer
MongoDB acts as the central storage backbone of GEOSMART. Complaint records are dynamic documents containing user information, uploaded evidence, GPS coordinates, AI prediction results, verification flags, severity scores, hotspot linkages, status updates, and timestamps. Instead of rigid SQL tables, MongoDB allows flexible document storage that grows naturally as complaint metadata becomes richer over time.

This document-oriented design fits GEOSMART well because no two complaint records look exactly the same. A litter complaint may carry different verification metadata than an overflow complaint. A hotspot document aggregates multiple complaint references and carries its own severity calculation. MongoDB handles that variation cleanly without forcing the project into rigid table design for every evolving civic data type.

{
  "complaint_id": "CMP-001",
  "issue_type": "overflow",
  "priority": "high",
  "location": "Ward 11",
  "latitude": 12.9349,
  "longitude": 77.6107,
  "status": "Pending",
  "severity_score": 72,
  "verification": {
    "model": "YOLO",
    "predicted_class": "organic waste",
    "confidence": 0.89,
    "verified": true
  }
}
Enter fullscreen mode Exit fullscreen mode


Because these collections are separated by responsibility, the system can query them efficiently for different tasks. Flask can retrieve active complaints in a ward, detect hotspot clusters, fetch user complaint history, and power the analytics dashboard — all through the same MongoDB connection. This makes the database useful not only as a storage engine but also as an operational intelligence layer for municipal teams.

Complaint flow — from citizen to resolution
The GEOSMART pipeline begins when a citizen submits a complaint. Each submission carries a waste issue type, location description, GPS coordinates, an uploaded image, a description, and a priority estimate. Flask receives the complaint, stores the raw record in MongoDB, then immediately passes the uploaded image through the AI verification pipeline before updating the complaint document with model results and a computed severity score.

# Complaint document stored in MongoDB
{
  "complaint_id": "CMP-001",
  "issue_type": "overflow",
  "location": "Ward 11",
  "latitude": 12.9349,
  "longitude": 77.6107,
  "status": "Pending",
  "severity_score": 72,
  "verification": {
    "model": "YOLO",
    "predicted_class": "organic waste",
    "confidence": 0.89,
    "verified": true
  }
}

# Hotspot document stored in MongoDB
{
  "hotspot_id": "HS-11",
  "zone": "Ward 11",
  "complaints": 18,
  "severity": "Critical",
  "center_lat": 12.932,
  "center_lon": 77.612
}
Enter fullscreen mode Exit fullscreen mode

This automated verification step is what makes GEOSMART different from a plain complaint portal. Instead of routing every complaint to a human reviewer first, the system uses YOLO and CNN models to confirm whether the uploaded image actually contains waste and what category of waste it represents. That confidence score feeds directly into the severity calculation, which then determines complaint priority in the municipal queue.

Image-based AI verification using YOLO and CNN
GEOSMART uses two AI models for waste image verification. YOLO handles real-time object detection within the complaint image, identifying whether waste objects are present and localizing them. CNN handles waste classification, assigning the detected waste to a category such as organic, recyclable, or hazardous. Both models run inside Flask using the Ultralytics YOLO library and TensorFlow, which means inference happens in the same Python process that handles complaint storage and routing — no external model server required.


CNN analysis in action — plastic bottle detected, classified as useful for recycling with disposal guidance


High-confidence paper classification at 84% — model correctly guides dry paper to recyclable stream


Metal can classified at 87% confidence — sent to dry-waste or scrap stream after food residue removal
The admin panel exposes a model training interface so that municipal teams can upload new labeled datasets and trigger retraining runs directly from the platform. This means GEOSMART improves over time as more verified complaint images accumulate in the system. The training pipeline and the inference pipeline share the same Flask runtime, which makes model versioning and deployment straightforward compared to a system where training and serving are split across different infrastructure.

YOLO detects waste objects in uploaded complaint images. CNN classifies the detected waste into categories. Both models run inside the Flask runtime using Python ML libraries, and admins can trigger retraining directly from the GEOSMART admin panel using accumulated MongoDB complaint data.

Geographic hotspot detection using GIS
Once complaints are verified and stored in MongoDB, GEOSMART runs a geographic clustering layer that groups nearby complaints into hotspots. Each hotspot captures a zone identifier, the number of contributing complaints, an aggregated severity rating, and a center coordinate. The platform renders these hotspots on an interactive Leaflet map so that municipal teams can see at a glance which wards are experiencing the heaviest waste pressure.


Community hotspot snapshot showing Ward 11 cluster with dispatch recommendation, ETA, and full hotspot queue ranked by severity

The hotspot layer updates dynamically as new complaints come in. A ward that receives several high-severity complaints within a short window will have its hotspot severity escalated automatically, which surfaces it higher in the municipal priority queue. This geographic intelligence layer is what transforms GEOSMART from a complaint list into a situational awareness tool.

{
  "runtime": "Flask-served Python web app",
  "complaint_api": "/api/complaints",
  "ai_inference": "/api/verify",
  "hotspot_engine": "/api/hotspots",
  "route_planner": "/api/route",
  "analytics_dashboard": "/api/analytics",
  "admin_training": "/api/admin/train",
  "mongodb_collections": [
    "complaints",
    "hotspots",
    "users"
  ],
  "map_layer": "Leaflet.js + GIS coordinates from MongoDB",
  "deployment": "Flask run / Gunicorn"
}
Enter fullscreen mode Exit fullscreen mode

A* route optimization for municipal teams
Knowing which areas have the most severe waste complaints is only part of the operational problem. Municipal teams also need to know the most efficient order in which to visit those sites. GEOSMART includes an A* pathfinding layer that takes the active hotspot map and produces an optimized collection route for field teams.

The route planner reads hotspot center coordinates from MongoDB, ranks them by severity, and then applies A* search to compute a route that minimizes total travel distance while prioritizing critical zones. The resulting route is displayed on the Leaflet map alongside the hotspot layer, giving field teams a complete operational picture in a single view. This optimization step is one of the most practically valuable features in GEOSMART because it directly reduces vehicle time and fuel cost for municipal operations.

Severity scoring and complaint prioritization
GEOSMART does not treat all complaints equally. Each verified complaint receives a severity score computed from the AI model confidence, the type of waste detected, the number of existing complaints in the same geographic zone, and any escalation flags raised by previous unresolved complaints in that ward. This score determines the complaint's position in the municipal queue and feeds into the hotspot severity calculation.

This prioritization layer is the operational intelligence at the heart of GEOSMART. Without it, municipal teams would work through complaints in arrival order regardless of actual impact. With it, critical overflow situations in high-density wards automatically surface above routine litter reports, and the system never lets a high-severity complaint sit unacknowledged because of queue depth.

Real-time analytics dashboard
The GEOSMART analytics dashboard gives administrators a live view of complaint volume, resolution rates, hotspot distribution, AI verification accuracy, and field team activity. Chart.js renders the visualization layer, pulling aggregated data from MongoDB through Flask API endpoints. The dashboard updates as complaints are submitted and resolved, which means administrators always have an accurate operational picture without needing to run manual reports.

Because all complaint, hotspot, and resolution data is stored as structured documents in MongoDB, the analytics layer can aggregate across any dimension — by ward, by waste type, by time window, or by resolution speed. This makes GEOSMART useful not only for day-to-day operations but also for longer-term planning decisions about where to increase bin capacity, improve collection frequency, or target public awareness campaigns.

The analytics dashboard reads complaint and hotspot data from MongoDB through Flask APIs and renders real-time charts with Chart.js. Because all operational records share the same MongoDB persistence layer, administrators can drill into any ward, waste category, or time window without needing separate reporting infrastructure.

Frontend portal and admin panel
The frontend provides a responsive municipal portal built with HTML, TailwindCSS, and JavaScript. Citizens access the complaint registration page, live complaint tracking dashboard, and hotspot visualization map. Municipal administrators access the route planner view, waste analysis page, admin model training panel, and user profile management area. TailwindCSS handled mobile-friendly UI construction, while JavaScript managed client-side interactivity, Leaflet map rendering, and real-time API communication with Flask.

The admin model training panel deserves special mention. It exposes the AI training pipeline directly in the browser so that non-developer administrators can upload labeled waste image datasets, trigger training runs, and review model accuracy metrics without writing code. This design decision means that GEOSMART improves its AI accuracy over time through normal administrative workflows rather than requiring a separate ML operations team.

Key takeaways
Flask, MongoDB, GIS, and AI became the right combination for GEOSMART for four reasons. First, Flask gave the project a single Python runtime for UI delivery, complaint APIs, AI inference, hotspot generation, route planning, and analytics. Second, MongoDB provided a flexible persistence model for complaint documents, hotspot records, and user data whose structures naturally vary and evolve as the platform adds new intelligence features. Third, the GIS and Leaflet layer transformed raw complaint coordinates into actionable geographic intelligence that field teams can act on immediately. Fourth, A* route optimization converted that geographic intelligence into concrete operational guidance, reducing the human overhead of deciding where to go next.

For a civic AI application, this kind of unification is not just a deployment convenience. It improves reliability and impact. A smart waste management system becomes much more effective when its complaint intake, AI verification, geographic analysis, and routing optimization share one execution environment, and when its persistence layer is designed for evolving document-shaped civic data. That is the real architectural win of the GEOSMART Python Full Stack platform.

Execution
The final deployed version of GEOSMART is available through the hosted application, the project repository, and the embedded demo recording below. This makes the implementation easy to inspect both as source code and as a running system.

GitHub Repository
https://github.com/kalyan4518/GEOSMART

Video Demonstration
The project walkthrough is embedded below and can be played directly inside this file.

Demo

Watch GEOSMART Demo on YouTube

GEOSMART is a Flask-based Python Full Stack project that uses MongoDB for application persistence, including complaint records, hotspot data, user profiles, and AI verification results. GIS and A* route optimization are integrated to deliver geographic and operational intelligence for municipal waste management teams.

Top comments (0)