Skip to content

Abuudiii/CivicPulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CivicPulse - Sustainable Cities Platform

Hack the Change 2025 Submission

A civic engagement platform that gamifies sustainable transportation and community participation to help make cities more inclusive, safe, resilient, and sustainable.

Quick Start (5 Minutes)

IMPORTANT: You need an OpenAI API key. Get one at https://platform.openai.com/api-keys

# 1. Clone repo
git clone https://github.com/Abuudiii/hack-the-change-2025.git
cd hack-the-change-2025

# 2. Backend Setup
cd backend
npm install

# Create .env with YOUR credentials
cat > .env << 'ENVEOF'
DATABASE_URL="postgresql://user:password@localhost:5432/civicpulse"
OPENAI_API_KEY="sk-proj-YOUR-KEY-HERE"
JWT_SECRET="your-secret-key"
PORT=3000
ENVEOF

npx prisma generate && npx prisma db push && npm run seed
npm run dev &

# 3. Frontend Setup (new terminal)
cd ../frontend
npm install
echo 'VITE_API_URL=http://localhost:3000/api' > .env
npm run dev

Access: http://localhost:5173

Demo Credentials

Key Features

Citizens

  • Weekly goals tracking (biking, walking, transit, carpool, issue reporting)
  • Real-time progress with circular trackers
  • 30-day activity history graphs
  • 17 rewards to claim (gift cards, tax credits, transit passes)
  • Points-based gamification
  • Interactive issue reporting with maps

Admins

  • AI-powered cluster analysis (OpenAI GPT-4o-mini)
  • Auto-generate challenges from issue data
  • Real-time dashboard with heatmaps

Tech Stack

Backend: Node.js, Fastify, PostgreSQL, Prisma, OpenAI Frontend: React 18, TypeScript, Material-UI v7, Recharts, Leaflet

Seeded Demo Data

  • 20 users, 17 rewards, 5 partners
  • 25 civic issues, 5 challenges
  • Realistic activity history

Troubleshooting

  • Backend fails: Check PostgreSQL running + valid OpenAI API key in .env
  • Frontend 404s: Verify backend on port 3000
  • AI errors: Confirm valid OpenAI key, using gpt-4o-mini model

See SETUP.md for full docs.

Team: CivicPulse | Event: Hack the Change 2025

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages