Building VoteWise India: An AI-Powered Election Process Education Simulator

Published: (April 30, 2026 at 07:01 PM EDT)
5 min read
Source: Dev.to

Source: Dev.to

Building VoteWise India for PromptWars / Build with AI 2026

For PromptWars / Build with AI 2026, I built VoteWise India, a non‑partisan election‑process education app for students and first‑time voters. The goal was to make election learning feel interactive instead of turning it into a long page of civic‑studies notes.


The Problem

Many young learners understand elections mainly as the moment of voting. But an election is a full process:

  1. Eligibility
  2. Registration / electoral rolls
  3. Candidate nomination
  4. Campaigning
  5. Polling day (EVM/VVPAT)
  6. Counting
  7. Results

If students only learn the final step, the rest can feel confusing or intimidating.

VoteWise India tries to make that process easier to understand through guided interaction.

I later reorganized the prototype from one long page into lightweight app‑style views: Home, Learn, Simulator, AI Guide, Glossary, Quiz, Teacher Mode, Settings. It still uses a single HTML entry point and no framework, but hash routes make navigation feel smoother.

For judging, I added:

  • a 90‑second tour on the Home view,
  • a safe Google Services Status card, and
  • a PromptWars Evaluation card that maps the project directly to code quality, security, efficiency, testing, accessibility, and Google services.

The Idea

The app teaches by doing:

  • Journey map – explains each election stage.
  • Before/During/After timeline – gives learners a quick mental model.
  • Personalized pathway – adapts learning for different users.
  • Scenario cards – let learners pick a route based on their situation.
  • Searchable glossary & term tooltips – define hard words (e.g., Electoral Roll, VVPAT, NOTA, EVM, Constituency, Model Code of Conduct).
  • FAQ – answers common first‑time‑voter questions.
  • Misinformation‑check mini‑game – practice spotting false claims.
  • Mock EVM/VVPAT simulator – experience a fictional vote flow.
  • Gemini AI Election Guide – answers process questions.
  • Myth‑vs‑Fact cards – correct common misunderstandings.
  • VoteReady certificate quiz – provides a score, highlights weak topics, gives explanations, and suggests next steps.
  • Teacher Mode – 5‑minute activity, discussion questions, key terms, quick‑quiz idea, and answer key.
  • Accessibility settings – bigger text, high contrast, simple English, reduce motion, reading focus, theme shortcut, and reset controls.
  • Optional Firestore support – stores anonymous quiz outcomes when deployed with Google Cloud.

The design goal was a polished civic‑tech feel: clean, modern, serious, and approachable.


AI and Prompt Strategy

The AI guide uses Gemini only for election‑process education. The browser never sees the API key; questions go to a Node server route where they are validated before Gemini is called.

The Gemini instruction is intentionally narrow:

  1. Explain the Indian election process.
  2. Stay factual and beginner‑friendly.
  3. Do not recommend, rank, support, or oppose political parties or candidates.
  4. Do not use real party or candidate names.
  5. Refuse political‑persuasion requests and redirect to process education.

This makes the AI feature part of the learning system instead of a generic chatbot.


Safety Guardrails

  • Non‑partisan – no real parties or candidates appear in simulations (only Candidate A, Candidate B, Candidate C, and NOTA).
  • AI request filtering – political‑recommendation questions are blocked before reaching Gemini. The app politely refuses and offers to explain how voting works or how to evaluate information safely.
  • Clear disclaimer – “Educational, non‑partisan, and not an official Election Commission website.”

Accessibility

Accessibility is built into the product, not tacked on as a footer claim. Features include:

  • Keyboard‑friendly controls
  • Visible focus states
  • Semantic headings
  • Skip link
  • Screen‑reader‑friendly status messages
  • Bigger‑text mode
  • High‑contrast mode
  • Simple‑English mode
  • Reduce‑motion mode
  • Dark and light themes

These help make civic learning usable for a broader audience.


Testing

Focused tests target the areas most likely to matter in a hackathon demo:

  • Quiz scoring
  • VoteReady label ranges
  • Weak‑topic detection
  • Glossary search
  • Misinformation answer checking
  • VoteReady certificate defaults
  • Hash‑route resolution for app‑style views
  • Political‑recommendation blocking
  • VVPAT slip rendering after a simulated vote

Tests use Node’s built‑in test runner, keeping the project lightweight and easy to run.


Google Services

  • Gemini – powers the AI Election Guide; the API key stays on the server via environment variables.
  • Deployment options – the README explains how to configure Gemini securely for Google Cloud Run or Firebase Hosting.
  • Firebase Hosting – serves the static frontend and rewrites /api/** requests to Cloud Run.
  • Cloud Run – runs the Node backend.
  • Secret Manager – provides GEMINI_API_KEY in production.
  • Firestore (optional) – stores anonymous quiz‑result metadata if enabled.

No claim is made that the app is already live; the instructions are deployment‑ready.


What I Learned

The biggest lesson was that civic‑education apps need both clarity and restraint. It’s easy to add more facts, cards, and UI elements; it’s harder to keep the experience calm enough for a first‑time voter to understand what to do next.

I also learned that AI safety isn’t just about a single prompt. The app needs layered protection: UI messaging, local validation, server‑side blocking, model instructions, and clear disclaimers.


Future Improvements

Future versions could add:

  • Multi‑language support
  • More classroom activities
  • Teacher dashboard mode
  • Offline‑first content
  • A Fireba… (truncated in original; intended continuation could be “Firebase‑backed analytics” or similar)

VoteWise India

  • se database for anonymous quiz analytics.
  • Voice narration for accessibility.
  • More detailed process modules with citations to official election education material.

VoteWise India is a small build, but the mission is important: help people understand the election process without pushing them toward any political choice.

Live app: https://votewise-india-api-366445017721.us-central1.run.app

GitHub: https://github.com/AdvikSharma917/votewise-india

0 views
Back to Blog

Related posts

Read more »

The smarter the model, the more it saves.

The Myth: Smarter Models Will Make Plugins Redundant Since WOZCODE launched, many Claude Code power users have whispered that the plugin’s advantage will disap...