Skip to content

Code-odyssey-hackathon/team-25

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Code Odyssey Hackathon

πŸ›οΈ JanaVaani β€” India's First AI-Powered Civic Infrastructure Safety Network

JanaVaani Logo

Bridging the gap between citizens and authorities with AI, transparency, and real-time accountability.

Next.js React Supabase HuggingFace Tailwind Leaflet


🎯 Problem Statement

Build an AI-powered civic infrastructure safety & accountability platform that enables citizens to report public infrastructure issues, allows authorities to triage and assign tasks to engineers, and creates a transparent, data-driven ecosystem for resolving civic problems like road damage, bridge cracks, water supply issues, and more.

India's public infrastructure β€” roads, bridges, water supply, and public buildings β€” faces a massive accountability gap. Citizens struggle to report issues, authorities lack real-time visibility, and resolution is slow, opaque, and disconnected. JanaVaani solves this by putting AI, geolocation, and transparency at the center of civic problem-solving.


πŸ’‘ Solution

JanaVaani is a three-portal intelligent ecosystem that connects Citizens β†’ Authorities β†’ Engineers in a seamless, AI-augmented workflow:

Portal Who What They Do
🏠 Citizen Public Report issues via photo/voice, track on live map, upvote problems
πŸ›οΈ Authority Govt Officials Triage reports with AI risk scores, assign engineers, monitor analytics
πŸ”§ Engineer Field Staff Receive tasks, upload inspection evidence, mark resolution

🌟 The Full Workflow

flowchart LR
    A[πŸ§‘ Citizen<br/>Reports Issue] -->|πŸ“Έ Photo + πŸ“ GPS| B[πŸ€– AI Engine]
    B --> C{πŸ” Authentic?}
    C -->|❌ No| D[🚫 Reject Fake]
    C -->|βœ… Yes| E[πŸ—ΊοΈ Map + Leaderboard]
    E --> F[πŸ›οΈ Authority<br/>Dashboard]
    F --> G{⚠️ Escalate?}
    G -->|Yes| H[🚨 Auto-Escalation]
    G -->|No| I[πŸ”§ Assign Engineer]
    I --> J[βœ… Task Completed]
    J --> K[πŸ“Š Accountability Score]
Loading

✨ Key Features

πŸ€– AI-Powered Intelligence

  • Image Classification β€” Hugging Face models auto-detect issue type (road crack, water leak, etc.)
  • Duplicate Detection β€” CLIP ViT embeddings identify similar/duplicate reports automatically
  • Authenticity Verification β€” AI + EXIF metadata block fake or tampered images
  • Voice-to-Text Reporting β€” Speak your complaint; AI parses and structures it

🏠 Multi-Portal Architecture

  • Citizen Portal β€” Anonymous reporting, live map view, risk score tracking, gamified leaderboard
  • Authority Portal β€” Real-time admin dashboard for PWD/municipal/state officials
  • Engineer Portal β€” Field task management with evidence upload and status updates

πŸ“ Advanced Location & Mapping

  • Auto Geolocation β€” GPS + reverse geocoding via OpenStreetMap
  • Interactive Leaflet Maps β€” Clustered, color-coded issue visualization
  • Risk Scoring β€” Dynamic severity assessment with priority mapping
  • Karnataka District Mapping β€” Tailored for state-level infrastructure tracking

πŸ“Š Analytics & Accountability

  • Real-time Dashboard β€” Live metrics, trend analysis, and resolution timelines
  • Gamified Leaderboard β€” Citizen engagement via upvotes and reputation scores
  • Accountability Scoring β€” Track authority and engineer performance over time
  • Auto-Escalation β€” Unresolved issues automatically escalate based on priority & time

πŸ—οΈ System Architecture

graph TB
    subgraph "Frontend"
        A[Next.js 16 App Router]
        B[React 19 + Tailwind CSS]
        C[Leaflet Maps]
        D[Recharts Analytics]
    end

    subgraph "Backend & AI"
        E[Next.js API Routes]
        F[Supabase PostgreSQL]
        G[Hugging Face Inference]
        H[CLIP ViT Embeddings]
        I[Gemini AI Parsing]
    end

    subgraph "Data Layer"
        F
        J[Row Level Security]
        K[Vector Embeddings Table]
    end

    A --> E
    E --> F
    E --> G
    E --> H
    E --> I
    B --> C
    B --> D
    F --> J
    F --> K
