Skip to content

By digitizing civic engagement and bridging the gap between citizens and authorities, our platform plays a key role in building resilient, inclusive, and sustainable urban environments.

Notifications You must be signed in to change notification settings

adishwar-u/HackPrix2Team70

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

JanSahay : Community Civic Engagement Platform 🏘️

JanSahay Banner

A citizen-powered platform for reporting and resolving local civic issues, fostering community engagement and government accountability.

Live Demo License: MIT

🌟 Key Features

πŸ—ΊοΈ Interactive Mapping

  • Real-time issue visualization on OpenStreetMap
  • Cluster markers for high-density areas
  • Custom map layers for different issue types
  • Street view integration for context

πŸ“‹ Reporting System

Feature Description
Multi-step Form Guided reporting process with progress indicators
Smart Categorization Auto-suggestions for issue types based on description
Media Attachments Support for images (JPG/PNG) and optional video clips
Anonymous Reporting Option to submit without personal details

πŸ” Discovery Tools

graph TD
    A[Search Interface] --> B(Keyword Search)
    A --> C(Location Filter)
    A --> D(Date Range)
    B --> E(Full-text on titles/descriptions)
    C --> F(Radius selector)
    D --> G(Timeline visualization)
Loading

πŸ“Š Community Dashboard

  • Personal contribution metrics
  • Issue resolution timelines
  • Neighborhood heatmaps
  • Achievement badges system

πŸ› οΈ Technology Stack

Frontend Architecture

graph LR
    React-->TypeScript
    Vite-->React
    Tailwind-->shadcn/ui
    React-Leaflet-->MapComponents
    GSAP-->Animations
    Cloudinary-->ImagePersistence
Loading

Core Dependencies

Package Version Purpose
react ^18.2 Core framework
leaflet ^1.9.3 Mapping engine
react-leaflet ^4.2.1 React bindings
nominatim-client ^3.1.0 Geocoding
recharts ^2.8 Data visualization
sonner ^1.4.1 Notification system

πŸš€ Installation Guide

System Requirements

  • Node.js v18+ (LTS recommended)
  • npm v9+ or yarn v1.22+
  • 500MB disk space
  • Modern browser with ES2020 support

Setup Instructions

# Clone with SSH
git clone git@github.com:your-org/jansahay.git

# Install dependencies (using yarn)
yarn install

# Configure environment
cp .env.example .env.local

# Start development server
yarn dev

Configuration Options

Environment variables in .env.local:

VITE_MAP_TILE_LAYER=https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
VITE_GEOCODING_ENDPOINT=https://nominatim.openstreetmap.org/search
VITE_MAX_REPORTS_PER_USER=50

πŸ“‚ Project Structure

src/
β”œβ”€β”€ assets/           # Static assets
β”œβ”€β”€ components/       # Reusable components
β”‚   β”œβ”€β”€ map/          # Mapping components
β”‚   β”œβ”€β”€ ui/           # shadcn/ui overrides
β”‚   └── ...           # Other components
β”œβ”€β”€ hooks/            # Custom hooks
β”‚   β”œβ”€β”€ useGeolocation.ts
β”‚   └── useLocalStorage.ts
β”œβ”€β”€ lib/              # Utilities
β”‚   β”œβ”€β”€ api/          # API clients
β”‚   └── constants.ts  # App constants
β”œβ”€β”€ pages/            # Route components
β”‚   β”œβ”€β”€ Dashboard/
β”‚   β”œβ”€β”€ MapView/
β”‚   └── ...           
β”œβ”€β”€ types/            # TypeScript types
β”œβ”€β”€ App.tsx           # Root component
└── main.tsx          # Entry point

🌐 System Architecture

Data Flow

sequenceDiagram
    User->>+Frontend: Submits report
    Frontend->>+Nominatim: Geocode address
    Nominatim-->>-Frontend: Returns coordinates
    Frontend->>LocalStorage: Save report
    Frontend->>Map: Display new marker
Loading

State Management

  • Local reports: localStorage persistence
  • Map state: URL-encoded parameters
  • UI state: React context
  • Form state: React Hook Form

πŸ–₯️ User Interface

Screen Mockups

  1. Landing Page Landing

  2. Report Submission Reporting

  3. Issue Map Map

πŸ”§ Development Guide

Common Tasks

# Run linter
yarn lint

# Fix formatting
yarn format

# Build for production
yarn build

# Preview build
yarn preview

Testing

# Run unit tests
yarn test:unit

# Run component tests
yarn test:components

# Generate coverage report
yarn test:coverage

πŸ“ˆ Roadmap

Upcoming Features

  • Municipal API integration
  • Bulk report import/export
  • SMS notifications
  • Crowdsourced verification

Known Limitations

  • LocalStorage has ~5MB limit
  • No offline support yet
  • Basic authentication only

🀝 Contributing

We welcome contributions! Please see our Contribution Guidelines for details.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request

πŸ“œ License

JanSahay is MIT licensed.

πŸ“¬ Contact

Project Maintainer: Your Name
Community Manager: Community Lead

Official Website: https://jansahay.app
Twitter: @JanSahayApp

About

By digitizing civic engagement and bridging the gap between citizens and authorities, our platform plays a key role in building resilient, inclusive, and sustainable urban environments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.1%
  • CSS 1.1%
  • Other 0.8%