A score-focused, non-partisan election education web assistant for general voters in India.
Many voters struggle to find reliable, simple, and state-aware election process information. This project provides educational guidance with source citations and transparent confidence boundaries.
- Frontend: Next.js (TypeScript)
- Backend: Node.js + Express on Cloud Run
- Data: Firestore
- AI: Gemini-backed answers via Google AI SDK with Firestore grounding
- Secrets: Secret Manager
- Election timeline education flow
- State-specific process walkthrough
- Glossary and FAQ lookup
- Guided AI assistant with safe fallback behavior
- Citation and last-verified metadata in responses
- Educational and non-partisan only
- No candidate ranking or persuasion
- No transactional voter registration workflow
- Every informational response should include source references when available
- frontend: Next.js application
- backend: API service for Cloud Run
- data/seed: normalized domain seed data
- scripts: ingestion and maintenance scripts
- tests: end-to-end validation
- docs: security, architecture, accessibility, and testing evidence
- Install dependencies: npm install
- Start backend: npm run dev:backend
- Start frontend: npm run dev:frontend
- Run quality checks: npm run lint npm run typecheck npm run test
Backend (.env in backend):
- PORT=8080
- FRONTEND_ORIGIN=http://localhost:3000
- GOOGLE_CLOUD_PROJECT=
- FIRESTORE_DATABASE=(default)
- VERTEX_LOCATION=asia-south1
- VERTEX_MODEL=gemini-1.5-pro
Frontend (.env.local in frontend):
- NEXT_PUBLIC_API_BASE_URL=http://localhost:8080
| Criterion | Planned Evidence |
|---|---|
| Code Quality | Strict TypeScript configs, modular architecture, lint + type checks |
| Security | Validation middleware, rate limiting, safe prompt guards, secrets policy |
| Efficiency | Cached static references, bounded API payloads, lightweight pages |
| Testing | Unit + integration + e2e suites in CI |
| Accessibility | Semantic HTML, keyboard support, contrast-safe styles, reduced motion |
| Google Services | Cloud Run + Firestore + Gemini response generation + Secret Manager integration |
| Problem Alignment | India-focused election education with state-specific guidance |