Civixity is a modern, AI-powered civic engagement platform for cities and communities. It empowers citizens to report issues, participate in governance, join volunteer activities, and earn rewards—all in a beautiful, gamified web experience.
-
AI-Powered Civic Assistant
Get instant help and information with an AI chatbot that answers questions, guides users, and summarizes city activity. -
Smart Issue Reporting & Detection
Report civic issues with photos and location. Advanced AI detects image authenticity and categorizes issues for faster resolution. -
Real-Time City Heatmaps & Analytics
Visualize civic issues, trends, and department performance with interactive heatmaps and analytics dashboards. -
Community DAO & Polls
Participate in city governance through community polls and DAO voting. Help prioritize projects and funding democratically. -
Volunteer Activities & Events
Discover, join, and track local volunteer events. Earn points and badges for making a difference in your community. -
Rewards, Badges & Points Economy
Earn CIVI points for engagement, unlock badges, and redeem rewards for real-world benefits and recognition. -
City Resources & Documents
Access important city documents, emergency contacts, and public resources in one place.
civi/
backend/ # Node.js/Express backend (API, AI, Supabase integration)
config/ # Supabase and Gemini AI config
routes/ # API endpoints (chatbot, image detection)
uploads/ # Uploaded images for AI detection
trial.py # Python script for deepfake image detection
package.json # Backend dependencies
README.md # Backend-specific documentation
src/ # React frontend (Vite, TypeScript, shadcn-ui, Tailwind)
components/ # UI components (ChatBot, Navbar, Sidebar, etc.)
ui/ # shadcn/ui-based reusable components
contexts/ # React context providers (e.g., PointsContext)
hooks/ # Custom React hooks
lib/ # Supabase client, utility functions
pages/ # Main user-facing pages (Home, Polls, Heatmaps, etc.)
index.css # Global styles
App.tsx # Main app entry
public/ # Static assets (logo, images, favicon)
database-schema.sql # Supabase SQL schema for points, redemptions, donations, etc.
README.md # Main project documentation
- Frontend: React, Vite, TypeScript, shadcn-ui, Tailwind CSS, React Router, Recharts, Google Maps API
- Backend: Node.js, Express, Supabase, Gemini AI, Python (image deepfake detection)
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth (email, Google)
- APIs: RESTful endpoints for chatbot, posts, analytics, image detection
- Node.js (v18+ recommended)
- npm
- Supabase account (for database and auth)
- Google API key (for Maps/Heatmaps)
- Gemini AI API key (for chatbot)
git clone <YOUR_GIT_URL>
cd civinpm install
cd backend
npm installCreate a .env file in the root and in /backend:
VITE_SUPABASE_URL=your-supabase-url
VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
VITE_GOOGLE_MAPS_API_KEY=your-google-maps-api-key
VITE_BACKEND_URL=http://localhost:4000
SUPABASE_URL=your-supabase-url
SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
GEMINI_API_KEY=your-gemini-api-key
PORT=4000
FRONTEND_URL=http://localhost:5173
- Run the SQL in
database-schema.sqlin your Supabase SQL editor to create all required tables and policies.
Frontend:
npm run devBackend:
cd backend
npm run dev- ChatBot: AI-powered assistant for civic queries and help (
src/components/ChatBot.tsx) - Home: Report issues, see recent activity, and interact with the community (
src/pages/HomePage.tsx) - Polls: Participate in DAO-style voting and city governance (
src/pages/Polls.tsx) - Heatmaps: Visualize city issues and analytics (
src/pages/Heatmaps.tsx) - Volunteer Activities: Join and track local events (
src/pages/VolunteerActivities.tsx) - Redeem Points: Exchange points for rewards or donate to NGOs (
src/pages/RedeemPoints.tsx) - Badges: Track achievements and gamification progress (
src/pages/Badges.tsx) - Documents: Access city resources and important documents (
src/pages/Documents.tsx) - Reusable UI: 40+ shadcn/ui-based components in
src/components/ui/ - Context & Hooks: Points management, toast notifications, mobile detection, etc.
npm run dev– Start frontend in development modenpm run build– Build frontend for productionnpm run preview– Preview production buildcd backend && npm run dev– Start backend in development mode
POST /api/chatbot/chat– AI chatbotPOST /api/detect-image– AI image authenticity detectionGET /api/chatbot/posts/location/:location– Posts by locationGET /api/chatbot/posts/category/:category– Posts by categoryGET /api/chatbot/posts/summary– Recent posts summary
- Deploy frontend (Vite) to Vercel, Netlify, or your preferred host.
- Deploy backend (Node.js) to Render, Railway, or your preferred host.
- Set environment variables in your deployment platform.