Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Swachh Nagar - Crowdsourced Civic Issue Reporting System

Smart India Hackathon 2025 React TypeScript

Team: The Black Pearl πŸ΄β€β˜ οΈ

Empowering citizens to build cleaner, smarter cities through technology

πŸ“‹ Table of Contents


🎯 Problem Statement

Title: Crowdsourced Civic Issue Reporting and Resolution System

Challenge: Traditional civic issue reporting systems face several critical challenges:

  • ❌ Long resolution times due to manual routing
  • ❌ Low citizen engagement and participation
  • ❌ Lack of transparency in issue resolution
  • ❌ No priority-based routing mechanism
  • ❌ Language barriers preventing inclusive participation
  • ❌ No real-time tracking and analytics

Our Solution: Swachh Nagar addresses these challenges with an AI-powered, mobile-first platform that democratizes civic engagement and accelerates municipal response times.


πŸ’‘ Solution Overview

Swachh Nagar is an intelligent, crowdsourced civic issue reporting platform designed for Smart Cities. Built specifically for the Siliguri Municipal Corporation as a pilot, it leverages AI, geolocation, and real-time analytics to transform how citizens interact with local governance.

Core Value Propositions:

  1. AI-Powered Issue Classification - Automatically categorizes and routes issues to the correct department
  2. Multi-Language Support - Inclusive platform supporting 6+ Indian languages
  3. Real-time Analytics Dashboard - Data-driven insights for municipal administrators
  4. Offline-First Architecture - Works seamlessly even without internet connectivity
  5. Transparent Tracking - Citizens can upvote, comment, and track issue resolution

✨ Key Features

πŸ€– Intelligent AI Classification

  • Automated Issue Categorization: Advanced AI analyzes images and descriptions to classify issues (roads, garbage, drainage, streetlights, water supply)
  • Confidence Scoring: 85-99% accuracy with transparent confidence metrics
  • Smart Department Routing: Automatically routes to appropriate departments (PWD, WMD, ED, WSD, DD)
  • Priority Detection: AI-driven severity scoring (1-10 scale) based on location, issue type, and urgency factors

πŸ“ Advanced Geolocation & Mapping

  • OpenStreetMap Integration: Free, open-source mapping with Leaflet.js
  • Precise Location Tracking: Automatic ward and street detection
  • Distance Calculation: Shows proximity of issues to user's location
  • Interactive Markers: Click-to-view issue details on map

πŸ“Š Real-Time Analytics Dashboard

  • Municipal Insights: Total reports, resolution rates, and average resolution time
  • Issue Type Analysis: Trending issues with up/down indicators
  • Critical Areas Detection: Heat map of problem zones by ward
  • Performance Metrics: Department-wise efficiency tracking

🌐 Multi-Language Support

  • 6+ Languages: English, Hindi, Bengali, Tamil, Telugu, Marathi
  • Dynamic Translation: Seamless language switching without app restart
  • Inclusive Design: Ensuring all citizens can participate regardless of language

πŸ“± Mobile-First Design

  • Progressive Web App (PWA): Install on any device
  • Responsive UI: Optimized for smartphones and tablets
  • Touch-Optimized: Intuitive swipe gestures and touch interactions
  • Lightweight: Fast load times even on 3G/4G networks

πŸ”„ Offline Support

  • Local Storage: Reports cached locally when offline
  • Auto-Sync: Automatically syncs when connection restored
  • Queue Management: Smart queuing of offline actions

πŸŽ₯ Rich Media Support

  • Photo Capture: In-app camera integration
  • Video Upload: Support for video evidence
  • Media Carousel: Multiple images/videos per report
  • Image Compression: Optimized for mobile networks

πŸ‘₯ Community Engagement

  • Upvote System: Democratic prioritization of issues
  • Comment Threads: Community discussion on issues
  • User Profiles: Track personal contributions
  • Gamification: Badges and achievements for active citizens

πŸ›  Technology Stack

Frontend

  • React 18.3.1 - Modern component-based UI framework
  • TypeScript 5.9.2 - Type-safe development
  • Vite 6.3.5 - Lightning-fast build tool and dev server
  • Tailwind CSS - Utility-first CSS framework for rapid UI development
  • Framer Motion - Production-ready animation library
  • Radix UI - Accessible, unstyled component primitives

Mapping & Geolocation

  • Leaflet 1.9.4 - Leading open-source JavaScript library for mobile-friendly interactive maps
  • OpenStreetMap - Collaborative, open-source map data

UI Components & Libraries

  • Lucide React - Beautiful, consistent icons (500+ icons)
  • Recharts - Composable charting library for analytics
  • React Hook Form - Performant form validation
  • Sonner - Elegant toast notifications
  • Vaul - Accessible drawer component for mobile

Development Tools

  • Vite SWC Plugin - Ultra-fast React compilation
  • TypeScript Compiler - Advanced type checking
  • ESLint - Code quality and consistency
  • Git - Version control

AI & Classification

  • Custom AI Classification Engine - Proprietary algorithm for issue detection
  • Keyword Pattern Matching - Context-aware issue categorization
  • Severity Scoring Algorithm - Multi-factor urgency calculation

