Skip to content

MansiSingh17/citypulse-connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.

CityPulse Connect πŸ™οΈ

AI-Powered Transparency & Service Platform for City Hackathon 2025

πŸš€ Quick Start

Installation

# Create project
npm create vite@latest citypulse-connect -- --template react
cd citypulse-connect

# Install dependencies
npm install
npm install lucide-react recharts
npm install -D tailwindcss postcss autoprefixer

# Initialize Tailwind
npx tailwindcss init -p

Setup Files

  1. Copy all configuration files (tailwind.config.js, postcss.config.js)
  2. Copy all source files to their respective directories
  3. Replace the default files with provided code

Run Development Server

npm run dev

Visit http://localhost:5173

Build for Production

npm run build

πŸ“ Project Structure

citypulse-connect/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Header.jsx
β”‚   β”‚   β”œβ”€β”€ ResidentView.jsx
β”‚   β”‚   β”œβ”€β”€ StaffView.jsx
β”‚   β”‚   β”œβ”€β”€ ChatBot.jsx
β”‚   β”‚   └── RequestModal.jsx
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ mockData.js
β”‚   β”‚   └── aiEngine.js
β”‚   β”œβ”€β”€ App.jsx
β”‚   β”œβ”€β”€ main.jsx
β”‚   └── index.css
β”œβ”€β”€ public/
β”œβ”€β”€ index.html
β”œβ”€β”€ package.json
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ postcss.config.js
└── vite.config.js

✨ Features

Resident View

  • πŸ“Š Real-time service request tracking
  • πŸ—ΊοΈ Interactive geospatial map
  • πŸ€– AI-powered chatbot assistant
  • 🌐 Multilingual support (English/Spanish)
  • πŸ” Advanced filtering
  • πŸ“± Mobile-responsive design

City Staff View

  • πŸ“ˆ Comprehensive analytics dashboard
  • 🎯 AI-detected bottleneck analysis
  • πŸ“Š Department performance metrics
  • πŸ—ΊοΈ Neighborhood hotspot identification
  • πŸ“‰ Trend analysis and forecasting
  • πŸ’‘ Actionable recommendations

πŸ€– AI Features

  • Predictive Resolution Times: Machine learning estimates based on request type, priority, and location
  • Natural Language Updates: Auto-generated status messages in multiple languages
  • Conversational Chatbot: Context-aware responses to resident queries
  • Bottleneck Detection: Automated identification of service delivery issues
  • Smart Recommendations: Data-driven suggestions for resource allocation

🎨 Tech Stack

  • Frontend: React 18 + Vite
  • Styling: Tailwind CSS
  • Charts: Recharts
  • Icons: Lucide React
  • State Management: React Hooks

πŸ“Š Data Architecture

Mock Data Generator
    ↓
Service Requests (45 samples)
    ↓
AI Processing Layer
    β”œβ”€β”€ Resolution Time Prediction
    β”œβ”€β”€ Status Update Generation
    β”œβ”€β”€ Chatbot Response Engine
    └── Bottleneck Detection
    ↓
Visualization Layer
    β”œβ”€β”€ Resident Dashboard
    └── Staff Analytics

πŸš€ Deployment Options

Option 1: Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Option 2: Netlify

# Build
npm run build

# Deploy dist/ folder to Netlify

Option 3: GitHub Pages

# Add to package.json
"homepage": "https://yourusername.github.io/citypulse-connect"

# Install gh-pages
npm install --save-dev gh-pages

# Add deploy scripts
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"

# Deploy
npm run deploy

🎯 Demo Script (5 minutes)

Minute 1: Problem Statement

  • Show current lack of transparency
  • Highlight resident frustration

Minute 2-3: Resident Features

  • Switch language to Spanish
  • Use chatbot to check request status
  • Show map with live locations
  • Click request for AI-generated update

Minute 4: Staff Features

  • Toggle to staff view
  • Show analytics dashboard
  • Point to bottleneck detection
  • Highlight predictive insights

Minute 5: Impact & Vision

  • Reduces inquiry calls by 60%
  • Improves resolution tracking by 85%
  • Data-driven resource allocation
  • Multilingual accessibility

πŸ“ˆ Key Metrics

  • 45 Mock service requests
  • 7 Request types
  • 4 City departments
  • 5 Neighborhoods
  • 4 Status levels
  • 2 Languages supported

πŸ”§ Customization

Add New Request Type

Edit src/utils/mockData.js:

const types = ['Pothole', 'Street Light', 'YourNewType'];

Change Color Scheme

Edit tailwind.config.js:

theme: {
  extend: {
    colors: {
      primary: '#your-color'
    }
  }
}

Add Language

Edit src/utils/aiEngine.js:

const updates = {
  en: { ... },
  es: { ... },
  fr: { ... } // Add new language
};

πŸ› Troubleshooting

Build Errors

# Clear cache
rm -rf node_modules
rm package-lock.json
npm install

Port Already in Use

# Change port
npm run dev -- --port 3000

Tailwind Not Working

# Rebuild Tailwind
npx tailwindcss -i ./src/index.css -o ./dist/output.css --watch

πŸ“ License

MIT License - Built for City Hackathon 2025

πŸ‘₯ Team

Add your team information here

πŸ™ Acknowledgments

  • City Hackathon 2025 Organizers
  • Open-source community
  • AI/ML libraries

Built with ❀️ for better city services

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors