Bridging the gap between citizens and local government through transparent, real-time issue tracking.
- About The Project
- The Problem
- Key Features
- User Roles
- Tech Stack
- System Architecture
- Application Workflow
- Project Structure
- Getting Started
- API Overview
- Screenshots
- Why This Project
- License
CivicTrack is a modern, full-stack civic issue management platform that empowers citizens to report public infrastructure problems β potholes, garbage overflow, water leakage, broken streetlights, and more β while giving government authorities dedicated tools to review, prioritize, assign, and resolve those issues efficiently.
Unlike traditional complaint portals that disappear into paperwork, CivicTrack is built around:
| Pillar | Description |
|---|---|
| π Live Issue Tracking | Every report is trackable from submission to resolution |
| ποΈ Role-Based Dashboards | Tailored experiences for citizens, authorities, and admins |
| πΊοΈ Geographic Reporting | Automatic GPS capture for accurate issue location |
| π Real-Time Status Updates | Citizens stay informed at every stage |
| π¨ Modern UI/UX | A responsive, dark-themed, animation-rich interface |
Citizens routinely report civic issues like potholes, garbage overflow, water leakage, and broken streetlights β but these complaints typically:
- β Disappear into paperwork
- β Lack transparency
- β Have no tracking mechanism
- β Provide zero status updates
- β Result in no accountability
CivicTrack digitizes the complete issue lifecycle, replacing opacity with a transparent, end-to-end tracking system.
- Google OAuth 2.0 sign-in
- JWT-based session management
- Role-based authorization (Citizen / Authority / Admin)
- Protected routes and secure middleware validation
- Report categories: potholes, garbage, water leakage, street lights, roads, drainage, and more
- Image upload support
- Automatic GPS coordinate capture via the Browser Geolocation API
- Priority tagging and rich descriptions
- Location-based issue visualization
- Simplified, map-driven issue identification
- Live status:
PendingβIn ProgressβResolved - Full timeline with authority assignment history
- Detailed issue pages with images, GPS data, and reporter info
- State-scoped issue visibility
- Filter, assign, and manage issue tokens
- Approve or reject submissions
- Update status in real time
- Dark theme with glassmorphism accents
- Smooth Framer Motion animations
- Fully responsive across devices
CivicTrack is built on a three-tier role system, ensuring accountability at every level.
|
|
|
This decentralized structure means every state manages its own issue queue, while the Super Admin retains complete national oversight.
|
Frontend
|
Backend
|
flowchart TD
A[π€ Client Browser] --> B[Next.js Frontend]
B --> C[Gin REST API]
C --> D[Authentication Middleware]
D --> E[Handlers]
E --> F[Services]
F --> G[Models]
G --> H[(PostgreSQL Database)]
style A fill:#58a6ff,color:#fff
style B fill:#000,color:#fff
style C fill:#00ADD8,color:#fff
style D fill:#f0883e,color:#fff
style H fill:#4169E1,color:#fff
sequenceDiagram
participant C as Citizen
participant S as Backend
participant A as State Authority
C->>S: Submit issue (title, category, GPS, image)
S->>S: Store issue & auto-assign to state
S->>A: Notify authority of new issue
A->>S: Review report & assign token
A->>S: Update status (Pending β In Progress β Resolved)
S->>C: Push status update
Note over C,A: Full transparency at every step
flowchart LR
A[Citizen clicks Google Login] --> B[Google OAuth]
B --> C[Backend Verification]
C --> D[JWT Generated]
D --> E[JWT Stored Client-Side]
E --> F[Protected Routes]
F --> G[Role-Based Dashboard]
|
Backend |
Frontend |
Make sure you have the following installed:
- Node.js
v18+ - Go
v1.21+ - PostgreSQL
v14+ - A Google Cloud OAuth client ID & secret
-
Clone the repository
git clone https://github.com/your-username/civictrack.git cd civictrack -
Backend setup
cd backend cp .env.example .env # Configure DB, JWT secret, OAuth keys go mod tidy go run main.go
-
Frontend setup
cd frontend cp .env.example .env.local # Configure API URL & Google client ID npm install npm run dev
-
Access the app
Open civic-track in your browser. π
| Variable | Description | Location |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Backend |
JWT_SECRET |
Secret key for signing JWTs | Backend |
GOOGLE_CLIENT_ID |
Google OAuth client ID | Backend & Frontend |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret | Backend |
NEXT_PUBLIC_API_URL |
Base URL of the backend API | Frontend |
Use the following credentials to explore the different dashboards.
Citizen Login
- Authentication: Google OAuth
- Simply click Continue with Google on the login page.
| Field | Value |
|---|---|
statename_auth@civictrack.com |
|
| Password | statename@123 |
| Field | Value |
|---|---|
admin_auth@civictrack.com |
|
| Password | admin@123 |
β οΈ These are demo credentials intended for testing and showcasing the application.
CivicTrack exposes a REST API built with Gin, secured via JWT and role-based middleware.
| Category | Description |
|---|---|
| Authentication | Google OAuth login, JWT issuance & refresh |
| Issue Management | Create, list, update, and view civic issues |
| Status Updates | Transition issues through their lifecycle |
| Authority Dashboard | State-scoped issue queries and assignment |
| User Management | Profile and account operations |
| Role Verification | Middleware-enforced access control |
Security measures include:
- JWT-based authentication on all protected routes
- Role-based authorization middleware
- Server-side request validation
- Secure Google OAuth verification flow
| Landing Page | Login Page |
|---|---|
![]() |
![]() |
| Citizen Dashboard | Authority Dashboard |
|---|---|
![]() |
![]() |
| Admin Dashboard | Issue Details |
|---|---|
![]() |
![]() |
| Report Issue | Map View |
|---|---|
![]() |
![]() |
CivicTrack was built to demonstrate production-grade, full-stack engineering across the entire application lifecycle:
- β Scalable backend architecture in Go
- β Secure authentication & role-based access control
- β RESTful API design
- β Relational database design in PostgreSQL
- β Modern, responsive frontend engineering
- β Real-world problem solving with measurable civic impact
Skills demonstrated: Next.js Β· React Β· TypeScript Β· Tailwind CSS Β· Go Β· Gin Β· PostgreSQL Β· JWT Β· Google OAuth Β· REST APIs Β· RBAC Β· Geolocation APIs Β· Full-Stack System Design
Distributed under the MIT License. See LICENSE for more information.







