Transforming civic complaint management through Google Gemini AI, intelligent prioritization, citizen verification, and real-time governance analytics.
🚀 Built for Project Viksit Bharat 2026 · PS-08
🌐 Live Demo: https://civiclens.ai.studio/
📦 Repository: https://github.com/anushka12060/CivicLens
CivicLens is an AI-powered civic issue reporting platform that modernizes how citizens and municipal authorities collaborate to resolve public infrastructure problems.
Instead of relying on manual complaint categorization and opaque workflows, CivicLens leverages Google Gemini AI to analyze uploaded images, classify issues, estimate severity, detect duplicate complaints, and assist authorities in prioritizing resolutions.
Unlike traditional complaint portals, CivicLens introduces a closed-loop governance model, where citizens verify completed work before complaints are officially resolved, ensuring accountability and transparency throughout the lifecycle.
Citizen Reports Issue
↓
Google Gemini AI Analysis
↓
Smart Priority Assignment
↓
Officer Resolution
↓
Citizen Verification
Report civic issues by uploading a photo along with GPS location.
The platform automatically:
- Detects issue category
- Estimates severity (1–10)
- Suggests responsible department
- Returns confidence score and reasoning
Powered by Google Gemini.
The AI pipeline performs:
- Vision Analysis
- Issue Classification
- Severity Assessment
- Resolution Recommendation
If Gemini is unavailable, CivicLens automatically falls back to keyword-based heuristics so the platform continues functioning.
Nearby duplicate complaints are automatically identified using spatial matching.
Instead of creating duplicate tickets:
- Existing complaints gain visibility
- Report count increases
- Ward Health Index updates
- Authorities receive one consolidated complaint
Complaints are ranked using a transparent scoring formula.
Priority Score = (Severity × Report Count)
/ max(Days Open, 1)
Higher severity and multiple reports increase priority while older unresolved complaints continue moving upward.
Municipal officers can:
- View assigned complaints
- Filter by department
- Update complaint status
- Upload proof of completion
- Track complaint lifecycle
Complaints are not automatically closed.
Citizens verify completed work before closure.
If work is unsatisfactory:
- Complaint is reopened
- Officer is notified
- Resolution process continues
Citizens also earn civic participation points after successful verification.
Each ward receives a live civic health score.
Ward Health =
100 − (Issue Count × 6)
− Round(Average Severity × 4)
Duplicate reports apply additional penalties, allowing administrators to identify deteriorating regions immediately.
Real-time public analytics include:
- Ward Performance
- Department Performance
- Complaint Trends
- Resolution Rate
- Active Issues
- Citizen Participation
| Traditional Complaint Portals | CivicLens |
|---|---|
| Manual complaint entry | AI-powered image reporting |
| Manual categorization | Automatic issue detection |
| First Come, First Serve | AI-based priority assignment |
| Complaint closed by department | Citizen verifies completion |
| Limited transparency | Live governance dashboards |
| Duplicate complaints create clutter | Smart duplicate detection |
Citizen / Officer
(React 19 + PWA)
│
▼
Express.js REST API
│
┌──────────────────┴──────────────────┐
▼ ▼
Google Gemini AI SQLite Database
├── Vision Analysis ├── Issues
├── Classification ├── Officers
├── Severity Detection ├── Citizens
├── Resolution Suggestions ├── Ward Health
└── Duplicate Assistance
│
▼
Business Logic Layer
├── Duplicate Detection
├── Priority Engine
├── Officer Assignment
├── Complaint Lifecycle
└── Ward Health Calculation
│
▼
Officer Dashboard → Citizen Verification
│
▼
Transparency Dashboard
| Technology | Purpose |
|---|---|
| React 19 | User Interface |
| Vite 6 | Build Tool |
| TypeScript | Type Safety |
| Tailwind CSS 4 | Styling |
| Progressive Web App | Installable Experience |
| Technology | Purpose |
|---|---|
| Node.js | Runtime |
| Express.js | REST API |
| JWT | Authentication |
| bcryptjs | Password Hashing |
- Google Gemini API
- Google AI Studio
- Vision Analysis
- Issue Classification
- Severity Estimation
- Resolution Suggestions
- SQLite
- better-sqlite3
- WAL Mode
- Automatic Database Seeding
- Leaflet
- OpenStreetMap
- Browser Geolocation API
- Google Cloud Run
- Google AI Studio
- Progressive Web App
CivicLens/
├── server/
│ └── db/
│ ├── index.ts
│ └── schema.sql
├── src/
│ ├── components/
│ ├── assets/
│ ├── App.tsx
│ ├── Landing.tsx
│ ├── types.ts
│ ├── data.ts
│ ├── index.css
│ └── main.tsx
├── public/
├── server.ts
├── index.html
├── vite.config.ts
├── tsconfig.json
├── package.json
├── .env.example
└── README.md
git clone https://github.com/anushka12060/CivicLens.git
cd CivicLensnpm installCreate a file named
.env
Add
GEMINI_API_KEY=YOUR_API_KEY
JWT_SECRET=YOUR_SECRET
npm run devApplication will start at
http://localhost:3000
npm run build
npm startOn first launch, the application automatically creates and seeds the SQLite database with demo officers, complaints, citizens, and ward health records.
Citizen Reports Issue
│
▼
Upload Image + GPS Location
│
▼
Google Gemini AI Analysis
│
├── Vision Analysis
├── Issue Classification
├── Severity Detection
└── Resolution Recommendation
│
▼
Duplicate Detection
│
▼
Priority Score Calculation
│
▼
Complaint Assigned to Officer
│
▼
Officer Updates Status
│
▼
Proof of Completion Uploaded
│
▼
Citizen Verification
│
├── Verified ✅
│ │
│ ▼
│ Complaint Closed
│
└── Reopened ❌
│
▼
Officer Notified Again
│
▼
Ward Health Index Updated
Reported
↓
Acknowledged
↓
In Progress
↓
Resolved
↓
Citizen Verification
↓
Verified / Reopened
The application uses SQLite in WAL (Write-Ahead Logging) mode for improved performance and concurrent reads.
Stores civic complaints and AI enrichment fields:
id,title,description,wardlat,lng,imageUrlissueType,severity(1–10),affectedRadius,departmentconfidence,reasoningreportCount,createdAtisDemo,isValid,quickDetailsstatus(reported|acknowledged|in_progress|resolved|verified|reopened)assignedOfficerId,officerNotes,resolvedAt,verifiedAtreopenedCount,reportedByCitizenId
Priority score is computed at runtime:
(severity × reportCount) / max(daysOpen, 1)— not stored as a column.
Stores registered citizens:
id,name,email(unique)passwordHashcivicPointscreatedAt
Stores municipal officers:
id,name,departmentemail(unique)passwordHash
Stores persistent ward scores:
ward(primary key)healthScoreupdatedAt
Issue counts and average severity used in the live score formula are computed from the issues list, not stored on this table.
Password for every officer
password123
| Department | |
|---|---|
| Road Infrastructure | roads.officer@civiclens.gov.in |
| Water & Drainage | water.officer@civiclens.gov.in |
| Solid Waste | waste.officer@civiclens.gov.in |
| Electrical Division | power.officer@civiclens.gov.in |
| Ward Enforcement | enforcement.officer@civiclens.gov.in |
Citizens can register directly from the application.
CivicLens helps municipalities by
✅ Reducing complaint processing time
✅ Eliminating duplicate complaints
✅ Increasing citizen trust
✅ Improving accountability
✅ Prioritizing critical civic issues
✅ Enabling data-driven governance
✅ Tracking department performance
✅ Monitoring ward-wise civic health
- AI-powered complaint categorization
- Real-time duplicate detection
- Transparent complaint lifecycle
- Live Ward Health Index
- Department-specific officer workflow
- Installable Progressive Web App
- Responsive across desktop and mobile
CivicLens has been designed with scalability in mind. Future enhancements include:
- Multi-city deployment
- State-level civic governance support
- CPGRAMS integration
- Smart City Mission integration
- Native Android application
- Native iOS application
- Offline complaint submission
- Camera-first reporting
- Push notifications
- SMS alerts
- WhatsApp integration
- Email updates
- Predictive civic analytics
- Automatic issue clustering
- AI-generated maintenance reports
- Infrastructure deterioration prediction
- PostgreSQL migration
- Google Cloud SQL
- Cloud Storage for images
- Cloud CDN
- Auto Scaling
- Multi-language support
- Voice-assisted complaint filing
- Screen reader compatibility
- Accessibility improvements (WCAG)
| Feature | Status |
|---|---|
| AI Image Analysis | ✅ |
| Leaflet + OpenStreetMap | ✅ |
| Duplicate Detection | ✅ |
| Officer Dashboard | ✅ |
| Citizen Verification | ✅ |
| Ward Health Index | ✅ |
| Transparency Dashboard | ✅ |
| Progressive Web App | ✅ |
| Responsive Design | ✅ |
Contributions are welcome!
If you'd like to improve CivicLens:
git clone https://github.com/anushka12060/CivicLens.gitgit checkout -b feature/amazing-featuregit commit -m "Add amazing feature"git push origin feature/amazing-featureEvery contribution is appreciated.
- Verify your
GEMINI_API_KEY - Check API quota
- Ensure internet connectivity
- Ensure internet access (OSM tiles load from the network)
- Confirm Leaflet CSS/JS are loaded from
index.html - Check the browser console for blocked scripts
Simply restart the server.
The application automatically creates and seeds the database during first launch.
Developed for
Project Viksit Bharat 2026 (PS-08)
- React 19
- Vite
- TypeScript
- Express.js
- SQLite
- Google Gemini AI
- Google AI Studio
- Tailwind CSS
Special thanks to:
- Google AI Studio
- Google Gemini API
- React Team
- Vite Team
- OpenStreetMap Community
It motivates us to continue building impactful AI-powered civic technology.
AI-Powered Transparent Civic Governance
Transforming civic complaints into transparent, citizen-verified governance.
Made with ❤️ by Team Vision Forge








