The Civic Issue Tracker bridges the gap between citizens, field workers, and municipal departments. It is a centralized, role-based platform designed to digitise and streamline the management of urban civic infrastructure issues like potholes, street-light failures, garbage accumulation, and drainage blockages.
The platform allows field workers (bikers) to report geo-tagged issues with photographic evidence, administrators to assign tasks across departments, and department officials to monitor and resolve issues within their jurisdiction in real-time on an interactive map.
- 🔐 Role-Based Access Control (RBAC): Dedicated dashboards and secure routing for Admins, Bikers, and Department Officials.
- 📍 Geo-Tagged Issue Reporting: Field workers report issues directly from the ground with automatic browser-based GPS coordinate capture.
- 📸 Photographic Evidence: Enforces accountability by requiring before and after visual proof for issue creation and resolution.
- 🗺️ Interactive GIS Map: Built-in Leaflet maps for visualizing problem hotspots, assigned areas, and urgent tasks city-wide.
- 🏢 Department-level Data Isolation: Departments only see issues relevant to their jurisdiction (enforced by Supabase RLS).
- 📊 Real-Time Analytics: Live statistics on pending, resolved, and high-priority issues dynamically updated for all stakeholders.
- Framework: Next.js 15 (App Router)
- Library: React 19, TypeScript
- Styling: Tailwind CSS (Modern Glassmorphism UI)
- Maps: Leaflet & React Leaflet
- Icons: Lucide React
- Database: PostgreSQL with Row Level Security (RLS)
- Authentication: Supabase Auth (Email/Password & JWT Sessions)
- Storage: Supabase Storage (Cloud bucket for high-res before/after photos)
Follow these steps to set up the project locally.
-
Clone the repository:
git clone https://github.com/yourusername/civic-issue-tracker.git cd "civic-issue-tracker"
-
Install dependencies:
npm install # or yarn install -
Set up environment variables:
- Duplicate the
.env.local.examplefile and rename it to.env.local. - Add your Supabase project credentials:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
- Duplicate the
-
Database Initialisation (Supabase):
- Navigate to your Supabase project's SQL Editor and run the provided migration scripts located in the root directory:
migration-department-update.sqlmigration-solve-feature.sql
- This will automatically create the necessary
users,issues, anddepartmentstables alongside RLS policies.
- Navigate to your Supabase project's SQL Editor and run the provided migration scripts located in the root directory:
-
Run the development server:
npm run dev # or yarn dev -
View the App: Open http://localhost:3000 in your browser.
| Role | Access URL | Capabilities |
|---|---|---|
| Admin | /admin |
Full system access. Assign tasks across all departments, create biker profiles, view city-wide maps, and monitor comprehensive stats. |
| Biker | /biker |
Ground agents. Uploads geo-tagged issues, assigned problem areas, submits resolution photos, and manages urgent tasks. |
| Department | /department |
Specialized officials. They only receive and resolve issues specifically tagged to their department (e.g., Water, Roads). |
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.