Skip to content

balrajmalusare02/CitizenConnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

93 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›๏ธ CitizenConnect: Next-Gen Grievance Redressal System

Empowering Citizens, Enabling Governance. A full-stack, real-time ecosystem connecting citizens directly with municipal authorities for rapid grievance resolution.

License Backend Mobile Web Real-time API Docs

๐Ÿ”— Live Links

โš ๏ธ Note: The backend is hosted on a free instance. It may take 50-60 seconds to wake up for the first request. Please be patient!


๐Ÿš€ Project Achievements & Performance Metrics

CitizenConnect was architected with speed and scalability as the primary goals. We moved beyond traditional request-response cycles to build a truly live system.

โšก Performance Benchmarks

  • ๐Ÿš€ Blazing Fast Load Times: The Admin Panel (Vite) renders the dashboard in < 1.5 seconds.
  • โšก Optimized Backend: API response latency is consistently < 100ms thanks to optimized Prisma queries and connection pooling.
  • ๐Ÿ”„ 0.5s Real-Time Sync: When an admin updates a status, the citizen's mobile app reflects the change in under 1 second via WebSocket eventsโ€”no pull-to-refresh needed.
  • ๐Ÿ“ฑ Seamless Mobile Experience: The Flutter app maintains 60 FPS performance even while rendering complex interactive heatmaps.
  • ๐Ÿ“ธ Rapid Media Handling: Image uploads and processing via Cloudinary are optimized to complete in 2-3 seconds on 4G networks.

๐ŸŒŸ Why CitizenConnect Stands Out? (Uniqueness)

Unlike standard grievance apps that are just "forms and databases," CitizenConnect adds a layer of intelligence and real-time interactivity:

  1. ๐Ÿค– Intelligent Auto-Assignment: The system doesn't just dump complaints into a pile. It intelligently routes complaints to the specific Department Employee based on the complaint's Domain and Category mapping immediately upon submission.
  2. ๐Ÿ—บ๏ธ Live Geo-Spatial Heatmap: Admins don't just read lists; they visualize problem "Hotspots" on a live map, utilizing real GPS coordinates captured from citizen devices to identify high-density trouble zones.
  3. ๐Ÿ”” Bi-Directional Real-Time Ecosystem:
    • Citizen raises complaint โžก๏ธ Admin gets instant socket notification.
    • Admin resolves complaint โžก๏ธ Citizen phone updates instantly.
  4. ๐Ÿข Multi-Hierarchy Access Control: A complex 5-tier role system (Mayor > City Admin > Dept Admin > Ward Officer > Employee) ensures strict data security and operational hierarchy.

๐ŸŽฏ Project Objective

To bridge the gap between Digital India and Municipal Governance by providing a transparent, trackable, and efficient platform for resolving civic issues (water, electricity, roads, sanitation) with zero paperwork and minimal delay.


๐Ÿ› ๏ธ Tech Stack & Dependencies

1. ๐Ÿ”™ Backend API (The Brain)

  • Runtime: Node.js & TypeScript (for type safety and speed)
  • Framework: Express.js
  • Database: PostgreSQL (hosted on Neon Serverless)
  • ORM: Prisma (for type-safe database queries)
  • Real-Time: Socket.IO (WebSockets)
  • Authentication: JWT (JSON Web Tokens) & BCrypt
  • Storage: Cloudinary (Image/Video hosting)
  • Deployment: Render

2. ๐Ÿ“ฑ Mobile App (Citizen Interface)

  • Framework: Flutter (Dart)
  • State Management: Provider
  • Maps: flutter_map & latlong2 (OpenStreetMap)
  • Native Features: * image_picker (Camera integration)
    • geolocator (Live GPS coordinates)
    • flutter_local_notifications (Device alerts)
  • Connectivity: socket_io_client (Real-time updates), http (REST API)

3. ๐Ÿ’ป Admin Dashboard (Authority Interface)

  • Framework: React.js (Vite)
  • UI Library: Material UI (MUI)
  • Visualization: Chart.js (Analytics) & React-Leaflet (Heatmaps)
  • Animations: Framer Motion
  • Localization: i18next (English, Hindi, Marathi support)
  • Deployment: Vercel

๐Ÿ“‚ Project Structure

This project is organized as a clean Monorepo: CitizenConnect/

