DEV Community

Ajit Sharma
Ajit Sharma

Posted on

VotePath:-an AI-powered election guide.

VotePath -- an AI-powered multilingual voting guide for first-time voters.

The Problem: Why Don't People Vote?
Millions of eligible voters - especially first-timers, rural citizens, and the elderly - often skip elections simply because the process feels overwhelming. From figuring out eligibility to finding the right polling booth, the friction is real.
During the PromptWars: Virtual Hackathon, I wanted to tackle this exact challenge under the "Election Process Education" vertical. The goal was simple: eliminate confusion and make democratic participation accessible to everyone.
That's how VotePath was born.

What is VotePath?
VotePath is a personalized, AI-powered journey guide designed to hold a voter's hand from the "Not Yet Registered" phase all the way to "After Voting." Instead of dumping a massive PDF of rules on the user, it breaks the electoral process down into an interactive, step-by-step roadmap.
✨ Core Features
🧭 The 5-Stage Voting Journey: An interactive tracker that guides users through specific actionable steps: Not Yet Registered → Registered Voter → Election Announced → Voting Day → After Voting.

🤖 Gemini-Powered AI Assistant: A conversational AI built with the Google Gemini API that answers specific election queries in real-time.
🎙️ Voice Input Accessibility: Integrated the Web Speech API so users can ask questions hands-free.
🌐 Multilingual on the Fly: Seamlessly translates complex election jargon into English, Hindi, Marathi, Tamil, and Bengali using Gemini's translation capabilities.
📶 Offline PWA Support: An integrated Service Worker caches core static assets and the manifesto, ensuring the guide works even in low-connectivity areas.

🛠️ The Tech Stack
To build this rapidly and robustly, I leaned on a modern stack:
Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS, Framer Motion for smooth UI transitions.
AI & Logic: Google Gemini API (generative-ai SDK) for the brains of the chat and translation.
Analytics: Firebase Firestore to track user journey drop-offs and engagement.
Deployment: Google Cloud Run,Firebase.

Building the UI components and wiring up the Gemini SDK went smoothly using an intent-driven development approach. The real boss fight started during deployment. Next.js is notoriously strict with build errors, and a missing react-confetti package initially crashed my pipeline.
Then came the Docker mismatch. Trying to force heavy local node_modules into a tiny Alpine Linux container led to massive binary conflicts. As the midnight deadline loomed, I ended up ditching the standard Dockerfile approach entirely. Instead, I injected my environment variables directly into Google Cloud Shell and utilized Google Cloud Buildpacks for a native, clean Next.js compilation.
Seeing that Service URL finally pop out of the terminal just as the sun was coming up was one of the most satisfying moments of my developer journey.

The Road Ahead
VotePath was built in a sprint, but the core architecture is highly scalable. The next steps would involve integrating live localized polling data and expanding the accessibility features for visually impaired voters.
Democracy works best when everyone understands how to participate. Technology should be the bridge, not the barrier.

Check it out:
🌐 Live Demo: https://votepath-744150666678.us-central1.run.app/
➡️Preview: https://www.loom.com/share/053b359dac554c3aace6e2cdef7da124
💻 GitHub Repo: https://github.com/ajx1tech/votepath

Top comments (0)