πŸ— System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      User Interface Layer                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  β”‚   Home     β”‚  β”‚   Report   β”‚  β”‚ Analytics  β”‚            β”‚
β”‚  β”‚   Screen   β”‚  β”‚   Screen   β”‚  β”‚  Dashboard β”‚            β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           ↕
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Business Logic Layer                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚ AI           β”‚  β”‚ Geolocation  β”‚  β”‚ Analytics    β”‚      β”‚
β”‚  β”‚ Classifier   β”‚  β”‚ Service      β”‚  β”‚ Generator    β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           ↕
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Data Layer                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚ Local        β”‚  β”‚ IndexedDB    β”‚  β”‚ OpenStreetMapβ”‚      β”‚
β”‚  β”‚ Storage      β”‚  β”‚ (Offline)    β”‚  β”‚ API          β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow:

  1. User captures issue via camera/media
  2. AI analyzes image + description β†’ classifies issue type
  3. Geolocation determines ward, street, coordinates
  4. Severity algorithm calculates priority score
  5. Department routing assigns to correct municipal dept
  6. Report created with timestamp, AI tags, confidence
  7. Real-time update pushes to analytics dashboard
  8. Community engagement enables upvotes and comments

πŸ“Έ Screenshots

Onboarding & Home Screen

Multilingual onboarding β†’ Location detection β†’ Live feed of civic issues

Report Creation Flow

Camera capture β†’ AI classification β†’ Severity rating β†’ Submit

Analytics Dashboard

Municipal insights β†’ Department performance β†’ Trending issues β†’ Critical areas

Map View

Interactive markers β†’ Issue clusters β†’ Proximity-based sorting

Project Structure

Swachh Nagar Mobile Prototype/
β”œβ”€β”€ public/                      # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/              # React components
β”‚   β”‚   β”œβ”€β”€ ui/                  # Reusable UI components (40+ components)
β”‚   β”‚   β”œβ”€β”€ HomeScreen.tsx       # Main feed screen
β”‚   β”‚   β”œβ”€β”€ ReportScreen.tsx     # Issue reporting interface
β”‚   β”‚   β”œβ”€β”€ AnalyticsScreen.tsx  # Analytics dashboard
β”‚   β”‚   β”œβ”€β”€ LeafletMapScreen.tsx # Map integration
β”‚   β”‚   β”œβ”€β”€ LiveFeed.tsx         # Real-time updates
β”‚   β”‚   β”œβ”€β”€ OnboardingScreen.tsx # User onboarding
β”‚   β”‚   β”œβ”€β”€ ProfileScreen.tsx    # User profile management
β”‚   β”‚   └── ...                  # Additional components
β”‚   β”œβ”€β”€ utils/                   # Utility functions
β”‚   β”‚   β”œβ”€β”€ aiClassification.ts  # AI classification engine
β”‚   β”‚   β”œβ”€β”€ mapConfig.ts         # Map configuration
β”‚   β”‚   └── mobileDetection.ts   # Device detection
β”‚   β”œβ”€β”€ types/                   # TypeScript type definitions
β”‚   β”œβ”€β”€ styles/                  # CSS and styling
β”‚   β”‚   β”œβ”€β”€ globals.css          # Global styles
β”‚   β”‚   └── map.css              # Map-specific styles
β”‚   β”œβ”€β”€ App.tsx                  # Root application component
β”‚   └── main.tsx                 # Application entry point
β”œβ”€β”€ package.json                 # Dependencies and scripts
β”œβ”€β”€ vite.config.ts              # Vite configuration
β”œβ”€β”€ tsconfig.json               # TypeScript configuration
└── README.md                    # This file

πŸ“ˆ Impact & Metrics

Target Impact

Metric Current System With Swachh Nagar Improvement
Average Resolution Time 7-10 days 2-3 days 70% faster
Citizen Participation 5% 35%+ 7x increase
Issue Classification Accuracy Manual (100%) AI (92-98%) Automated
Department Routing Time 2-3 days < 1 minute 99% faster
Transparency Low High Full visibility

Projected Benefits

  • πŸ’° Cost Reduction: 40% reduction in manual processing costs
  • ⏱ Time Savings: 60-70% faster issue resolution
  • πŸ™ Improved Governance: Data-driven decision making for urban planning
  • πŸ‘₯ Citizen Empowerment: Democratic participation in civic improvement
  • 🌱 Sustainability: Faster cleanup β†’ cleaner cities β†’ better health outcomes

πŸŽ₯ Demo & Presentation

Live Demo

[https://swachh-nagar.netlify.app/]

Video Walkthrough

[https://www.youtube.com/watch?v=aHgKznMHg8Q]


🀝 Acknowledgments

  • Smart India Hackathon 2025 - For providing the platform to innovate
  • Siliguri Municipal Corporation - Pilot city and domain context
  • OpenStreetMap Contributors - For open-source mapping data
  • React & TypeScript Community - For excellent documentation and support

Built with ❀️ by The Black Pearl for Smart India Hackathon 2025

Making cities cleaner, one report at a time 🌿

Thank you for exploring Swachh Nagar!

About

A crowdsourced civic issue reporting and resolution system built for SIH 2025. Citizens can report problems, track updates, and collaborate with authorities for cleaner and safer cities.

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages