Real-Time Digital Momentum Analytics for Tamil Nadu Politics 📊✨
A sophisticated analytics dashboard that predicts the "Digital Momentum" of political parties in Tamil Nadu by analyzing sentiment from multiple data sources in real-time using Generative AI.
- 🌐 Multi-Source Intelligence: Aggregates data from Google News, YouTube Comments, and Reddit (
r/TamilNadu,r/Chennai). - 🤖 AI-Powered Analysis: Uses Google Gemini 1.5 Flash to perform:
- 📈 Sentiment Analysis: Positive/Negative scoring (-100 to +100).
- 🧠 Emotional Quotient (EQ): Identifies deep drivers like Anger, Hope, or Mockery.
- 🔍 Fact-Checking: Cross-references claims to flag potential misinformation.
- ⚖️ Bias Mitigation: Audited prompts to ensure objective analysis.
- 🎨 Modern UI: A "Deep Dark" aesthetic with Glassmorphism, Aurora gradients, and smooth micro-interactions.
- ⚡ Real-Time Caching: Persists snapshots to PostgreSQL/SQLite to prevent redundant expensive API calls.
- 🐹 Language: Go (Golang) 1.23+
- 🚀 Framework: Fiber (Fast HTTP web framework)
- 🗃️ Database: PostgreSQL (via GORM)
- 🤖 AI: Google Gemini SDK (
google-generative-ai-go) - 🔌 APIs: YouTube Data API v3, Google News RSS, Reddit JSON API
- 🔧 Framework: React (Vite)
- 🎨 Styling: Vanilla CSS (Variables, Flexbox/Grid)
- 🌌 Theme: Custom "Dark Aurora" Theme with Glassmorphism
- 📊 Visualization: Recharts (for gauges and charts)
- 🐹 Go installed (v1.21+).
- 🐢 Node.js installed (v18+).
- 🗃️ PostgreSQL database running (or adjust
database.gofor SQLite). - 🔑 API Keys:
GEMINI_API_KEY: Get from Google AI Studio.YOUTUBE_API_KEY: Get from Google Cloud Console.
-
📥 Clone the Repository
git clone https://github.com/yourusername/election-pulse.git cd election-pulse -
🔧 Backend Setup
cd backend # Create .env file cp .env.example .env # Update .env with your keys and DB URL # Install dependencies go mod download # Run the server go run cmd/main.go
Server runs on
http://localhost:8080 -
🎨 Frontend Setup
cd frontend # Install dependencies npm install # Run dev server npm run dev
App runs on
http://localhost:5173
Run the entire application (Backend + Frontend) with a single command.
- 🐳 Ensure Docker Desktop is running.
- 🚀 Run Docker Compose:
docker-compose up --build
- 🌐 Access the App:
- Frontend:
http://localhost:8080 - Backend API:
http://localhost:3000
- Frontend:
Detailed technical documentation can be found in the docs/ folder:
- 🏗️ Architecture: System design, data flow, and service breakdown.
- 📡 API Reference: Backend endpoints and payloads.
Contributions are welcome! 🎉 Please open an issue or submit a pull request.
MIT License. 📄
