Back to CleanLoop

CleanLoop Guide

Everything you need to understand, use and explore CleanLoop.

01

Overview

CleanLoop is a modern, location-aware smart waste management platform designed to connect citizens, sanitation teams, and municipal administrators.

The system exists to streamline waste reporting, ensure accountability, and provide administrators with actionable geographic insights.

Primary User Types

  • Citizens: Report waste, schedule pickups, track complaint status, and earn community recognition.
  • Municipal/Admin Staff: Manage complaints, dispatch crews, monitor geographic hotspots, and update system statuses.

High-Level Workflow

REPORT
→
COLLECT
→
RESOLVE
→
TRACK
02

Report Waste

Citizens can report uncollected waste or overflowing bins directly through their dashboard.

Submission Details

When reporting, the system captures:

  • Issue Category: Type of waste issue (e.g., Overflowing Bin, Littering, Hazard).
  • Description: Additional text details.
  • Location: Address, landmark, latitude, and longitude.
  • Image Upload: Visual proof of the issue.
  • Priority: Calculated automatically or assigned to prioritize critical areas.

Once submitted, the complaint is assigned a unique Complaint ID and enters the system as PENDING. It appears immediately on the Admin Portal for triage and assignment.

03

GPS & Location

CleanLoop relies heavily on accurate geographic data to map reports and calculate hotspots.

Location Flow

Browser GPS (Geolocation API) → Coordinates → Frontend Map → Django Backend → SQLite Database

How it Works

  • Browser Geolocation API: When a user clicks "Get Location," the browser requests permission. If granted, exact coordinates are captured.
  • Leafmap/Folium Integration: The application uses Leafmap and Folium to render interactive maps where users can place a marker.
  • Location Autofill: We use the Nominatim geocoding service to translate typed addresses into map coordinates (forward geocoding) automatically.
  • Manual Selection: If GPS is denied or unavailable, users can manually drop a pin on the map.
04

Waste Pickup

Citizens can schedule dedicated pickups for large items or specific waste types that don't fit in standard bins.

Pickup Details

  • Waste Categories: Bulky waste, E-waste, Recyclables, etc.
  • Approximate Quantity: Small, Medium, Large.
  • Address & Notes: Specific pickup instructions.
  • Date & Time: Preferred scheduling window.

Pickup Lifecycle

REQUESTED
→
ASSIGNED
→
PICKED UP
→
COMPLETED
05

Complaint Tracking

Transparency is key. Citizens can track the exact status of their submitted complaints in real-time.

Tracking Data

The tracking dashboard displays the Complaint ID, current status, assigned priority, location, and the timeline of updates.

Complaint Lifecycle

PENDING
→
ASSIGNED
→
IN PROGRESS
→
RESOLVED
06

Admin Operations

The Admin Portal is completely distinct from the citizen view. It is built for municipal staff to manage city-wide sanitation logistics.

Admin Responsibilities

Complaint Management

Review incoming complaints, update statuses, and add resolution notes.

Pickup Management

Dispatch vehicles, assign crews, and track pickup completions.

Operational Overview

Monitor system metrics, active locations, and resolution rates.

Hotspot Monitoring

Identify areas needing systemic infrastructure improvements.

07

Hotspot Analytics

CleanLoop identifies potential hotspots by analyzing the geographic density of complaints.

How it works:

  • The system evaluates the latitude and longitude of active and historical complaints.
  • It calculates the geographic distance between these points.
  • If multiple reports occur repeatedly within close proximity (a specific radius threshold), the system flags the area as a potential hotspot.
  • This allows admins to deploy additional bins or schedule more frequent collection routes in those areas.
08

Waste Segregation

Proper segregation at the source makes recycling possible and reduces landfill burden.

Wet / Organic (Green)

Food scraps, vegetable peels, leaves. DO: Compost. DON'T: Mix in plastic.

Dry / Recyclable (Blue)

Paper, clean cardboard, plastic bottles, glass. DO: Rinse containers. DON'T: Include food waste.

Hazardous & E-waste (Red/Black)

Batteries, electronics, paint, chemicals. DO: Store safely. DON'T: Throw in normal trash.

09

Man of the Month

CleanLoop features a community recognition system called "Man of the Month" to encourage civic participation.

Calculation Logic

The system counts the number of valid, submitted complaints and completed actions per user for the current month. Users with the highest participation are highlighted.

Privacy Focus

This is for community recognition, not shaming. We strictly display only first names and general areas. We do not expose emails, phone numbers, exact home addresses, or private complaint details.

View current Man of the Month →

10

API Visualizer

The API Visualizer is a technical showcase of CleanLoop's backend architecture running in real-time.

Flow

Frontend
→
HTTP Request
→
Django
→
Business Logic
→
SQLite3
→
JSON

Simultaneously, Django Channels (via ASGI) broadcasts live backend events over a WebSocket, allowing the Visualizer to render real-time charts and event logs as data flows through the application.

Open API Visualizer →

11

How the System Works

CleanLoop is built on a robust, standard web architecture.

  • Frontend: HTML, scoped CSS, and Vanilla JavaScript for maximum performance and zero bloat.
  • Mapping: Browser Geolocation API combined with Leafmap.
  • Backend: Django (Python) handles all business logic, routing, and form validation.
  • Database: SQLite3 is used as the relational database for persistent storage via the Django ORM.
  • Real-time: Django Channels and WebSockets enable the live API Visualizer.
12

Security & Privacy

CleanLoop implements standard web security practices to protect citizen data.

  • Authentication: Secure login and password hashing handled by Django's auth system.
  • Authorization: Strict isolation ensures citizens can only view and track their own reports, while admins have separate elevated access routes.
  • CSRF Protection: Cross-Site Request Forgery tokens are enforced on all form submissions.
  • Image Uploads: User-uploaded images are sandboxed in the media directory.
13

Frequently Asked Questions

Who can use CleanLoop?

Any registered citizen can report waste. Municipal staff use a separate admin portal.

Can I use my GPS location?

Yes. If you grant browser permission, the system will accurately map your coordinates.

What happens if GPS permission is denied?

You can still manually type your address or drop a pin on the interactive map.

How do I track my complaint?

Log into your dashboard and navigate to "Track Complaints" to see real-time status updates.

Why SQLite3?

It provides a robust, file-based relational database perfect for the scale and portability requirements of this platform.