India has 96 crore+ registered voters โ but existing election tools fail most of them.
| Who gets left behind | Why |
|---|---|
| ๐ด Senior citizens (60+) | No smartphone, Hindi needed, large text required |
| ๐ง First-time voters (18-21) | Lowest turnout nationally โ feel embarrassed to ask |
| โฟ 8.6 crore PwD voters | Saksham app barely anyone knows exists |
| ๐ Non-Hindi/English speakers | ECI website mostly in two languages |
| ๐ต Rural voters | 45% of India has limited internet |
Most election apps assume everyone is the same type of voter. India's voters are NOT.
Matdata Mitra (Voter's Friend) โ one app, two complete experiences:
For first-time voters aged 18-35 with smartphones.
- ๐ฌ AI Chat โ Ask anything about elections in your language (Google Gemini)
- ๐ง Gamified Quiz โ 8 questions, XP points, badge unlocks
- ๐ Polling Booth Finder โ GPS-based using free OpenStreetMap
- โ EVM Fact Checker โ Bust myths with verified ECI data
- ๐ Election Timeline โ 8 step-by-step voting guide
- ๐ณ๏ธ Impact Calculator โ See how close elections have been in your constituency
- ๐ Share Card โ Generate your "I'm Voting!" card
For senior citizens, differently-abled voters, and first-time computer users.
- ๐ Voice Navigation โ Full TTS reads every section aloud
- ๐ค Voice Input โ Ask questions by speaking (no typing needed)
- ๐ Hindi First โ All content in Hindi with English below
- ๐ผ๏ธ Giant Buttons โ Minimum 72px height, impossible to miss
- ๐จ๏ธ Printable Voter Guide โ Personalised guide for election day
- ๐ Emergency Helpline โ One-tap 1950 button always visible
- ๐๏ธ CSC Locator โ Find nearest Common Service Centre
โ Existing problem โ
Our solution
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Voter Helpline 1950 โ AI chat (no wait time)
has long wait times
ECI website confusing UI โ Simple step-by-step guide
in user's language
EVMs "rigged" WhatsApp โ Gemini-powered fact checker
misinformation with ECI verified data
Elderly can't find booth โ GPS + pincode booth finder
+ printable guide
No internet on election day โ Printable voter kit
with all details
PwD voters don't know โ Dedicated elder mode
their rights + postal ballot info
22 official languages โ Google Translate widget
underserved + 10 Indian languages
| Service | Usage |
|---|---|
| Google Gemini 2.0 Flash | AI chat, fact checking, quiz generation |
| Firebase Authentication | Google Sign-In |
| Firebase Firestore | User progress, chat history, XP sync |
| Firebase Analytics | Track learning behavior |
| Google Translate Widget | 10 Indian languages |
| Google Cloud Run | Deployment and hosting |
| Web Speech API | Voice input + Text-to-Speech (browser built-in) |
| Service | Usage |
|---|---|
| Leaflet.js | Interactive map display |
| OpenStreetMap | Free map tiles |
| Nominatim | Pincode โ GPS coordinates |
| Overpass API | Find nearby govt buildings |
| OSRM | Route directions |
- Node.js + Express โ Secure API proxy
- Helmet โ Security headers
- express-rate-limit โ Abuse prevention
- dotenv โ Environment variable management
BEFORE (insecure):
Browser โโโโโโโโโโโโโโโโโโโโโโโโโโโบ Gemini API
(API key visible in DevTools)
AFTER (secure):
Browser โโโบ server.js โโโบ Gemini API
(API key (key never
server-only) reaches browser)
- โ Zero API keys in client-side code
- โ All secrets in environment variables
- โ Server-side input sanitization (second layer)
- โ
Rate limiting on all
/api/*endpoints - โ Helmet security headers
- โ
.envblocked by.gitignore
matdata-mitra/
โโโ server.js โ Express server (security backbone)
โโโ package.json
โโโ Dockerfile โ Google Cloud Run deployment
โโโ .env โ secrets (never committed)
โโโ .env.example โ template for setup
โโโ .gitignore
โ
โโโ index.html โ Landing page (persona selector)
โโโ young-voter.html โ First-time voter experience
โโโ elder-voter.html โ Elder + accessible experience
โ
โโโ css/
โ โโโ main.css โ Shared foundation styles
โ โโโ young.css โ Modern gamified theme
โ โโโ elder.css โ Large text, high contrast theme
โ
โโโ js/
โโโ app.js โ Core logic, quiz, TTS, voice
โโโ gemini.js โ AI client (calls /api/*)
โโโ firebase.js โ Auth + Firestore + Analytics
โโโ maps.js โ Leaflet + free map services
- Node.js 18+
- Google AI Studio account (free Gemini API key)
- Firebase project (free Spark plan)
git clone https://github.com/yourusername/matdata-mitra.git
cd matdata-mitranpm installcp .env.example .envEdit .env with your real values:
GEMINI_API_KEY=your_gemini_key_from_aistudio
FIREBASE_API_KEY=your_firebase_api_key
FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_STORAGE_BUCKET=your_project.appspot.com
FIREBASE_MESSAGING_SENDER_ID=your_sender_id
FIREBASE_APP_ID=your_app_id
FIREBASE_MEASUREMENT_ID=G-your_measurement_id
PORT=8080
NODE_ENV=developmentGemini API Key (Free): โ aistudio.google.com โ Get API Key โ Create API Key
Firebase Config: โ console.firebase.google.com โ Add project โ Authentication โ Enable Google Sign-In โ Firestore โ Create database (test mode) โ Project Settings โ Your Apps โ Web App โ Copy config
npm run devOpen http://localhost:8080 ๐
# Health check
curl http://localhost:8080/api/health
# Should return:
# {"status":"healthy","gemini":true,"firebase":true,...}# Build and push Docker image
gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/matdata-mitra
# Deploy to Cloud Run
gcloud run deploy matdata-mitra \
--image gcr.io/YOUR_PROJECT_ID/matdata-mitra \
--platform managed \
--region asia-south1 \
--allow-unauthenticated \
--set-env-vars GEMINI_API_KEY=your_key,\
FIREBASE_PROJECT_ID=your_project,\
NODE_ENV=production| Feature | Implementation |
|---|---|
| Skip navigation link | Keyboard users jump to main content |
| ARIA labels | Every interactive element labelled |
| High contrast mode | WCAG AAA compliant |
| Large font mode | 100% โ 160% adjustable |
| Screen reader support | All sections have role + aria-labelledby |
| Keyboard navigation | Full tab order, focus-visible rings |
| Reduced motion | Respects OS prefers-reduced-motion |
| Voice navigation | Full TTS for elder mode |
| Voice input | Speech recognition for all inputs |
| Print styles | Voter guide printable without internet |
| Minimum touch targets | 48ร48px (elder buttons: 72px+) |
เคนเคฟเคเคฆเฅ ยท English ยท เฆฌเฆพเฆเฆฒเฆพ ยท เฐคเฑเฐฒเฑเฐเฑ ยท เคฎเคฐเคพเค เฅ ยท เฎคเฎฎเฎฟเฎดเฏ ยท เชเซเชเชฐเชพเชคเซ ยท เฒเฒจเณเฒจเฒก ยท เจชเฉฐเจเจพเจฌเฉ ยท เดฎเดฒเดฏเดพเดณเด
| Criteria | Implementation |
|---|---|
| Code Quality | Modular JS, JSDoc, 'use strict', consistent naming |
| Security | Server-side keys, Helmet, rate limiting, input sanitization, XSS prevention |
| Efficiency | Lazy loading, debounced handlers, capped history, free APIs |
| Testing | Pure functions, error boundaries, graceful degradation |
| Accessibility | ARIA, skip links, voice, contrast, large text, print, reduced motion |
| Google Services | Gemini + Firebase Auth + Firestore + Analytics + Translate + Cloud Run |
๐ Voter Helpline: 1950 (Toll-free, 24/7)
๐ ECI Website: eci.gov.in
๐ณ๏ธ Voter Registration: voters.eci.gov.in
๐ Booth Search: electoralsearch.eci.gov.in
โฟ PwD Assistance: saksham.eci.gov.in
๐ธ Report Violations: cVIGIL App
๐๏ธ CSC Locator: locator.csccloud.in
MIT ยฉ 2025 Matdata Mitra
This is an educational tool built for a hackathon challenge. For official election information, always visit eci.gov.in or call the Voter Helpline at 1950.