ElectraAI is a production-grade, AI-powered platform designed to guide users through the complexities of the election process. Leveraging a decoupled Microservices Architecture, Supervised Machine Learning, and the latest Gemini 1.5 Flash API, Electra provides a premium, glassmorphic experience that makes voting accessible, secure, and intuitive.
- 🤖 Hybrid AI Intelligence: Powered by Gemini 1.5 Flash with a local ML Knowledge Hub for resilient, offline-capable assistance.
- 📊 Supervised ML Analytics: Real-time intent classification (Registration, Candidates, Policies, etc.) using a custom Bayes Classifier and sentiment analysis.
- ⏲️ Live Election Countdown: Dynamic real-time timer for upcoming election cycles integrated directly into the dashboard.
- 📈 Voter Readiness Meter: A sophisticated visual gauge that tracks user preparedness based on ML-driven insights.
- 🗺️ Dynamic Roadmap: An interactive 5-step journey (Registration to Voting) that automatically updates as you interact with the AI.
- 🔐 Secure Micro-Auth: Dedicated identity service for robust user management and data security.
- 🎭 State-of-the-Art UI: A stunning, modern interface built with React 18, featuring advanced glassmorphism, mesh gradients, and micro-animations.
ElectraAI follows a modern, scalable microservices pattern:
- Framework: React 18 (Vite)
- Styling: Tailwind CSS (Custom glassmorphism design system)
- Animations: Framer Motion
- Icons: Lucide React
- State: React Hooks & Context API
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB (Mongoose ODM)
- AI Engine: Google Gemini 1.5 Flash
- NLP/ML: Natural (Bayes Classifier) & Sentiment.js
- Communication: RESTful Micro-APIs with Axios
| Service | Port | Responsibility |
|---|---|---|
| Orchestrator | N/A | Manages lifecycle of all microservices |
| Auth Service | 5001 | Identity, JWT handling, and user profiles |
| Assistant Service | 5002 | AI Logic, Gemini integration, and ML Fallbacks |
| Analytics Service | 5003 | Intent classification, Sentiment analysis, Readiness scoring |
| Backend | 5000 | Primary API gateway and data persistence |
| Frontend | 5173 | High-end React application |
- Node.js (v18+ recommended)
- MongoDB (Local or Atlas)
- Gemini API Key
-
Clone the repository:
git clone https://github.com/DevalGarg129/ElectraAI.git cd ElectraAI -
Run the One-Step Setup:
# Install all dependencies for root, backend, frontend, and all services npm run install-all(Or install manually in each directory: backend, frontend, microservices/auth-service, etc.)
-
Environment Setup: Create a
.envfile inbackend/andmicroservices/assistant-service/with:PORT=5000 MONGO_URI=your_mongodb_uri GEMINI_API_KEY=your_gemini_api_key JWT_SECRET=your_secret_key
ElectraAI uses a custom Orchestrator to handle service concurrency.
-
Start the Microservices Ecosystem:
node orchestrator.js
This initializes the Auth, Assistant, and Analytics services simultaneously.
-
Start the API Gateway:
cd backend && npm start
-
Launch the Experience:
cd frontend && npm run dev
This project is licensed under the ISC License.
Built with ❤️ to empower every voter through technology.