Overview
SENTi-radar uses a collection of React components built with TypeScript, Framer Motion, and Recharts to deliver real-time sentiment analysis visualizations. All components are designed for responsiveness, accessibility, and live data updates.Core Components
TopicDetail
The main analytics panel that displays comprehensive sentiment analysis for a selected topic. Integrates all visualization components and orchestrates real-time data fetching from multiple sources. Key Features:- Multi-source data aggregation (X/Twitter, Reddit, YouTube, Google News)
- Live emotion analysis with keyword-based scoring
- AI-powered summary generation (Gemini, Groq, or local fallback)
- Real-time sentiment tracking
- Crisis level detection
SentimentGauge
An animated gauge visualization showing overall sentiment polarity from -100 (negative) to +100 (positive). Key Features:- Spring-animated needle with smooth transitions
- Color-coded sentiment zones (negative, neutral, positive)
- Responsive SVG-based design
- Real-time score updates
EmotionBreakdown
Displays percentage distribution across six emotion categories with animated horizontal bars. Key Features:- Six-emotion model: joy, anger, sadness, fear, surprise, disgust
- Staggered animation on load
- Percentage-based visualization
- Color-coded emotion categories
SentimentChart
Time-series area chart showing positive, negative, and neutral sentiment trends over configurable time ranges. Key Features:- Multi-range support (6H, 12H, 24H, 3D, 7D)
- Live data integration via WebSocket hooks
- Interactive tooltips with volume metrics
- Theme-aware styling
Component Architecture
Data Flow
Data Fetching
TopicDetail orchestrates parallel API calls to:
- YouTube Data API v3 (video comments)
- Google News RSS (headlines)
- Scrape.do (X/Twitter and Reddit posts)
Styling System
All components use Tailwind CSS with custom color tokens:Animation Patterns
Framer Motion
Components use consistent animation patterns:Environment Variables
Security Warning: All
VITE_ prefixed variables are embedded in the client bundle. For production, move API tokens to server-side functions.Usage Example
Next Steps
TopicDetail
Master analytics panel with live data orchestration
SentimentGauge
Animated sentiment polarity gauge
SentimentChart
Time-series sentiment trend visualization
EmotionBreakdown
Six-emotion distribution visualization