Loading

πŸ› οΈ Technical Stack

Layer Technology Purpose
Framework Next.js 16.2.6 + React 19.2.5 SSR, App Router, modern React
Styling Tailwind CSS + Glass Morphism Responsive, modern UI
Database Supabase (PostgreSQL) Real-time DB, auth, storage
Security Row Level Security (RLS) + Zod Granular access + input validation
AI/ML Hugging Face Inference API, CLIP ViT, Gemini Classification, embeddings, parsing
Maps Leaflet + React-Leaflet Interactive geolocation visualization
Charts Recharts Analytics dashboards
Forms React Hook Form + Zod Type-safe validation

πŸš€ Live Demo

Try the full end-to-end workflow:

πŸ›οΈ Authority Portal β€” /admin/login

Email admin@pwd.karnataka.gov.in
Password password123
Capabilities Review reports, update statuses, assign tasks, view analytics

πŸ”§ Engineer Portal β€” /engineer/login

Email engineer@pwd.karnataka.gov.in
Password password123
Capabilities View assigned tasks, upload evidence, mark COMPLETED

🏠 Citizen Portal β€” /

No login required! Report issues anonymously with photo + location.


⚑ Quick Start

# 1. Clone the repo
git clone https://github.com/Code-odyssey-hackathon/team-25.git
cd team-25

# 2. Install dependencies
npm install

# 3. Configure environment
cp .env.example .env
# Edit .env with your Supabase URL, Anon Key, and Hugging Face API key

# 4. Run locally
npm run dev
# Open http://localhost:3000

πŸ—„οΈ Database Schema

erDiagram
    USERS ||--o{ REPORTS : submits
    REPORTS ||--o{ REPORT_EMBEDDINGS : has
    REPORTS ||--o{ MASTER_TICKETS : generates
    AUTHORITIES ||--o{ MASTER_TICKETS : manages
    ENGINEERS ||--o{ MASTER_TICKETS : assigned_to
    REPORTS ||--o{ UPVOTES : receives

    USERS {
        uuid id PK
        string phone
        int reputation_score
    }
    REPORTS {
        uuid id PK
        string issue_type
        string status
        float lat
        float lng
        string image_url
        int risk_score
    }
    REPORT_EMBEDDINGS {
        uuid report_id PK
        vector embedding
    }
    MASTER_TICKETS {
        uuid id PK
        uuid report_id FK
        uuid engineer_id FK
        string priority
        string status
        timestamp deadline
    }
Loading

πŸ”’ Security & Trust

  • βœ… Row Level Security (RLS) β€” Users only see authorized data
  • βœ… AI Fraud Prevention β€” Fake/tampered images blocked at pixel level
  • βœ… JWT Sessions β€” Secure auth via Supabase
  • βœ… SQL Injection Safe β€” Parameterized queries + Zod validation

πŸ“ˆ Impact & Vision

Metric Target
πŸ•’ Report-to-Resolution Time Reduce by 60% via auto-triage & assignment
🎯 Fake Report Detection 90%+ accuracy with AI + EXIF validation
πŸ“ Geographic Coverage District-level granularity for Karnataka
πŸ† Citizen Engagement Gamified leaderboard drives repeat participation

JanaVaani transforms civic complaint boxes into real-time, AI-driven infrastructure command centers.


πŸ‘₯ Team

πŸ† Team 25 β€” Run Time Error

Code Odyssey Hackathon 2026

Role Focus
Full-Stack Engineering Next.js, Supabase, API Architecture
AI & ML Integration Hugging Face, CLIP, Gemini, Embeddings
UI/UX & Maps Tailwind, Leaflet, Dashboard Design
Database & Security PostgreSQL, RLS, Schema Design

🌟 If you believe in smarter cities, star this repo! 🌟

Built with ❀️, β˜•, and a lot of console.log by Team 25 β€” Run Time Error

Code Odyssey Hackathon 2026

Star on GitHub

About

Hackathon repo for Team 25

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors