A full-stack web application connecting citizens with government officials for faster civic issue resolution. Citizens can report problems like potholes, garbage, streetlights, and drainage issues, while government officials can track, manage, and resolve these complaints efficiently.
- Title: GovConnect โ Report, Resolve, Reward
- Tagline: "Connecting citizens with government for faster civic issue resolution"
- Dual Login System: Separate portals for citizens and government officials
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- Registration/Login: Secure authentication with name, email, mobile, password, and optional Aadhaar
- Dashboard: Overview of complaint statistics and recent reports
- Submit Complaints: Upload photos, add descriptions, and geotag locations using Google Maps API
- Track Status: Monitor complaint progress (Pending โ Verified โ In Progress โ Resolved)
- Reward System: Earn points for valid reports
- Profile Management: Update personal information and view complaint history
- Secure Access: Protected login for government officials
- Complaint Management: View and filter complaints by type, status, and priority
- Map Interface: Interactive map showing all complaints with Leaflet integration
- Status Updates: Update complaint status and add resolution notes
- Analytics Dashboard:
- Complaint trends over time
- Area-wise heatmaps
- Resolution statistics and performance metrics
- Data Export: Download complaint data in CSV and PDF formats
- Frontend: React.js with Tailwind CSS for modern, responsive UI with glassmorphism design
- Backend: Node.js with Express.js REST API
- Database: SQLite with Sequelize ORM (ready for production PostgreSQL)
- Image Storage: Cloudinary integration for photo uploads
- Maps: Google Maps API and Leaflet for geolocation
- Authentication: JWT-based secure login system
- Security: Rate limiting, CORS, helmet, and input validation
- Responsive: Mobile-first design with modern animations and micro-interactions
- UI/UX: Advanced glassmorphism effects, animated components, and smooth transitions
- Animations: Floating elements, staggered animations, and interactive hover effects
- Glassmorphism Design: Modern frosted glass effects with backdrop blur
- Animated Components: Smooth transitions, hover effects, and micro-interactions
- Responsive Layout: Mobile-first design that works on all devices
- Interactive Elements: Floating backgrounds, staggered animations, and focus states
- Modern Admin Dashboard: Redesigned with glassmorphism panels and gradient accents
- Interactive Complaint Management: Advanced filtering, assignment, and status tracking
- Animated Analytics: Real-time charts with smooth transitions
- Map Integration: Interactive complaint pins with animated overlays
- Step-by-Step Complaint Submission: Intuitive wizard with progress indicators
- Gamified Rewards: Achievement system with unlockable badges
- Enhanced Profile Management: Modern interface with animated stats
- Better Text Visibility: Fixed contrast issues for improved readability
- API Enhancements: Added missing endpoints for government official management
- Form Validation: Improved error handling and user feedback
- Performance: Optimized animations and reduced bundle size
- Accessibility: Better contrast ratios and keyboard navigation
- Node.js (v16 or higher)
- SQLite (included) or PostgreSQL for production
- Cloudinary account (optional for image uploads)
- Google Maps API key (optional)
-
Clone the repository
git clone <repository-url> cd govconnect
-
Install dependencies
npm run install-all
-
Environment Setup
# Copy environment file cp server/env.example server/.env # Edit server/.env with your configuration DB_HOST=localhost DB_PORT=5432 DB_NAME=govconnect DB_USER=your_username DB_PASSWORD=your_password JWT_SECRET=your_jwt_secret CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret GOOGLE_MAPS_API_KEY=your_google_maps_key
-
Database Setup
# Create PostgreSQL database createdb govconnect # The application will auto-create tables on first run
-
Start the application
# Development mode (both frontend and backend) npm run dev # Or start separately npm run server # Backend on port 5000 npm run client # Frontend on port 3000
govconnect/
โโโ client/ # React frontend
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โโโ contexts/ # React contexts
โ โ โโโ ...
โ โโโ package.json
โ โโโ tailwind.config.js
โโโ server/ # Node.js backend
โ โโโ config/ # Database configuration
โ โโโ middleware/ # Express middleware
โ โโโ models/ # Sequelize models
โ โโโ routes/ # API routes
โ โโโ package.json
โ โโโ server.js
โโโ package.json # Root package.json
โโโ README.md
POST /api/auth/register/citizen- Citizen registrationPOST /api/auth/register/government- Government official registrationPOST /api/auth/login- User loginGET /api/auth/verify- Verify JWT token
GET /api/citizen/profile- Get citizen profilePUT /api/citizen/profile- Update citizen profileGET /api/citizen/dashboard- Get dashboard statisticsGET /api/citizen/complaints- Get citizen's complaintsGET /api/citizen/rewards- Get reward points
GET /api/government/profile- Get official profilePUT /api/government/profile- Update official profileGET /api/government/dashboard- Get government dashboardGET /api/government/complaints-map- Get complaints for map viewGET /api/government/area-stats- Get area statisticsGET /api/government/performance- Get performance metrics
POST /api/complaints- Submit new complaintGET /api/complaints- Get all complaints (government)GET /api/complaints/my-complaints- Get citizen's complaintsGET /api/complaints/:id- Get specific complaintPATCH /api/complaints/:id/status- Update complaint statusDELETE /api/complaints/:id- Delete complaint
GET /api/analytics/trends- Get complaint trendsGET /api/analytics/heatmap- Get heatmap dataGET /api/analytics/resolution-stats- Get resolution statisticsGET /api/analytics/export/csv- Export to CSVGET /api/analytics/export/pdf- Export to PDF
- Colors: Modify
client/tailwind.config.jsfor custom color schemes - Components: Edit React components in
client/src/components/ - Layout: Adjust responsive breakpoints in Tailwind config
- Categories: Add new complaint categories in
server/models/Complaint.js - Rewards: Modify reward point calculation in complaint submission
- Validation: Update input validation rules in route files
cd client
npm run build
# Deploy the build foldercd server
npm start
# Set environment variables in your hosting platformNODE_ENV=production
CLIENT_URL=https://your-frontend-domain.com
DB_HOST=your-production-db-host
DB_PORT=5432
DB_NAME=govconnect_prod
DB_USER=your_prod_username
DB_PASSWORD=your_prod_password
JWT_SECRET=your_secure_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
GOOGLE_MAPS_API_KEY=your_google_maps_key- JWT Authentication: Secure token-based authentication
- Input Validation: Comprehensive validation using express-validator
- Rate Limiting: API rate limiting to prevent abuse
- CORS Protection: Configurable cross-origin resource sharing
- Helmet Security: Security headers and protection
- Password Hashing: bcrypt for secure password storage
- SQL Injection Protection: Sequelize ORM with parameterized queries
- Mobile-First Design: Built with mobile devices in mind
- Touch-Friendly Interface: Optimized for touch interactions
- Responsive Grid: Flexible layouts that adapt to screen sizes
- Progressive Web App Ready: Can be installed on mobile devices
# Run backend tests
cd server
npm test
# Run frontend tests
cd client
npm test- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
- Mobile App: Native iOS and Android applications
- Push Notifications: Real-time updates for complaint status changes
- AI Integration: Smart categorization and priority assignment
- Multi-language Support: Internationalization for different regions
- Advanced Analytics: Machine learning insights and predictions
- Integration APIs: Connect with existing government systems
Built with โค๏ธ for better civic management and citizen engagement