Skip to content

Latest commit

Β 

History

5 Commits

Folders and files

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

Repository files navigation

Project Shunya - Ground Level Reporting

A comprehensive civic reporting mobile web application that enables citizens to report community issues like accidents, medical emergencies, and civil problems while allowing authorities to manage and resolve these reports efficiently.

🌟 Features

  • Citizen Reporting: Upload photos and report incidents with precise location marking
  • Interactive Maps: Real-time incident visualization using Leaflet and OpenStreetMap
  • Authority Dashboard: Comprehensive admin panel for managing and resolving reports
  • Gamification: Points and rewards system to encourage community participation
  • Authentication: Role-based access for citizens and authorities
  • Real-time Updates: Live location tracking and incident status updates
  • Mobile-First Design: Responsive design optimized for mobile devices

πŸ“± Application Structure

Main Pages

1. Homepage (/)

  • Hero Section: Main incident reporting interface with community statistics
  • Report Categories: Quick access to different incident types (Accidents, Medical, Civil)
  • Recent Reports: Display of latest community reports
  • Navigation: Bottom navigation for mobile, sidebar for desktop

2. Authority Dashboard (/authority)

  • Report Management: View, verify, and resolve citizen reports
  • Analytics: Community statistics and incident trends
  • Status Updates: Mark reports as verified, in-progress, or resolved
  • Photo Evidence: View uploaded incident photos with details

Key Components

Camera Capture (components/camera-capture.tsx)

  • File input-based photo upload (renamed from "Capture Photo" to "Upload Photo")
  • Mobile-optimized interface with preview functionality
  • Automatic photo compression and validation

Interactive Map (components/incident-map.tsx)

  • Leaflet-based mapping with OpenStreetMap tiles
  • Real-time location tracking with high accuracy
  • Incident pin placement with category-specific markers
  • Click-to-report functionality for direct incident creation

Incident Reporting Flow (components/incident-report-flow.tsx)

  • Multi-step reporting process with form validation
  • Incident categorization and priority selection
  • Location confirmation and photo attachment
  • Report submission with automatic ID generation

Authentication System (components/auth-modal.tsx)

  • Role-based login (Citizen/Authority)
  • Persistent session management with localStorage
  • Demo accounts for testing purposes
  • Secure credential validation

Rewards System (components/rewards-system.tsx)

  • Points tracking and achievement badges
  • Community leaderboards and progress indicators
  • Reward redemption marketplace
  • Gamification elements to encourage participation

πŸš€ Getting Started

Prerequisites

  • Node.js (version 18 or higher)
  • npm or bun package manager
  • Modern web browser with geolocation support

Installation

  1. Clone the repository ```bash git clone cd project-shunya ```

  2. Install dependencies ```bash npm install

    or

    bun install ```

  3. Start the development server ```bash npm run dev

    or

    bun run dev ```

  4. Open your browser Navigate to http://localhost:3000 to view the application

Build for Production

```bash

Build the application

npm run build

or

bun run build

Start production server

npm start

or

bun start ```

πŸ› οΈ Technology Stack

  • Framework: Next.js 15.2.4 with App Router
  • Styling: Tailwind CSS v4 with custom design tokens
  • UI Components: shadcn/ui component library
  • Typography: Inter and Poppins fonts
  • Maps: Leaflet with OpenStreetMap tiles
  • Icons: Lucide React icons
  • State Management: React hooks with localStorage persistence
  • Authentication: Custom role-based system
  • Deployment: Vercel-optimized

πŸ“‹ Usage Instructions

For Citizens

  1. Sign Up/Login: Create an account or use demo credentials

    • Demo Citizen: citizen@demo.com / demo123
  2. Report an Incident:

    • Click "REPORT INCIDENT" on homepage
    • Upload a photo of the incident
    • Select location on the interactive map
    • Fill in incident details and submit
  3. Track Reports: View your submitted reports and earn points

  4. View Community Map: See all incidents in your area with filtering options

For Authorities

  1. Access Authority Portal: Login with authority credentials

    • Demo Authority: authority@demo.com / admin123
  2. Manage Reports:

    • View all citizen reports with photos and details
    • Verify reports and mark as resolved
    • Add response comments and updates
    • Delete inappropriate reports
  3. Monitor Analytics: Track community statistics and response times

πŸ—ΊοΈ Map Functionality

  • Interactive Navigation: Zoom, pan, and explore the community map
  • Real-time Location: Automatic user location detection and tracking
  • Incident Pins: Color-coded markers for different incident types
  • Click-to-Report: Click anywhere on map to create new incident reports
  • Photo Integration: View incident photos directly from map pins

πŸ’Ύ Data Storage

  • Local Storage: All data persists in browser localStorage
  • Cross-tab Sync: Real-time updates across multiple browser tabs
  • Session Management: Automatic login state restoration
  • Incident History: Complete record of all submitted reports

🎯 Demo Accounts

Citizens

  • Email: citizen@demo.com
  • Password: demo123
  • Role: Citizen with reporting privileges

Authorities

  • Email: authority@demo.com
  • Password: admin123
  • Role: Authority with management privileges

πŸ”§ Development

Project Structure

``` project-shunya/ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ page.tsx # Main homepage β”‚ β”œβ”€β”€ authority/ # Authority dashboard β”‚ β”œβ”€β”€ layout.tsx # Root layout β”‚ └── globals.css # Global styles β”œβ”€β”€ components/ β”‚ β”œβ”€β”€ ui/ # shadcn/ui components β”‚ β”œβ”€β”€ camera-capture.tsx β”‚ β”œβ”€β”€ incident-map.tsx β”‚ β”œβ”€β”€ auth-modal.tsx β”‚ └── ... └── public/ # Static assets ```

Key Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint

🌐 Deployment

The application is optimized for Vercel deployment with automatic builds and previews. Simply connect your repository to Vercel for seamless deployment.

πŸ“± Mobile Optimization

  • Responsive Design: Optimized for all screen sizes
  • Touch-Friendly: Large buttons and intuitive gestures
  • Offline Capability: Works with cached data when offline
  • Performance: Optimized loading and smooth animations

Project Shunya - Empowering communities through technology-driven civic engagement.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages