A smart civic reporting platform that helps citizens report waste incidents and helps municipal officers review, prioritize, group, map, and manage reports.
Python · Streamlit · Gemini · Supabase · PostgreSQL · Folium
AI supports decision-making. Final municipal decisions remain with human officers.
CleanSight AI improves the way civic waste incidents are reported and reviewed.
Citizens can upload an image, provide a description and location, and receive AI-assisted analysis before submitting the report.
Municipal officers can then review reports, correct AI-generated information, identify priority incidents, manage related reports, view incidents on a map, and export report data.
- Report waste as a guest or signed-in user
- Upload waste images
- Add a simple everyday address
- Use GPS/current location
- Add landmarks and descriptions
- Run AI-assisted waste analysis
- Review the generated analysis
- Submit reports to the municipality
- Secure municipal sign-in
- Dashboard with submitted reports
- Search and filtering
- Interactive report map
- Review AI-generated analysis
- Correct report information
- Add municipal notes
- Update report status
- Detect and group related reports
- Export report data as CSV
CleanSight AI uses Google Gemini multimodal AI to analyse uploaded waste images.
The analysis can include:
- waste type
- estimated waste volume
- visible hazards
- hazard score
- road accessibility
- recommended collection vehicle
- AI confidence
The AI output is treated as decision support, not as a final municipal decision.
The current priority score considers:
| Factor | Weight |
|---|---|
| Hazard | 70% |
| Waste Volume | 30% |
Priority levels:
Score >= 75 → HIGH
Score >= 45 → MEDIUM
Otherwise → LOW
Potentially related or duplicate reports are handled on the municipal side.
Municipal officers can:
- compare nearby reports
- group reports belonging to the same incident
- mark reports as separate
- remove reports from an existing group
Original citizen reports are always preserved.
Click a section below to view its screenshots.
Citizens can use the guest reporting option or create an account through the application.
Use the following account to access the municipal demonstration dashboard.
Municipal Email: [email protected]
Password: municipal123
Citizen / Municipal Browser
│
▼
Streamlit App
/ \
▼ ▼
Supabase Gemini
Auth / DB Multimodal AI
Storage
│
▼
PostgreSQL
Citizen uploads report
↓
AI analyses waste image
↓
CleanSight AI calculates priority
↓
Citizen reviews and submits
↓
Report stored in Supabase
↓
Municipal officer reviews
↓
Officer confirms or corrects report
Current report lifecycle:
SUBMITTED → REVIEWED
Future versions may extend this to:
SUBMITTED → REVIEWED → ASSIGNED → IN PROGRESS → COMPLETED
| Area | Technology |
|---|---|
| Web Application | Streamlit |
| Programming Language | Python |
| AI | Google Gemini Multimodal |
| Backend | Supabase |
| Database | PostgreSQL |
| Authentication | Supabase Auth |
| Storage | Supabase Storage |
| Mapping | Folium |
| Geocoding | Geopy |
| Data Processing | Pandas |
| Image Processing | Pillow |
| Deployment | Streamlit Community Cloud |
| Source Control | GitHub |
CleanSight-AI/
│
├── app.py
├── citizen_view.py
├── municipal_view.py
├── requirements.txt
├── README.md
├── .gitignore
│
├── auth/
│ ├── sign_in.py
│ └── sign_up.py
│
├── services/
│ ├── supabase_service.py
│ ├── auth_service.py
│ ├── ai_service.py
│ ├── location_service.py
│ └── report_service.py
│
├── assets/
│ └── cleansight_logo.png
│
└── docs/
└── screenshots/
git clone YOUR_GITHUB_REPOSITORY_URL
cd CleanSight-AIpython -m venv venv
.\venv\Scripts\Activate.ps1python -m pip install -r requirements.txtCreate:
.streamlit/secrets.toml
Add:
GEMINI_API_KEY = "your-gemini-api-key"
SUPABASE_URL = "your-supabase-url"
SUPABASE_KEY = "your-supabase-key"python -m streamlit run app.pyNever commit API keys, passwords, .env files, or Streamlit secrets to GitHub.
Recommended .gitignore:
venv/
.venv/
__pycache__/
*.pyc
secrets.toml
.env
.env.*
.vscode/
.idea/
.DS_Store
Thumbs.dbMunicipal accounts should be assigned the appropriate role through a controlled administrative process.
- AI analysis may occasionally be incorrect or uncertain.
- AI confidence is not a calibrated probability.
- Sri Lankan address matching may sometimes be inconsistent.
- Related-report detection currently relies mainly on location and time.
- The current lifecycle primarily uses
SUBMITTEDandREVIEWED. - The system is an MVP and requires further production security and evaluation.
Planned improvements include:
- stronger role-based security
- improved Sri Lankan location handling
- image/text similarity for duplicate detection
- expanded incident lifecycle
- audit history
- municipal assignment
- route optimisation
- waste hotspot analytics
- collection tracking and ETA prediction
CleanSight AI is an AI-assisted civic reporting and municipal decision-support system.
AI-generated information may contain errors and should be reviewed by municipal officers before being treated as verified information.
This project is licensed under the MIT License.
See LICENSE for details.










