A real-time video conferencing platform built with React, Node.js, WebRTC, and Socket.IO featuring live sentiment polling and AI-powered MCQ generation using Google Gemini API.
- WebRTC-based peer-to-peer communication
- Low-latency audio/video streaming
- Real-time participant list updates
- Participants vote on their sentiment (Good/Neutral/Bad)
- Admin dashboard with real-time sentiment distribution chart
- Auto-updating doughnut chart visualization
- Instant feedback on participation
- Admin generates MCQs using natural language prompts
- Google Gemini API integration
- Auto-broadcast MCQs to all participants
- Real-time response tracking and analytics
- Question-wise accuracy breakdown
- Real-time sentiment distribution visualization
- Active participant monitoring
- MCQ response analytics
- Per-question accuracy metrics
- Response distribution charts
- Admin/Instructor: Generate content, view analytics, monitor sessions
- Participants/Students: Join meetings, vote sentiment, answer MCQs
Frontend: React.js + Tailwind CSS + Socket.IO Client
Backend: Node.js + Express + Socket.IO
Real-time: WebRTC + Socket.IO (WebSocket)
AI: Google Generative AI (Gemini API)
Charts: Chart.js + Recharts
UI Components: Lucide React Icons
- Node.js 16+
- Google Gemini API key: https://makersuite.google.com/app/apikey
cd server
npm install
# Create .env file
cat > .env << EOF
PORT=3000
GEMINI_API_KEY=your_gemini_api_key_here
EOF
npm run devnpm install
npm run dev- Participant: http://localhost:5173
- Admin: http://localhost:5173/admin (Login: admin/admin123)
- QUICKSTART.md - 5-minute setup guide
- ARCHITECTURE.md - Detailed technical architecture
- server/README.md - Backend API reference
βββ server/ # Node.js Backend
β βββ server.js # Express + Socket.IO server
β βββ package.json
β βββ .env.example
βββ src/ # React Frontend
β βββ pages/
β β βββ Home.jsx # Landing page
β β βββ MeetingRoom.jsx # Participant interface
β β βββ admin/
β β βββ AdminLogin.jsx
β β βββ AdminDashboard.jsx # Admin control panel
β βββ components/
β β βββ SentimentPanel.jsx # Sentiment voting
β β βββ SentimentDashboard.jsx # Sentiment chart
β β βββ MCQDisplay.jsx # MCQ modal
β β βββ MCQAnalytics.jsx # Analytics dashboard
β βββ App.jsx
β βββ main.jsx
β βββ index.css
βββ package.json # Frontend dependencies
βββ vite.config.js
βββ tailwind.config.js
βββ ARCHITECTURE.md # Technical documentation
βββ QUICKSTART.md # Setup guide
- Participant clicks sentiment button (Good/Neutral/Bad)
- Client emits
submit-sentimentevent via Socket.IO - Server updates sentiment distribution in-memory
- Server broadcasts
sentiment-updatedto all connected clients - Admin dashboard chart updates in real-time
- Admin enters prompt (e.g., "Generate 10 MCQs on Data Structures")
- Server calls Google Gemini API with prompt
- Gemini returns structured MCQ JSON
- Server broadcasts MCQs to all participants via Socket.IO
- Participants see MCQ modal and answer questions
- Responses auto-submit and are tracked server-side
- Admin views detailed analytics per question
// Join a room
socket.emit('join-room', {
roomId: 'ABC12345',
displayName: 'Alice',
isAdmin: false
});
// Submit sentiment
socket.emit('submit-sentiment', {
roomId: 'ABC12345',
sentiment: 'good' // 'good' | 'neutral' | 'negative'
});
// Answer MCQ
socket.emit('submit-mcq-response', {
roomId: 'ABC12345',
mcqSessionId: 'uuid',
questionIndex: 0,
answer: 'O(log n)'
});// Generate MCQs
socket.emit('generate-mcq', {
roomId: 'ABC12345',
prompt: 'Generate 10 easy MCQs on Data Structures'
});
// Get analytics
socket.emit('get-mcq-analytics', {
roomId: 'ABC12345',
mcqSessionId: 'uuid'
});| Method | Endpoint | Description |
|---|---|---|
POST |
/api/create-meeting |
Create new meeting |
POST |
/api/admin-login |
Admin login |
GET |
/api/meeting/:meetingId |
Get meeting state |
room-state- Current participants and sentimentsentiment-updated- New sentiment votemcq-broadcast- MCQs available for participantsmcq-response-update- Live response countmcq-analytics- Detailed analytics dataerror- Error messages
join-room- Join meetingsubmit-sentiment- Submit feedbackgenerate-mcq- Generate MCQs (admin only)submit-mcq-response- Answer MCQget-mcq-analytics- Get stats (admin only)
- Admin authentication (JWT recommended in production)
- CORS enabled for trusted origins
- Input validation on server side
- Socket.IO namespace isolation per room
- Fallback to mock MCQs if API fails
heroku create your-app-name
heroku config:set GEMINI_API_KEY=your_key
git push heroku mainnpm run build
vercel deploy dist/| Layer | Technology |
|---|---|
| Frontend | React 19, React Router 7, Tailwind CSS 3 |
| Backend | Node.js, Express 4, Socket.IO 4 |
| Real-time | WebRTC, Socket.IO |
| AI | Google Generative AI (Gemini) |
| Charts | Chart.js 4, Recharts 2, React-ChartJS-2 |
| UI | Lucide React Icons |
| Build | Vite 7 |
| Styling | Tailwind CSS with custom config |
| Issue | Solution |
|---|---|
| "Cannot GET /api" | Start backend server: cd server && npm run dev |
| WebSocket connection failed | Check if backend runs on port 3000 |
| Gemini API errors | Verify API key in .env file |
| Camera permission denied | Check browser permissions |
| MCQs not displaying | Check browser console for errors |
- Full P2P WebRTC implementation
- Screen sharing capability
- Session recording and playback
- Custom quiz builder
- Database integration (MongoDB/PostgreSQL)
- User authentication with JWT
- Chat messaging system
- Leaderboard based on MCQ accuracy
- Breakout room functionality
- Push notifications
MIT License - Feel free to use this project for personal or commercial purposes.
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions, please open an issue on the GitHub repository.
Ready to get started? Follow the QUICKSTART.md guide.