VoteSaathi is a premium, AI-powered civic education platform designed to empower citizens with real-time election intelligence. It bridges the gap between complex democratic processes and the modern voter using state-of-the-art AI.
An advanced LLM-driven chat interface powered by Google Gemini. It provides instant guidance on registration, voter rights, and candidate backgrounds in plain, accessible language.
A specialized AI engine that analyzes news snippets and claims. It provides a credibility verdict (Likely True, Suspicious, or Fake) and a detailed explanation to combat election misinformation.
Real-time participation analytics and participation trends using Chart.js. Visualizes voter turnout from 2004–2024 to provide context for modern democracy.
- Booth Locator: Proximity-aware search by PIN code.
- Eligibility Wizard: A multi-step validator for first-time voters.
- Candidate Explorer: Detailed breakdown of constituency-wise candidates and their visions.
- Frontend: Clean, high-performance Vanilla JS & CSS3 (Linear-inspired design system).
- Backend: Robust Node.js & Express framework with modular MVC architecture.
- AI Integration: Native Google Generative AI SDK for Gemini 1.5 Flash.
- Database: MongoDB integration for query logging and analytics.
- Input Validation: Deep input validation and sanitization via
express-validatorand custom XSS protection. - Parameter Pollution: Protection against HTTP parameter pollution via
hpp. - Rate Limiting: Tiered DDoS protection — 100 req/15min for general API, 20 req/15min for AI endpoints.
- Security Headers: Full Helmet.js suite with custom CSP, HSTS (
max-age=63072000),X-Frame-Options, andPermissions-Policy. - CORS: Strict origin whitelist with dynamic validation for production environments.
- Efficiency: PWA capabilities with Service Worker v2 (cache-first with dynamic caching + stale cleanup) and Gzip compression.
- Monitoring: Live GCP Cloud Status heartbeat monitor.
- Testing: 9 automated API tests using Jest and Supertest — covering election endpoints, AI validation, security headers, CORS, and production config protection.
- Node.js (v18+)
- MongoDB (Local or Atlas)
- Google AI (Gemini) API Key
Clone the repository
git clone https://github.com/your-username/VoteSaathi.git cd VoteSaathiInstall dependencies
npm install
Configure Environment Create a
.envfile in the root directory (see.env.example):PORT=3000GEMINI_API_KEY=your_gemini_key_hereMONGODB_URI=your_mongodb_uri_hereFIREBASE_API_KEY=your_firebase_api_keyFIREBASE_AUTH_DOMAIN=your_project.firebaseapp.comFIREBASE_PROJECT_ID=your_project_idFIREBASE_STORAGE_BUCKET=your_project.appspot.comFIREBASE_MESSAGING_SENDER_ID=your_sender_idFIREBASE_APP_ID=your_app_id
Run the Application
# Development mode (with hot-reload) npm run dev # Production mode npm start
Run Tests
npm test
Inspired by the clean, high-contrast aesthetics of Linear, Stripe, and Vercel. Focuses on visual hierarchy, accessibility, and a premium "Pro-level" civic experience.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for a more informed democracy.