CivicFix 2.0 is an enterprise-grade, placement-level civic issue resolution and infrastructure management platform connecting Citizens, Field Officers, Municipal Department Managers, and City Administrators through real-time reactive workflows, AI-assisted image and text classification, Leaflet geospatial mapping, SLA timers, and verified photographic resolution audits.
- 👤 Citizen Portal:
- Register & Login (JWT authentication).
- Geotagged issue reporting with GPS auto-locate and manual map pin drop.
- Media evidence uploader (photos and video support).
- Live progress timeline:
Submitted➔Assigned➔Accepted➔In-Progress➔Resolved➔Verified/Closed. - Reopen feature if repairs are inadequate, upvoting community concerns, and 5-star resolution feedback.
- 👷 Field Officer App:
- Mobile-friendly task queue with SLA deadline countdowns.
- Direct 1-click GPS navigation links (Google Maps).
- Accept/Reject task workflows with reason logging.
- Before/after photographic resolution proof uploader.
- 🏢 Department Manager Dashboard:
- Review queue for Roads, Sanitation, Electricity, Water, Traffic, and Public Assets.
- 1-click officer assignment with dynamic SLA targets (6h, 12h, 24h, 48h, 72h).
- Officer workload balancing & resolution verification.
- 🛡️ City Administrator Command Center:
- City-wide KPI dashboard, resolution velocity, and category distribution.
- User and department role promotion/management.
- Full immutable security audit log trail.
- 1-click CSV/Excel master dataset export.
- Interactive Leaflet.js map with custom color-coded category and priority pins.
- MongoDB 2dsphere Geospatial Queries for nearby complaints within selectable radii (1km – 30km).
- OpenStreetMap Nominatim reverse geocoding to auto-fill street addresses.
- Heatmap density overlay for municipal hotspots.
- Automated image and text analysis to detect category (
pothole,garbage,streetlight,water,traffic_signal, etc.). - Automated severity & priority estimation (
critical,high,medium,low). - Automated 200m radius duplicate issue detection to prevent redundant municipal dispatch.
- Executive summary generation for department managers.
- Socket.io event dispatching for instant status notifications, officer dispatch alerts, and live comments.
- In-app notification center with sound/toast alerts.
- Nodemailer HTML email notifications.
- Clone or Extract the ZIP Archive
- Install Dependencies and Start Everything:
# In project root folder: npm install npm run install:all - Seed Database with Realistic Demo Data:
npm run seed
- Launch Application:
npm run dev # OR on Windows double-click: start.bat # OR on Linux/macOS run: ./start.sh
- Frontend Portal: http://localhost:5173
- Backend API: http://localhost:5000/api/health
| Role | Password | |
|---|---|---|
| City Administrator | [email protected] |
admin123 |
| Roads Dept Manager | [email protected] |
manager123 |
| Sanitation Manager | [email protected] |
manager123 |
| Field Officer (Roads) | [email protected] |
officer123 |
| Field Officer (Sanitation) | [email protected] |
officer123 |
| Citizen (Rahul) | [email protected] |
citizen123 |
| Citizen (Priya) | [email protected] |
citizen123 |
💡 Tip: The sticky top bar in the web application has 1-Click buttons to instantly switch between all 4 personas!
To launch the complete application with isolated MongoDB, Backend, and Frontend containers:
docker-compose up --buildAccess at http://localhost:5173.
- Push
frontend/to GitHub. - Import project into Vercel.
- Set Root Directory to
frontend. - Set Environment Variable:
VITE_API_URL=https://your-backend-domain.com/api. - Deploy!
- Push
backend/to GitHub. - Create a Web Service on Render or Railway.
- Set Root Directory to
backendand build commandnpm install, start commandnode src/server.js. - Set Environment Variables:
MONGODB_URI: Your MongoDB Atlas Connection StringJWT_SECRET: A secure random stringPORT: 5000
- Deploy!
civicfix-2.0/
├── backend/
│ ├── src/
│ │ ├── config/ (MongoDB & Socket.io)
│ │ ├── controllers/ (Auth, Complaints, Departments, Maps, AI, Analytics, Admin)
│ │ ├── middleware/ (JWT RBAC, Multer uploads, Error handling, Rate limiting)
│ │ ├── models/ (User, Complaint, Department, Comment, Notification, Feedback, AuditLog)
│ │ ├── routes/ (Express API endpoints)
│ │ ├── services/ (AI Classifier, Emailer, Database Seeder)
│ │ └── server.js
│ ├── uploads/
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── components/ (Leaflet Map, Timeline, Badges, AI Modal, Navbar, Sidebar, Uploader)
│ │ ├── context/ (AuthContext & SocketContext)
│ │ ├── pages/ (Home, Login, Register, Citizen, Officer, Manager, Admin)
│ │ ├── services/ (Axios API Client)
│ │ ├── types/ (TypeScript interfaces)
│ │ ├── App.tsx
│ │ └── main.tsx
│ ├── vite.config.ts
│ ├── tailwind.config.js
│ └── package.json
├── docker-compose.yml
├── start.bat (1-Click Windows)
├── start.sh (1-Click Linux/Mac)
├── vercel.json
└── README.md
- Geospatial 2dsphere Querying: How MongoDB coordinates
[longitude, latitude]indexing enables high-speed$nearproximity searches within custom radius boundaries. - State Machine & Lifecycle Governance: Complaint status transitions follow strict rules (e.g., officers cannot mark an issue
resolvedwithout uploading photo evidence and resolution coordinates). - AI Fallback Resilience: Built with a dual-layer AI strategy (integrates with Gemini API with automated offline heuristic NLP fallback) guaranteeing 100% uptime without external dependencies.
- WebSocket Event Rooms: How Socket.io rooms (
user:ID,dept:ID,complaint:ID) minimize network overhead while providing instant reactive toast updates.