πΊ Video Demo: https://drive.google.com/file/d/1dSckmA7L9jk7Mi8yuiNkYuucIlfMpUNy/view
π Presentation: https://www.canva.com/design/DAG5QKm85xA/5BiWu2bSbC-JSU7VHmF7-A/edit
A full-stack Progressive Web Application (PWA) for municipal issue reporting and management, enabling citizens to report and track civic problems while providing administrators with powerful tools for efficient resolution and resource allocation.
- Issue Reporting: Report civic issues with photos, location, and detailed descriptions
- AI-Powered Descriptions: Automatic issue description enhancement using Google Gemini AI
- Anonymous Reporting: Option to report issues anonymously
- Real-time Updates: Get notifications on issue status changes
- Upvoting System: Support important issues by upvoting
- Comments & Discussions: Engage in community discussions on reported issues
- Heatmap Visualization: View geographic distribution of issues
- Leaderboard: Track top contributors to the community
- Multilingual Support: Available in English and Nepali (i18n)
- Offline Support: PWA with service worker for offline functionality
- User Profiles: Track your reported issues and contributions
- Admin Dashboard: Comprehensive overview of all reported issues
- Issue Management: Update status, priority, and assign to categories
- Budget Tracking: Allocate and track budgets for issue resolution
- Timeline Management: Create and manage resolution timelines
- Evidence Uploads: Add before/after photos and evidence documentation
- Advanced Analytics: Statistical insights and prediction dashboards
- Priority Management: AI-powered priority calculation and manual override
- Review System: Review and approve/reject reported issues
- PDF Reports: Generate detailed PDF reports for issues
- QR Code Generation: Create QR codes for easy issue tracking
- Push Notifications: Send notifications to users about issue updates
- React 19.2 - Modern UI library
- Vite - Fast build tool and dev server
- React Router v7 - Client-side routing
- TanStack Query - Server state management
- Tailwind CSS v4 - Utility-first CSS framework
- Leaflet - Interactive maps with heatmap support
- Recharts - Data visualization
- Lucide React - Icon library
- i18next - Internationalization
- Lottie React - Animation support
- Axios - HTTP client
- Node.js & Express - Server framework
- MongoDB & Mongoose - Database and ODM
- JWT - Authentication
- bcryptjs - Password hashing
- Cloudinary - Image storage and management
- Multer - File upload handling
- Google Generative AI - AI-powered features
- PDFKit - PDF generation
- QRCode - QR code generation
- Nodemailer - Email notifications
- Twilio - SMS notifications (optional)
- Web Push - Push notification support
- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- npm or yarn package manager
- Cloudinary account (for image uploads)
- Google AI API key (for Gemini AI features)
git clone <repository-url>
cd Finalcd server
npm installCreate a .env file in the server directory:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
# Cloudinary
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# Google AI
GEMINI_API_KEY=your_gemini_api_key
# Email (Optional)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_email_password
# Twilio (Optional)
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number
# Push Notifications
VAPID_PUBLIC_KEY=your_vapid_public_key
VAPID_PRIVATE_KEY=your_vapid_private_keycd ../client
npm installCreate a .env file in the client directory:
VITE_API_URL=http://localhost:5000
VITE_GOOGLE_CLIENT_ID=your_google_oauth_client_idcd ../server
node scripts/createAdmin.jsTerminal 1 - Start the Backend:
cd server
npm run devServer will run on http://localhost:5000
Terminal 2 - Start the Frontend:
cd client
npm run devClient will run on http://localhost:5173
Build the Client:
cd client
npm run buildStart the Server:
cd ../server
npm startFinal/
βββ client/ # React frontend application
β βββ public/ # Static assets
β β βββ hero.json # Lottie animation
β β βββ manifest.json # PWA manifest
β β βββ sw.js # Service worker
β βββ src/
β β βββ api/ # API service functions
β β βββ assets/ # Images and static files
β β βββ components/ # Reusable React components
β β βββ context/ # React context providers
β β βββ data/ # Static data files
β β βββ hooks/ # Custom React hooks
β β βββ locales/ # Translation files (en, np)
β β βββ pages/ # Page components
β β βββ router/ # Route configuration
β β βββ styles/ # CSS files
β β βββ utils/ # Utility functions
β β βββ App.jsx # Main app component
β β βββ i18n.js # i18n configuration
β β βββ main.jsx # App entry point
β βββ index.html
β βββ package.json
β βββ tailwind.config.ts
β βββ vite.config.js
β
βββ server/ # Node.js backend application
βββ config/ # Configuration files
β βββ cloudinary.js # Cloudinary setup
β βββ db.js # MongoDB connection
β βββ gemini.js # Google AI setup
βββ controllers/ # Request handlers
β βββ adminController.js
β βββ aiController.js
β βββ authController.js
β βββ budgetController.js
β βββ commentController.js
β βββ evidenceController.js
β βββ issueController.js
β βββ notificationController.js
β βββ pdfController.js
β βββ predictionController.js
β βββ priorityController.js
β βββ reviewController.js
β βββ timelineController.js
β βββ upvoteController.js
βββ middleware/ # Express middleware
β βββ adminMiddleware.js
β βββ authMiddleware.js
βββ models/ # Mongoose schemas
β βββ BeforeAfter.js
β βββ Budget.js
β βββ Comment.js
β βββ Issue.js
β βββ IssueEvidence.js
β βββ IssueHistory.js
β βββ Notification.js
β βββ OfflineIssue.js
β βββ PushSubscription.js
β βββ Review.js
β βββ Upvote.js
β βββ User.js
βββ routes/ # API routes
β βββ adminRoutes.js
β βββ authRoutes.js
β βββ budgetRoutes.js
β βββ commentRoutes.js
β βββ evidenceRoutes.js
β βββ issueRoutes.js
β βββ notificationRoutes.js
β βββ predictionRoutes.js
β βββ priorityRoutes.js
β βββ pushRoutes.js
β βββ reviewRoutes.js
β βββ timelineRoutes.js
β βββ upvoteRoutes.js
β βββ userRoutes.js
βββ scripts/ # Utility scripts
β βββ createAdmin.js # Create admin user
β βββ setAdmin.js # Set existing user as admin
βββ uploads/ # Uploaded files storage
βββ utils/ # Helper functions
βββ package.json
βββ server.js # Server entry point
- JWT-based authentication
- Role-based access control (User/Admin)
- Google OAuth integration
- Secure password hashing
- CRUD operations for issues
- Image upload with Cloudinary
- Location tracking with coordinates
- Category and ward classification
- Severity levels
- Status tracking (pending, in-progress, resolved, rejected)
- Automatic issue description enhancement
- Priority prediction algorithms
- Intelligent categorization
- Push notifications for status updates
- Real-time comment updates
- Notification system
- Geographic heatmap of issues
- Statistical dashboards
- Charts and graphs for analytics
- Prediction insights
- Service worker implementation
- Offline issue storage
- Background sync when online
POST /api/auth/register- Register new userPOST /api/auth/login- User loginGET /api/auth/me- Get current user
GET /api/issues- Get all issuesGET /api/issues/:id- Get single issuePOST /api/issues- Create new issuePUT /api/issues/:id- Update issueDELETE /api/issues/:id- Delete issue
GET /api/admin/dashboard- Get dashboard dataGET /api/admin/issues- Get all issues (admin view)PUT /api/admin/issues/:id- Update issue statusGET /api/admin/statistics- Get statistics
GET /api/comments/issue/:id- Get issue commentsPOST /api/comments- Add commentDELETE /api/comments/:id- Delete comment
POST /api/upvotes/:id- Toggle upvoteGET /api/upvotes/:id- Get upvote status
POST /api/reviews/:id- Submit reviewGET /api/reviews/:id- Get reviews
POST /api/budget/:id- Add budgetGET /api/budget/:id- Get budget details
POST /api/timeline/:id- Add timeline entryGET /api/timeline/:id- Get timeline
POST /api/evidence/:id- Upload evidenceGET /api/evidence/:id- Get evidence
GET /api/priority/:id- Get priority scorePUT /api/priority/:id- Update priority
GET /api/predictions- Get prediction analytics
GET /api/notifications- Get user notificationsPUT /api/notifications/:id/read- Mark as readPOST /api/notifications/subscribe- Subscribe to push notifications
- JWT token-based authentication
- Password encryption with bcryptjs
- Protected routes with middleware
- Input validation and sanitization
- CORS configuration
- Secure file upload handling
The application is a fully functional PWA with:
- Offline support
- Service worker caching
- App manifest for installation
- Responsive design
- Push notification support
The app supports multiple languages:
- English (en)
- Nepali (np)
Language can be switched from the user interface.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
Team Nexus
For support, please contact the development team or open an issue in the repository.
- Google Generative AI for AI-powered features
- Cloudinary for image management
- MongoDB Atlas for database hosting
- The open-source community for amazing tools and libraries
Built with β€οΈ by Team Nexus