Skip to content

Latest commit

Β 

History

History
115 lines (85 loc) Β· 3.86 KB

File metadata and controls

115 lines (85 loc) Β· 3.86 KB

⚑ ElectraAI: The Intelligent Election Assistant

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.


🌟 Core Features

  • πŸ€– 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.

πŸ—οΈ Architecture & Tech Stack

ElectraAI follows a modern, scalable microservices pattern:

Frontend

  • Framework: React 18 (Vite)
  • Styling: Tailwind CSS (Custom glassmorphism design system)
  • Animations: Framer Motion
  • Icons: Lucide React
  • State: React Hooks & Context API

Microservices Hub

  • 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 Breakdown

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

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/DevalGarg129/ElectraAI.git
    cd ElectraAI
  2. 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.)

  3. Environment Setup: Create a .env file in backend/ and microservices/assistant-service/ with:

    PORT=5000
    MONGO_URI=your_mongodb_uri
    GEMINI_API_KEY=your_gemini_api_key
    JWT_SECRET=your_secret_key

πŸ› οΈ Usage

The Orchestrator Strategy

ElectraAI uses a custom Orchestrator to handle service concurrency.

  1. Start the Microservices Ecosystem:

    node orchestrator.js

    This initializes the Auth, Assistant, and Analytics services simultaneously.

  2. Start the API Gateway:

    cd backend && npm start
  3. Launch the Experience:

    cd frontend && npm run dev

πŸ“„ License

This project is licensed under the ISC License.


Built with ❀️ to empower every voter through technology.