An AI-powered waste-management platform that helps identify emerging waste hotspots, analyze citizen reports, and support preventive municipal action.
Live Website:
waste-watch-sigma.vercel.app
Live Website:
https://wastewatch-backend-vbw6.onrender.com
WasteWatch AI uses role-based authentication with three roles:
CITIZEN— users can register themselves through the application.MUNICIPAL_OFFICER— accounts are created by an Admin.ADMIN— manages Municipal Officer accounts.
The Admin account is created from the backend using environment variables.
Set the following variables in the backend environment:
ADMIN_EMAIL=admin@wastewatch.ai
ADMIN_PASSWORD=<YOUR_ADMIN_PASSWORD>Waste management is often reactive:
Waste accumulates
↓
Citizen reports the problem
↓
Municipality receives complaint
↓
Cleanup is scheduled
WasteWatch AI aims to be one step ahead.
The platform combines citizen reports, location, time, waste category, severity, and historical patterns to identify areas that may be developing into waste hotspots.
The goal is to support a transition from:
Reactive Cleanup → Preventive Action
Traditional waste management often responds after waste has already accumulated.
A few isolated reports may not appear urgent individually, but when reports begin increasing in the same location over time, they can indicate an emerging hotspot.
WasteWatch AI focuses on identifying these patterns early and helping municipal teams decide where preventive action may be needed.
WasteWatch AI connects the complete workflow:
Citizen Report
↓
Visual Intelligence
↓
Location + Time Analysis
↓
Historical Pattern Analysis
↓
Hotspot Risk
↓
Cause Analysis
↓
Intervention Recommendation
↓
What-If Comparison
↓
Preventive Action
Citizens can:
- Create an account
- Log in securely
- Report waste
- Upload waste images
- Select waste categories
- Provide location information
- Add descriptions
- Track submitted reports
Public registration automatically creates:
role = CITIZEN
Users cannot select their role during registration.
Municipal officers can eventually:
- View citizen reports
- Analyze report patterns
- Monitor emerging hotspots
- View hotspot locations on a map
- Analyze severity
- Analyze waste categories
- Prioritize locations
- Plan interventions
- Use the What-If Simulator
- Track intervention outcomes
Municipal officers cannot publicly register.
Their accounts are created by an Admin.
Admins manage municipal accounts.
Planned capabilities include:
- Create Municipal Officer accounts
- Activate/deactivate municipal accounts
- Assign municipal officers to municipalities/zones
- Manage municipal access
Admin functionality will be expanded in later development phases.
WasteWatch AI uses role-based authentication.
There are three roles:
CITIZEN
MUNICIPAL_OFFICER
ADMIN
The user's role is determined by the backend.
The user does not select their role during registration.
Register
↓
FastAPI
↓
PostgreSQL
↓
role = CITIZEN
Admin
↓
Creates account
↓
role = MUNICIPAL_OFFICER
↓
Officer logs in
Admin Account
↓
role = ADMIN
WasteWatch AI
│
▼
React + Vite
│
REST API
│
▼
FastAPI
│
┌──────────────┼──────────────┐
│ │ │
Authentication Reports Analytics
│ │ │
└──────────────┼──────────────┘
│
▼
PostgreSQL
│
PostGIS
│
▼
AI / Intelligence
│
┌───────────┼───────────┐
│ │ │
YOLO XGBoost Analytics
│ │ │
└───────────┼───────────┘
▼
Hotspot Prediction
│
▼
Intervention Planning
│
▼
What-If Simulator
- React.js
- Vite
- Tailwind CSS
- React Router
- Lucide React
- Leaflet.js
- OpenStreetMap
- Python
- FastAPI
- SQLAlchemy 2.x
- Alembic
- Pydantic
- JWT Authentication
- Password Hashing
- PostgreSQL
- PostGIS
- Neon PostgreSQL
- YOLO
- OpenCV
- XGBoost
- scikit-learn
- Pandas
- NumPy
- Vercel — Frontend
- Render — Backend
- Neon — PostgreSQL
- Git
- GitHub
- VS Code
- Postman
- Swagger / OpenAPI
WasteWatch/
│
├── src/
│ ├── components/
│ ├── pages/
│ ├── services/
│ ├── data/
│ ├── utils/
│ ├── App.jsx
│ └── main.jsx
│
├── backend/
│ ├── app/
│ │ ├── api/
│ │ ├── core/
│ │ ├── db/
│ │ ├── schemas/
│ │ ├── services/
│ │ └── main.py
│ │
│ ├── alembic/
│ │ └── versions/
│ │
│ ├── requirements.txt
│ ├── alembic.ini
│ ├── .env
│ └── .env.example
│
├── public/
├── package.json
├── vite.config.js
├── tailwind.config.js
├── .gitignore
└── README.md
http://localhost:5173
http://localhost:8000
http://localhost:8000/docs
http://localhost:8000/redoc
http://localhost:8000/api/health
Create a .env file in the project root:
VITE_API_URL=http://localhost:8000For production:
VITE_API_URL=https://YOUR-WASTEWATCH-BACKEND.onrender.comCreate .env.example:
VITE_API_URL=http://localhost:8000Never commit the real .env file.
Create:
backend/.env
Development configuration:
DATABASE_URL=postgresql+psycopg://USERNAME:PASSWORD@HOST/DATABASE?sslmode=require
JWT_SECRET_KEY=YOUR_LONG_RANDOM_SECRET
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=60
ALLOWED_ORIGINS=["http://localhost:5173","http://127.0.0.1:5173"]Production configuration:
DATABASE_URL=YOUR_NEON_POSTGRES_CONNECTION_STRING
JWT_SECRET_KEY=YOUR_PRODUCTION_SECRET
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=60
ALLOWED_ORIGINS=["https://YOUR-WASTEWATCH-FRONTEND.vercel.app"]Never commit:
.env
or any file containing real credentials.
WasteWatch AI uses PostgreSQL for persistent backend data.
The database can be hosted using Neon PostgreSQL.
The database connection is configured through:
DATABASE_URL=Example:
DATABASE_URL=postgresql+psycopg://USERNAME:PASSWORD@HOST/DATABASE?sslmode=requireWasteWatch AI uses Alembic for database migrations.
From the backend directory:
cd backendRun existing migrations:
python -m alembic upgrade headCreate a new migration after modifying database models:
python -m alembic revision --autogenerate -m "description"Apply the migration:
python -m alembic upgrade headFrom the project root:
cd backendInstall dependencies:
pip install -r requirements.txtConfigure:
backend/.env
Run migrations:
python -m alembic upgrade headStart FastAPI:
uvicorn app.main:app --reload --port 8000Backend will be available at:
http://localhost:8000
Swagger documentation:
http://localhost:8000/docs
From the project root:
npm installCreate:
.env
Add:
VITE_API_URL=http://localhost:8000Start the development server:
npm run devFrontend will be available at:
http://localhost:5173
GET /api/healthPOST /api/auth/registerExample request:
{
"name": "Test Citizen",
"email": "citizen@example.com",
"password": "TestPassword123!"
}The backend automatically creates:
role = CITIZEN
The frontend does not send or select a role.
POST /api/auth/loginExample request:
{
"email": "citizen@example.com",
"password": "TestPassword123!"
}The backend authenticates the user and returns an access token.
The authenticated user's role is returned by the backend.
GET /api/auth/meRequires:
Authorization: Bearer <access_token>Returns information about the authenticated user, including:
id
name
email
role
is_active
Home
↓
Register
↓
Citizen Account
↓
Login
↓
Citizen Interface
↓
Report Waste
↓
Report Result
The current report prototype uses localStorage.
Migration of reports to PostgreSQL will be implemented as part of the backend data-layer phase.
Admin
↓
Create Municipal Officer Account
↓
Municipal Officer
↓
Login
↓
Municipal Dashboard
↓
Reports
↓
Hotspots
↓
Interventions
↓
What-If Simulator
Admin Login
↓
Admin Dashboard
↓
Manage Municipal Officers
↓
Create / Manage Accounts
Admin functionality will be expanded in future development phases.
The current prototype includes:
- Citizen report aggregation
- Location-based report grouping
- Recent report analysis
- Severity breakdown
- Waste category breakdown
- Map visualization
- Simulated hotspot risk
- Hotspot details
- Intervention information
- What-If Simulator
Important: The current hotspot risk layer is a deterministic simulated prototype. It should not be presented as a trained predictive ML model until the actual model is trained and evaluated.
The planned AI pipeline is:
Waste Image
↓
YOLO / OpenCV
↓
Visual Features
↓
Report Metadata
+
Location
+
Time
+
Historical Reports
↓
Feature Engineering
↓
XGBoost
↓
Hotspot Risk
↓
Risk Explanation
↓
Intervention Recommendation
The system is designed to eventually learn from historical spatial-temporal patterns.
WasteWatch AI uses location information to identify clusters of waste reports.
Planned spatial capabilities include:
- Location clustering
- Hotspot detection
- Spatial density
- Distance-based analysis
- Municipal zone analysis
- Historical hotspot patterns
- PostGIS spatial queries
- Map-based visualization
Leaflet and OpenStreetMap are used for map visualization.
Waste patterns can change over time.
WasteWatch AI therefore considers:
- Number of reports
- Recent reports
- Historical activity
- Report frequency
- Severity trends
- Waste category trends
- Time-based patterns
This allows the system to move beyond simply counting complaints.
The prototype calculates a simulated hotspot risk using available report information.
Risk categories currently include:
80–100 → Emerging Hotspot
60–79 → Watch
40–59 → Moderate Activity
0–39 → Low Activity
These values are part of the current prototype and are not presented as validated real-world predictions.
One of WasteWatch AI's planned capabilities is the ability to compare possible interventions.
Example:
Current Situation
↓
Hotspot Risk = Simulated Risk
↓
Try Intervention
↓
Additional Collection
+
Cleaning
+
Awareness Campaign
↓
Compare Scenario
The simulator is intended to help municipal teams explore possible intervention scenarios.
Scenario outputs are simulated assumptions in the prototype. They should not be interpreted as guaranteed real-world outcomes.
In a future version, intervention effects can be learned from historical intervention and outcome data.
The municipal dashboard provides location-based visualization.
The planned dashboard includes:
- Waste report markers
- Hotspot markers
- Risk levels
- Location details
- Report counts
- Severity information
- Waste categories
- Recent activity
- Intervention status
Build the frontend:
npm run buildDeploy the project to Vercel.
Set the following environment variable:
VITE_API_URL=https://YOUR-WASTEWATCH-BACKEND.onrender.comAfter deployment, Vercel will provide a URL similar to:
https://wastewatch-ai.vercel.app
Use the actual URL generated by Vercel.
Deploy the backend directory as a Python Web Service.
backend
pip install -r requirements.txtuvicorn app.main:app --host 0.0.0.0 --port $PORTConfigure the following environment variables:
DATABASE_URL=YOUR_NEON_DATABASE_URL
JWT_SECRET_KEY=YOUR_PRODUCTION_SECRET
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=60
ALLOWED_ORIGINS=["https://YOUR-WASTEWATCH-FRONTEND.vercel.app"]After deployment, Render will provide a URL similar to:
https://wastewatch-backend.onrender.com
Use the actual Render URL in the Vercel VITE_API_URL environment variable.
Create a PostgreSQL database using Neon.
Configure the production backend with:
DATABASE_URL=YOUR_NEON_DATABASE_URLRun database migrations:
python -m alembic upgrade headNever commit production database credentials to GitHub.
INTERNET
│
▼
┌─────────────────┐
│ Vercel Frontend │
│ React + Vite │
└────────┬────────┘
│
HTTPS
│
▼
┌─────────────────┐
│ Render Backend │
│ FastAPI │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Neon PostgreSQL │
│ + PostGIS │
└────────┬────────┘
│
▼
AI / ML Services
WasteWatch AI follows these authentication principles:
- Passwords are never stored in plain text.
- Passwords are hashed before database storage.
- JWT authentication is used.
- User roles are determined by the backend.
- Public registration creates Citizen accounts only.
- Users cannot select their role during registration.
- Municipal accounts are created by Admin.
- Admin accounts are not publicly registered.
- Database credentials are stored in environment variables.
- JWT secrets are stored in environment variables.
.envfiles must never be committed.- Production CORS should only allow the deployed frontend domain.
- Frontend role information must never be treated as the source of authorization.
- Backend authorization remains the source of truth.
Start the backend:
uvicorn app.main:app --reload --port 8000Open Swagger:
http://localhost:8000/docs
Test:
GET /api/health
POST /api/auth/register
POST /api/auth/login
GET /api/auth/me
Run the development server:
npm run devBuild the production application:
npm run build/
/login
/register
/report
/report/result
/dashboard
/hotspot/:id
/simulator
Authentication and authorization will determine which users can access protected routes as the system is completed.
WasteWatch AI aims to move waste management from:
REACTIVE
│
▼
Waste Accumulates
│
▼
Citizen Reports
│
▼
Municipality Responds
│
▼
Cleanup
towards:
PREVENTIVE
│
▼
Citizen Reports
│
▼
Detect Patterns
│
▼
Predict Emerging Hotspots
│
▼
Analyze Causes
│
▼
Test Interventions
│
▼
Prevent Escalation
Future versions of WasteWatch AI can incorporate:
- Real municipal datasets
- Historical intervention data
- Real-time waste detection
- Advanced geospatial analytics
- Predictive hotspot models
- Route optimization
- Municipal zone intelligence
- Intervention effectiveness analysis
- IoT / smart-bin data
- Automated alerts
- Advanced analytics dashboards
Contributions, suggestions, and improvements are welcome.
Clone the repository:
git clone https://github.com/Aishwarya-Ramesh-Shetty/WasteWatch.gitMove into the project:
cd WasteWatchCreate a new branch:
git checkout -b feature/your-featureMake your changes and commit:
git add .
git commit -m "Add your feature"Push your branch:
git push origin feature/your-featureThen open a Pull Request.
This project is developed as part of the GeeksforGeeks Geeks2Code Open Innovation Hackathon.
Turning waste reports into actionable intelligence for proactive waste management.