Bridging Communities and Government Through Technology
- โ 40+ API Endpoints implemented and tested
- โ 15+ React Components with TypeScript
- โ 5 Database Models with geospatial indexing
- โ Complete Authentication System with Clerk
- โ Security Hardened with XSS protection and input sanitization
- โ Production Deployment Ready with comprehensive documentation
- โ 84 Files committed across frontend and backend
- โ 2,500+ Lines of Code written in 8 hours + extended development
Modern cities face numerous civic challenges that often go unreported or unaddressed due to inefficient reporting mechanisms. Citizens need a simple, transparent way to report issues like potholes, broken streetlights, or garbage collection problems, while local authorities require a streamlined system to track and resolve these issues effectively.
CivicTrack is a modern, user-friendly platform that bridges the gap between citizens and local authorities. Our solution enables:
- ๐ฑ Easy Issue Reporting: Intuitive mobile-first interface for quick reporting
- ๐ Location-Based Tracking: Pinpoint issues precisely on an interactive map
- ๐ธ Visual Documentation: Support for multiple image uploads
- ๐ Transparent Tracking: Real-time status updates on reported issues
- ๐ค Community Engagement: Upvote and comment on local issues
- ๐๏ธ Government Integration: Streamlined workflow for authorities
graph TB
subgraph "Frontend Layer"
A[React SPA<br/>TypeScript + Vite]
B[Clerk Authentication<br/>User Management]
C[Admin Dashboard<br/>Statistics & Moderation]
D[Glassmorphism UI<br/>Dynamic Background Detection]
end
subgraph "UI Components"
E[BackgroundWrapper<br/>Dots, Grid, Shader Variants]
F[Layout Component<br/>Transparent Navbar]
G[Protected Routes<br/>Role-based Access]
H[Form Components<br/>Input Sanitization]
end
subgraph "Backend Services"
I[Express.js API Server<br/>TypeScript + Node.js]
J[Email Service<br/>SMTP + Templates]
K[File Upload Service<br/>Cloudinary + Multer]
L[Authentication Middleware<br/>Clerk Integration]
end
subgraph "Data Layer"
M[(MongoDB Atlas<br/>User & Issue Data)]
N[(Cloudinary<br/>Media Storage)]
O[Clerk Backend<br/>User Authentication]
end
subgraph "Security & Monitoring"
P[Input Sanitization<br/>XSS Protection]
Q[Rate Limiting<br/>CORS Security]
R[Secure Logging<br/>Production Safe]
S[Dynamic Color Detection<br/>Accessibility Features]
end
A -->|HTTPS/REST API| I
B -->|Auth Tokens| L
C -->|Admin Operations| I
D -->|Background Detection| S
E -->|UI Rendering| D
F -->|Navbar State| D
G -->|Route Protection| B
H -->|Form Validation| P
I -->|Geospatial Queries| M
I -->|Image Processing| K
K -->|Media Upload| N
I -->|Notifications| J
L -->|User Verification| O
I -->|Security Layer| P
I -->|Security Policies| Q
I -->|Audit Logging| R
classDef frontend fill:#e1f5fe
classDef ui fill:#f8bbd9
classDef backend fill:#f3e5f5
classDef database fill:#e8f5e8
classDef security fill:#fff3e0
class A,B,C,D frontend
class E,F,G,H ui
class I,J,K,L backend
class M,N,O database
class P,Q,R,S security
- Frontend: React 19 + TypeScript + Vite 7 with modern UI patterns
- Authentication: Clerk React SDK v5.38.1 with UserButton and session management
- State Management: React Context API + Clerk hooks for auth state
- Styling: Tailwind CSS with custom glassmorphism effects and backdrop-blur
- UI Components:
- BackgroundWrapper: Dots, grid, shader, and subtle variants for different page themes
- Layout: Transparent glassmorphism navbar with dynamic text color adaptation
- Protected Routes: Clerk-based route protection with role verification
- Backend: Express.js with TypeScript + MongoDB with geospatial indexing
- File Storage: Cloudinary with image optimization and upload handling
- Email System: SMTP with HTML templates for notifications
- Security:
- Input sanitization with selective field processing
- XSS protection with Content Security Policy
- Dynamic background detection for accessibility
- Clerk security features with JWT token validation
- Maps Integration: OpenStreetMap with Leaflet for geolocation features
- Admin Panel: Role-based access control with Clerk permissions
๐ป Complete Technology Stack Details (Click to expand)
- โ๏ธ Framework: React 18.2
- ๐ Language: TypeScript 5.0
- โก Build Tool: Vite 4.4
- ๐จ Styling: Tailwind CSS 3.3
- ๐ Authentication: Clerk
- ๐๏ธ State Management: React Context API
- ๐งญ Routing: React Router 6.14
- ๐ Form Handling: React Hook Form 7.45
- ๐ฏ UI Components: Headless UI, Heroicons
- ๐บ๏ธ Maps: OpenStreetMap, Leaflet
- ๐ Security: Input sanitization, XSS protection
- ๐ Runtime: Node.js 18+ with TypeScript
- ๐๏ธ Framework: Express.js 4.18
- ๐๏ธ Database: MongoDB with Mongoose ODM
- ๐ Authentication: JWT with bcrypt
- ๐ง Email Service: Nodemailer with SMTP
- โ๏ธ Storage: Cloudinary with Multer
- ๐ Search: MongoDB text & geospatial indexing
- ๐ Analytics: Custom aggregation pipelines
- ๐ก๏ธ Security: Rate limiting, CORS, validation
- ๐ง Development: Concurrently, Nodemon
- ๐ฆ Package Manager: npm
- ๐ Deployment: Vercel (Frontend and Backend)
- ๐ Documentation: Markdown, API testing guides
- ๐ Version Control: Git with semantic commits
๐ Prerequisites & Installation Guide (Click to expand)
- Node.js 18+
- npm 9+
- Git
-
Clone the repository
git clone https://github.com/yourusername/civictrack.git cd CivicTrack -
Install dependencies
cd client npm install -
Set up environment variables Create a
.envfile in the client directory:# Firebase Configuration VITE_FIREBASE_API_KEY=your_firebase_api_key VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_FIREBASE_APP_ID=your_app_id VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id # API Configuration VITE_API_URL=http://localhost:5000/api
Create a
.envfile in the server directory:# Database MONGO_URI=mongodb://localhost:27017/civictrack # JWT JWT_SECRET=your_jwt_secret_key # Email Configuration SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=your_email@gmail.com SMTP_PASS=your_app_password # Cloudinary CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret # Frontend URL FRONTEND_URL=http://localhost:3000
-
Start the development servers
Frontend:
cd client npm run devBackend:
cd server npm run dev -
Seed the database (optional)
cd server npm run seed-full -
Open in your browser
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:5000/api
- Frontend:
๐ Complete API Endpoints Reference (Click to expand)
๐ Authentication
POST /api/users/register - User registration with email verification
POST /api/users/login - JWT-based authentication
GET /api/users/profile - Get user profile
PUT /api/users/profile - Update user profile
๐ Issue Management
GET /api/issues - List issues with geospatial filtering
POST /api/issues - Create new issue with location
GET /api/issues/:id - Get detailed issue information
PUT /api/issues/:id - Update issue (owner/admin only)
DELETE /api/issues/:id - Delete issue (owner/admin only)
PUT /api/issues/:id/upvote - Upvote issue
GET /api/issues/nearby - Find nearby issues with radius
๐ฉ Community Moderation
POST /api/flags/issues/:id/flag - Flag inappropriate content
GET /api/flags/admin - Admin flag review (admin only)
PUT /api/flags/admin/:id/review - Review flagged content (admin only)
๐ง Email System
POST /api/email/send-verification - Send email verification
POST /api/email/verify - Verify email address
POST /api/email/forgot-password - Password reset request
POST /api/email/reset-password - Reset password with token
๐ Analytics & Statistics
GET /api/statistics/dashboard - Admin dashboard stats
GET /api/statistics/trends - Trend analysis data
GET /api/statistics/location - Location-based statistics
GET /api/statistics/user - User activity statistics
โ๏ธ File Management
POST /api/upload/single - Upload single image
POST /api/upload/multiple - Upload multiple images (max 5)
DELETE /api/upload/:publicId - Delete uploaded image
๐ Complete API Documentation - 200+ test cases included
- ๐ฏ Live Demo: CivicTrack Production App (Coming Soon)
- ๐ฅ๏ธ Frontend: Vercel Deployment
- โก Backend API: Railway Deployment (Coming Soon)
- ๐ API Documentation: Complete API Testing Guide
- ๐ Security Guide: Frontend Security Documentation
- ๐ Deployment Guide: Frontend Deployment Instructions
๐๏ธ Current Implementation Status: PRODUCTION READY (Click to expand)
- โ Modern React SPA with TypeScript and Vite
- โ Responsive Dashboard with issue filtering and statistics
- โ Interactive Map Integration with OpenStreetMap
- โ Secure Authentication with Firebase Auth
- โ Admin Panel with role-based access control
- โ Real-time Issue Tracking with status updates
- โ Comprehensive Reporting Form with validation
- โ Multiple Image Upload with Cloudinary integration
- โ Geolocation Detection with manual override
- โ Anonymous Reporting option for sensitive issues
- โ Category-based Organization (9 predefined categories)
- โ Issue Upvoting and community engagement
- โ Production-grade Security with XSS protection
- โ Input Sanitization across all forms
- โ Secure Token Storage with base64 encoding
- โ Content Security Policy headers
- โ Rate Limiting and CORS protection
- โ Audit Logging with sensitive data filtering
- โ Complete REST API with 40+ endpoints
- โ MongoDB Integration with geospatial indexing
- โ Email System with verification and notifications
- โ File Upload Service with image optimization
- โ Flagging System for community moderation
- โ Analytics Dashboard with trend analysis
| ๐ Landing Page | ๐ Dashboard | ๐ Report Issue |
|---|---|---|
![]() |
![]() |
![]() |
| Modern landing with authentication | Interactive dashboard with filtering | Comprehensive reporting form |
| ๐ Issue Details | ๐บ๏ธ Map Integration | ๐ Admin Panel |
|---|---|---|
![]() |
![]() |
![]() |
| Detailed issue view with actions | OpenStreetMap with location pins | Admin dashboard |
- ๐ฑ Mobile-First Responsive Design - Works seamlessly across all devices
- ๐จ Modern UI/UX - Clean, intuitive interface with Tailwind CSS
- ๐บ๏ธ Interactive Maps - Real-time location plotting with custom markers
- ๐ Data Visualization - Charts and statistics for civic insights
- ๐ Secure Authentication - Firebase-powered login with role management
- ๐ Accessibility Ready - Prepared for dark mode and screen readers
๐ฏ Our Unique Selling Propositions (USPs) (Click to expand)
- Community-Driven Verification: Multi-tier citizen verification system (email, phone, ID document, biometric)
- Neighborhood-Specific Insights: Hyperlocal analytics and trending issues within specific areas
- Verified Reporter Badge System: Trust levels based on successful report verification
- Community Moderation: Citizen-led flagging and review system for accurate reporting
- Local Government Integration: Direct municipal worker assignment and response tracking
- Instant Geospatial Intelligence: Advanced location-based issue discovery and clustering
- Real-time Status Broadcasting: Live updates on issue resolution progress with push notifications
- Predictive Issue Mapping: AI-powered hotspot prediction based on historical data
- Multi-Modal Reporting: Voice-to-text, image recognition, and quick-tap category selection
- Emergency Response Integration: Priority routing for critical infrastructure issues
๐ฎ Planned Enhancements (Click to expand)
- ๐ค AI-Powered Issue Categorization with image recognition
- ๐ฑ Progressive Web App (PWA) for offline reporting
- ๐ Smart Notification System with SMS/Email/Push integration
- ๐ฎ Gamification & Civic Rewards for active community members
- ๐ Advanced Predictive Analytics for municipal planning
- ๐ Multi-language Support for diverse communities
- ๐จ Emergency Response Integration with local authorities
- ๐ Civic Engagement Leaderboards and community recognition
๐ Technology Partners & Special Thanks (Click to expand)
- ๐ฅ Clerk for seamless authentication and real-time features
- ๐จ Tailwind CSS for beautiful, responsive styling
- ๐ฏ React Icons for comprehensive icon library
- โก Vite for lightning-fast development experience
- ๐๏ธ MongoDB for flexible, scalable data storage
- โ๏ธ Cloudinary for intelligent media management
- ๐บ๏ธ OpenStreetMap for open-source mapping solutions
- ๐ Odoo x CGC Hackathon 2025 for this incredible opportunity to innovate
- Open Source Community for the amazing tools and libraries
- Municipal Technology Partners for inspiration and civic engagement insights
- Beta Testers who helped us identify and resolve critical issues
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Development Workflow & Contribution Guidelines (Click to expand)
We welcome contributions from the community! Here's how you can help:
- Fork the repository and create your feature branch
- Follow our coding standards: TypeScript, ESLint, Prettier
- Write comprehensive tests for new features
- Update documentation for any API changes
- Submit a pull request with detailed description
- Use our issue reporting system to report bugs in the actual app
- For development issues, create a GitHub issue with:
- Clear problem description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Check existing issues before creating new ones
- Provide detailed use cases and user stories
- Consider civic engagement best practices
Together, we're building stronger, more connected communities






