A complete end-to-end system for classifying and managing civic complaints using AI and machine learning.
- Mobile/web interface for citizens to report issues
- Text description, optional photo/video, location, and contact information
- Real-time submission to backend server
- Node.js/Express server with MongoDB storage
- Text preprocessing and cleaning
- AI classification for issue categorization
- Urgency detection based on keywords and context
- Automatic department assignment
- Text preprocessing (cleaning, lowercasing, removing stop words)
- Issue categorization (Pothole, Garbage, Water, Electricity, Street Light, General)
- Urgency detection (High, Medium, Low)
- Confidence scoring for classifications
- Comprehensive dashboard for government officials
- Filtering by category, urgency, status, and department
- Status updates and tracking
- Statistics and reporting
- Automatic notifications to citizens on status changes
- Department assignment notifications
- Resolution confirmations
- React with Vite
- Tailwind CSS for styling
- React Router for navigation
- Axios for API calls
- Node.js with Express
- MongoDB for data storage
- Multer for file uploads
- Axios for AI service communication
- Python FastAPI for NLP services
- Rule-based classification with keyword matching
- Confidence scoring algorithms
- Node.js (v16 or higher)
- Python (v3.8 or higher)
- MongoDB
- npm or yarn
- Frontend Setup:
cd frontend
npm install- Backend Setup:
cd backend
npm install- AI Service Setup:
pip install -r requirements.txt- Start MongoDB:
mongod- Start AI Service:
uvicorn ai:app --port 8000- Start Backend:
cd backend
node server.js- Start Frontend:
cd frontend
npm run devPOST /complaints- Submit a new complaintGET /complaints- Get all complaintsPUT /complaints/:id- Update complaint statusGET /complaints/category/:category- Get complaints by categoryGET /complaints/urgency/:urgency- Get complaints by urgencyGET /complaints/department/:department- Get complaints by departmentGET /complaints/stats- Get complaint statistics
POST /classify- Classify complaint textGET /health- Health checkGET /- Service information
- Citizen submits complaint through web/mobile interface
- Backend stores complaint and forwards text to AI service
- AI service preprocesses text and classifies issue
- Urgency level is determined
- Department is automatically assigned
- Results stored in database
- Authority dashboard displays categorized complaints
- System notifies citizen and assigns to department
- Citizen receives updates on progress
- Issue is resolved and closed with feedback
- Real-time complaint submission
- AI-powered categorization and urgency detection
- Automatic department assignment
- Comprehensive dashboard with filtering
- Status tracking and updates
- Statistics and reporting
- Responsive design for mobile and desktop
- File upload support (images/videos)
- Location services integration