A full-stack social media analytics dashboard with AI-powered insights, sentiment analysis, and engagement predictions.
- 🔐 JWT Authentication
- 📊 Real-time Analytics Dashboard
- 🤖 AI-Powered Insights
- 📈 Engagement Predictions
- 💬 Sentiment Analysis
- 😊 Emotion Detection
- #️⃣ Hashtag Intelligence
- 📁 CSV/JSON Data Import
- 🎨 Modern Dark UI
- React 18 + TypeScript
- Vite
- Tailwind CSS
- Recharts
- Framer Motion
- Axios
- Node.js + Express
- MongoDB + Mongoose
- JWT Authentication
- Multer (File Upload)
- CSV Parser
- Sentiment Analysis
- Node.js 18+
- MongoDB (running on localhost:27017)
- Clone the repository
git clone <repo-url>
cd social-glow-stats-main- Install Frontend Dependencies
npm install- Install Backend Dependencies
cd server
npm install
cd ..- Configure Environment Variables
Backend (server/.env):
PORT=5000
MONGODB_URI=mongodb://127.0.0.1:27017/socialAnalyticsDB
JWT_SECRET=your-super-secret-jwt-key-change-in-production
NODE_ENV=development
Frontend (.env):
VITE_API_URL=http://localhost:5000/api
Note: Copy .env.example to .env and server/.env.example to server/.env for a quick start.
-
Start MongoDB Make sure MongoDB is running on
mongodb://127.0.0.1:27017 -
Start Backend Server
cd server
npm run dev- Start Frontend (in a new terminal)
npm run dev- Open Browser
Navigate to
http://localhost:3000
This project is configured for deployment on Render (backend) and Vercel (frontend).
See DEPLOYMENT.md for detailed deployment instructions.
Backend (Render):
- Set
MONGODB_URI,JWT_SECRET,NODE_ENV=production,FRONTEND_URL - DO NOT set
PORT(Render auto-assigns) - Start command:
node server.js
Frontend (Vercel):
- Set
VITE_API_URLto your Render backend URL (e.g.,https://your-backend.onrender.com/api) - Build command:
npm run build - Output directory:
dist
- Register a new account
- Create a dashboard
- Upload a CSV or JSON file with social media data
- View analytics, insights, and predictions
The system accepts various column name formats. Required fields:
- Post ID (id, post_id, postId)
- Caption (caption, text, post_text)
- Likes (likes, likes_count)
- Comments (comments_count, comments)
- Shares (shares, shares_count)
- Timestamp (timestamp, date, created_at)
See csv/README.md for sample files and formats.
POST /api/auth/register- Register userPOST /api/auth/login- Login userGET /api/auth/me- Get current user
POST /api/dashboard- Create dashboardGET /api/dashboard- Get user dashboardsGET /api/dashboard/:id- Get dashboardPUT /api/dashboard/:id- Update dashboardDELETE /api/dashboard/:id- Delete dashboard
GET /api/dashboard/:dashboardId/posts- Get postsPUT /api/dashboard/posts/:postId- Update postDELETE /api/dashboard/posts/:postId- Delete post
POST /api/upload/:dashboardId?overwrite=true- Upload CSV/JSON
GET /api/analytics/:dashboardId- Get analytics
├── server/ # Backend
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Auth & error handling
│ ├── utils/ # Utilities
│ └── server.js # Entry point
├── src/ # Frontend
│ ├── components/ # React components
│ ├── pages/ # Page components
│ ├── hooks/ # Custom hooks
│ ├── lib/ # API & utilities
│ └── contexts/ # React contexts
└── csv/ # Demo CSV files
MIT