<<<<<<< HEAD
=======
A full-stack, creator-focused analytics platform that analyzes YouTube video comments to understand audience sentiment, engagement quality, and behavioral trends.
Built with a modern React + Tailwind SaaS UI and a Python Flask analytics backend, this project goes beyond basic sentiment analysis by adding spam detection, audience mood scoring, sentiment timelines, and creator insights β all powered by VADER (NLTK) and real YouTube data.
- Submit any public YouTube video link
- Fetch comments using YouTube Data API v3
- Cache comments in MongoDB for reuse and performance
- Classifies comments as Positive / Neutral / Negative
- Uses compound sentiment scores for weighted analysis
- Fully explainable logic (no black-box ML models)
- Detects:
- Duplicate comments
- Emoji spam
- Link-based spam
- Spam comments are excluded from analytics
- Audience Mood Score (weighted by likes)
- Top Positive Comments (what viewers loved)
- Comments Needing Attention (negative / critical feedback)
- Spam Percentage per video
- Tracks sentiment day-by-day
- Detects sentiment shifts and spikes
- Useful for identifying reactions to viral moments
- Sentiment distribution:
- Bar Chart
- Pie Chart
- Clean, professional dashboards
- Channel name, description, subscribers
- Video views, likes, and comment count
- Dark, premium SaaS-style interface
- Animated gradients & glassmorphism
- Creator dashboards:
- Home
- Analyze
- Insights
- Sentiment Timeline
- Fully responsive (desktop & mobile)
- React.js
- Tailwind CSS
- Vite
- React Router
- Python 3.10+
- Flask + Flask-CORS
- NLTK (VADER SentimentIntensityAnalyzer)
- Google YouTube Data API v3
- MongoDB (PyMongo)
- Pandas & NumPy
- Plotly (chart generation)
- Node.js v18+
- Python 3.10+
- MongoDB (local or Atlas)
- Google Developer Account
- YouTube Data API key
git clone https://github.com/Manu839/Youtube-sentiment-analysis.git
cd yt-sentiment-analysiscd backend
python -m venv env
source env/bin/activate # Or: env\Scripts\activate on Windows
pip install -r requirements.txt- DEVELOPER_KEY=YOUR_YOUTUBE_API_KEY_HERE
- MONGO_URI=mongodb://localhost:27017 # Or your MongoDB Atlas URI
- MONGO_DB=yt_sentiment
python app.py- Server will run at: http://localhost:5000
cd frontend
npm install
npm run devFrontend runs at: http://localhost:5173
-
403 commentsDisabled β Video has comments disabled
-
500 errors β Check API key & quota limits
-
Insights not showing β Analyze a video first
-
CORS issues β Ensure Flask-CORS is enabled
-
MongoDB errors β Confirm MongoDB is running
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.