AI-Powered Municipal Complaint Intelligence Platform
Live Demo · Problem · Solution · Architecture · Quick Start
Cities receive thousands of civic complaints, but traditional systems are slow, manual, and opaque.
- Citizens do not know where or how to report issues reliably.
- Municipal teams waste time in manual triage and department routing.
- Workers cannot prove on-site resolution confidently.
- Admins lack actionable, real-time analytics for hotspot planning.
JanSevaAI converts a simple photo into a structured, trackable, department-ready complaint in seconds.
JanSevaAI is a full-stack civic platform where citizens upload issue photos (potholes, garbage, streetlights, waterlogging), and AI does the heavy lifting:
- Detects issue category from image.
- Estimates severity and urgency.
- Generates formal complaint text.
- Routes to the right municipal department.
- Enables admin oversight and worker execution with proof-based closure.
- Dual AI path: YOLOv8 on EC2 (primary) + Bedrock Nova Lite fallback (Eco-Mode).
- Role-based operations: Citizen, Admin, Worker views with guarded routes/actions.
- End-to-end traceability: Complaint lifecycle, status history, proof photo, and geofence checks.
- Production-ready deployment: S3 + CloudFront + API Gateway + Lambda + DynamoDB.
- Production URL:
https://d1lggct31hc8gn.cloudfront.net - Quick Login: enter any name, any 10-digit phone, OTP
123456(demo mode)
- Citizen: submit and track complaints
- Admin: manage workers, assignments, analytics
- Worker: accept/reject/resolve assigned tasks with proof
| Capability | What it does |
|---|---|
| AI Photo Triage | Auto-classifies complaint type from uploaded images |
| Eco-Mode Fallback | Falls back to Bedrock when YOLO server is unavailable |
| OTP Authentication | Phone-based login using AWS SNS/Pinpoint |
| Worker Operations | Accept/reject tasks, resolve with image proof |
| GPS Proof-of-Work | Geofence checks for worker resolution authenticity |
| SLA Monitoring | Flags warning/breach windows in admin workflow |
| Admin Command Center | Complaint table, bulk actions, worker management |
| Analytics | Trends, category mix, departmental performance, hotspots |
| CSV Export | Filtered complaint exports for reporting and governance |
| Resilient UX | Draft save, mock fallback mode, and graceful error handling |
Citizen / Admin / Worker Web App (React + Vite)
|
v
CloudFront + S3 (Frontend Hosting)
|
v
API Gateway (REST)
|
+------------+-------------+-----------------------------+
| | | |
v v v v
Auth Upload URL Complaints API Worker/Admin API
Lambda Lambda (submit/get/update) (assign/bulk/workers)
| | | |
| v +-----------+-----------------+
| S3 Images v
| | DynamoDB
| v (Complaints, Users,
| S3 Event Trigger Workers)
| |
| v
| Process Image Lambda
| |
| +------+----------------+
| | |
| v v
| YOLOv8 (EC2) Bedrock Nova Lite
| Primary AI Fallback AI
|
+--> JWT issued on OTP verify
- User uploads image(s) from frontend.
- Frontend gets presigned S3 URL and uploads directly.
- S3 event triggers image processing Lambda.
- AI detects category/severity and creates enriched complaint data.
- Citizen finalizes submission with notes + location.
- Admin assigns worker, tracks SLA and progress.
- Worker resolves with proof and optional GPS validation.
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite 7, React Router v7 |
| UI | Vanilla CSS, Design System v3 |
| API | AWS API Gateway (REST) |
| Compute | AWS Lambda (Python 3.12) |
| Data | DynamoDB |
| Object Storage | S3 |
| CDN/Hosting | CloudFront + S3 |
| Auth | AWS SNS / Pinpoint OTP + JWT |
| Vision AI | YOLOv8 on EC2 |
| AI Fallback | Amazon Bedrock Nova Lite |
| LLM Text | Amazon Bedrock Claude 3 Haiku |
| Notifications | Amazon SES |
jansevaAI/
src/
components/
pages/
services/
apiClient.js
authApi.js
complaintsApi.js
workersApi.js
analyticsApi.js
api.js
backend/
auth/
generate_upload_url/
process_image/
submit_complaint/
get_user_complaints/
get_complaint/
update_complaint_status/
bulk_update/
assign_complaint/
manage_workers/
delete_complaint/
get_nearby_complaints/
upvote_complaint/
docs/
aws_lambda_gateway_setup.md
frontend_hosting.md
yolo_ec2_setup.md
api_matrix.md
- Node.js 18+
- AWS account (for full cloud setup)
git clone https://github.com/Sujit-1509/jansevaAI.git
cd jansevaAI
npm installCreate .env from .env.example and set:
VITE_API_BASE_URL=https://your-api-id.execute-api.ap-south-1.amazonaws.com/prodnpm run devnpm run buildDeploy dist/ to S3 and invalidate CloudFront.
- JWT-based authorization for API calls
- Role-based route guards:
citizen,admin,worker - Backend role enforcement inside Lambdas
- Citizens can only access their own complaint data
- Worker resolution supports geofence checks for anti-fraud
docs/aws_lambda_gateway_setup.md- API + Lambda setupdocs/frontend_hosting.md- S3 + CloudFront hostingdocs/yolo_ec2_setup.md- YOLOv8 model serverdocs/api_matrix.md- endpoint-to-frontend mapping
MIT
JanSevaAI - Making cities responsive, transparent, and AI-ready.
