AI-Powered Election Education Platform
Understand • Learn • Participate
Understand Democracy. Navigate Elections. Make Informed Decisions.
A modern, offline-first civic education assistant with intelligent guidance.
CivicGuide is a high-performance, accessibility-first web application that simplifies complex election processes into structured, understandable, and interactive guidance.
It combines:
- 🧠 Intelligent AI assistance
- 🌍 Multi-country election knowledge
- ⚡ Offline-first reliability
- 🎨 Premium UI design system
flowchart LR
A[User Query] --> B{Mode}
B -->|Online| C[AI Response Engine]
B -->|Offline| D[Fallback Knowledge System]
C --> E[Formatted Answer]
D --> E
E --> F[Interactive UI + Follow-ups]
- AI-powered responses (API optional)
- Smart keyword-based fallback system
- Structured answers with follow-up prompts
Supports multiple regions with localized data:
| Region | Authority | Key Insight |
|---|---|---|
| 🇮🇳 India | ECI | 970M+ voters |
| 🇺🇸 USA | Vote.gov | Electoral College |
| 🇬🇧 UK | GOV.UK | FPTP system |
| 🌎 Global | IFES | Universal guidance |
Backed by structured region configs
1. Candidate Filing
2. Voter Registration
3. Campaign Period
4. Voter Education
5. Voting Day
6. Vote Counting
7. Certification
- Clickable steps
- Context-aware explanations
- Progress tracking UI
- Clean chat UI with message bubbles
- Markdown → HTML renderer
- Built-in sanitization (XSS protection)
- Follow-up suggestion engine
| Capability | Status |
|---|---|
| Works without internet | ✅ |
| Local fallback answers | ✅ |
| Session-based AI key | ✅ |
Defined in core app logic
- 📍 Google Maps → Polling locations
- 🔍 Search → Election info
- 📅 Calendar → Election reminders
- 🌐 Translate → Multi-language support
| Element | Description |
|---|---|
| 🎨 Color Scheme | Dark civic blue + gold accents |
| 🔤 Typography | Cormorant (serif) + Outfit (modern) |
| 📱 Layout | Responsive 3-panel system |
| ♿ Accessibility | ARIA roles + keyboard nav |
Powered by modular CSS architecture
graph TD
UI[Frontend UI] --> Logic[App Logic Engine]
Logic --> Regions[Region Data System]
Logic --> Fallback[Offline Knowledge Base]
Logic --> AI[Optional AI Integration]
Logic --> Services[Google Integrations]
civicguide/
│
├── index.html # Application shell & UI :contentReference[oaicite:5]{index=5}
├── styles.css # Design system :contentReference[oaicite:6]{index=6}
├── app.js # Core application logic :contentReference[oaicite:7]{index=7}
├── Civicguidetest.js # Testing suite :contentReference[oaicite:8]{index=8}
└── package.json # Metadata & scripts :contentReference[oaicite:9]{index=9}git clone https://github.com/your-username/civicguide.git
cd civicguide
open index.htmlNo build tools required — runs directly in browser.
- Get API key (Anthropic)
- Launch app
- Enter key in modal
✔ Stored securely in session only
node tests/civicguide.test.js- Input sanitization
- Markdown parsing
- Offline logic
- Region data integrity
- Security (XSS prevention)
- HTML escaping for all user inputs
- No persistent storage of API keys
- Controlled rendering pipeline
- Defensive UI architecture
- 📱 Progressive Web App (PWA)
- 🔊 Voice-based interaction
- 🌐 Real-time election APIs
- 📊 Data visualization dashboards
- 📍 Geo-personalized voting info
Contributions are welcome. For major changes:
- Open an issue
- Discuss proposal
- Submit PR
MIT License
CivicGuide bridges the gap between complex election systems and everyday citizens — making democracy more accessible, transparent, and understandable.