Skip to main content

How ElectionGuide works

Transparency about the technology powering your civic assistant — the AI models, Google Cloud services, security architecture, and the principles that keep every answer non-partisan and source-grounded.

Open assistant

Google Cloud services

AI & Answers
Gemini (Google AI)
Streaming AI answers for the civic assistant with citation and source grounding
Deployment
Cloud Run
Serverless auto-scaling deployment for the FastAPI backend and Next.js frontend
CI / CD
Cloud Build
Continuous integration and deployment pipeline with automated testing gates
Security
Secret Manager
Secure storage for OAuth credentials, API keys, and environment secrets
Observability
Cloud Logging
Structured application and access logs for monitoring, debugging, and audit trails
Storage
Cloud Storage
Persistent volume for session data, civic reference documents, and static assets
Audit
Firestore
Audit event persistence for AI interactions and platform usage analytics
Registry
Cloud Artifact Registry
Container image registry for the backend and frontend Docker images

Technical architecture

Civic experience layer

  • Next.js 16 with React 19 and TypeScript
  • Server and client components for optimal performance
  • Framer Motion animations for interactive civic tools
  • Tailwind CSS with India tricolor design tokens
  • Fully accessible — WCAG 2.1 AA compliant

AI and grounding layer

  • Gemini 2.0 Flash Experimental with streaming
  • Google Search grounding for real-time ECI information
  • Tool-first verification before answering
  • Non-partisan system prompt enforced at model level
  • WebSocket streaming for low-latency responses

API and data layer

  • FastAPI (Python) with async SQLAlchemy and SQLite
  • Real-time WebSocket chat with session persistence
  • Google OAuth 2.0 authentication
  • 20+ civic platform API endpoints
  • Structured audit logging to Firestore

Security layer

  • Security headers: X-Frame-Options, X-Content-Type-Options, HSTS
  • Rate limiting: 45 requests / minute per IP on chat endpoints
  • Input validation with length and content checks
  • Secrets stored in Google Secret Manager — never in code
  • CORS restricted to known origins only

AI neutrality and accuracy commitment

What the AI will never do

  • Endorse or criticise any political party or candidate
  • Make predictions about election outcomes
  • Express opinions on electoral or legislative policy
  • Spread unverified claims about election processes

What every AI answer includes

  • A grounding check against ECI official sources
  • Citations to specific portals or official documents
  • A clear next step for the voter to take
  • Consistent language across all Indian languages