โ”œโ”€โ”€ citizenconnect-backend/ # Node.js/Express API

โ”‚ โ”œโ”€โ”€ src/controllers/ # Business logic

โ”‚ โ”œโ”€โ”€ src/routes/ # API Endpoints

โ”‚ โ”œโ”€โ”€ src/sockets/ # Real-time event handlers

โ”‚ โ””โ”€โ”€ prisma/schema.prisma # Database Model

โ”‚

โ”œโ”€โ”€ citizenconnect_mobile_app/ # Flutter Android App

โ”‚ โ”œโ”€โ”€ lib/screens/ # UI Pages (Login, Dashboard, Maps)

โ”‚ โ””โ”€โ”€ lib/services/ # API & Socket Services

โ”‚

โ””โ”€โ”€ citizenconnect-admin-dashboard/ # React Web Panel

โ”œโ”€โ”€ src/pages/ # Analytics, Heatmaps, Management

โ””โ”€โ”€ src/components/ # Reusable UI components


โœจ Key Features

For Citizens (Mobile App)

  • Secure Login/Register: Fast authentication with JWT.
  • Raise Complaint: 3-step form with Photo Evidence and Auto-GPS Location.
  • Live Tracking: Visual timeline of complaint status (Raised โ†’ Acknowledged โ†’ In Progress โ†’ Resolved).
  • Public Heatmap: View all complaints in the city to see common issues nearby.
  • Feedback: Rate the resolution quality (1-5 stars) after closure.

For Admins (Web Dashboard)

  • Role-Based Dashboards: Custom views for City Admins, Ward Officers, and Dept Admins.
  • Advanced Analytics: Charts for "Complaints vs. Resolution", "Avg Response Time", and "Department Performance".
  • Complaint Management: Assign, Reassign, and Update status of complaints.
  • Severity Heatmap: Visual identification of high-density problem zones (Green/Yellow/Red zones).
  • Employee Management: Track performance of individual staff members.

๐Ÿ”ฎ Future Scope

  • Push Notification Service: Integrate Firebase (FCM) for background alerts on mobile devices.
  • AI Spam Detection: Use ML models to filter out fake or duplicate complaints automatically.
  • Offline Mode: Allow citizens to draft complaints without internet and sync when online using local database storage.
  • Chat Support: Direct in-app chat between the assigned employee and the citizen for faster clarification.

๐Ÿ” Environment Variables

Backend .env

Variable Description
DATABASE_URL PostgreSQL connection string
JWT_SECRET Secret used to sign JWT tokens
CLOUDINARY_URL Cloudinary upload URL
FRONTEND_URL Allowed CORS origin for admin panel
MOBILE_APP_URL Allowed CORS origin for mobile app
SOCKET_ORIGIN Allowed origin for socket connections

Frontend .env

Variable Description
VITE_API_BASE_URL Backend API base URL

Mobile App .env (Optional)

Variable Description
BASE_URL Flutter/ Android Studios base URL (if using any)
SOCKET_BASE_URL YOUR_SOCKET_BASE_URL

๐Ÿ“˜ API Documentation

Swagger documentation available at: https://citizenconnect-zbfh.onrender.com/api-docs


๐Ÿ“ธ Screenshots (Add Your Images Later)

Here are the output screenshots of the project:


๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18+)
  • Flutter SDK
  • PostgreSQL Database (Local or Cloud)

1. Setup Backend

  • cd citizenconnect-backend
  • npm install

Add .env file with mandatory variables

  • npx prisma generate
  • npx prisma db push
  • npm run dev

2. Setup Admin Panel

  • cd citizenconnect-admin-dashboard
  • npm install
  • npm run dev

3. Setup Mobile App

  • cd citizenconnect_mobile_app
  • flutter pub get
  • flutter run

๐Ÿค Contributing

Contributions, suggestions, and improvements are always welcome! Follow conventional commits and create a pull request.


Developed with Patience, Persistance, Excitement & Love

- Balraj Malusare ๐Ÿซถ!

About

Empowering Citizens, Enabling Governance. A full-stack, real-time ecosystem connecting citizens directly with municipal authorities for rapid grievance resolution. Features intelligent auto-assignment, live geo-spatial heatmaps, and instant status updates via Socket.IO.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors