You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🎓 SAMVAAD — Connect, learn, and collaborate instantly with real-time video classrooms
A fully peer-to-peer video classroom built with WebRTC, Next.js, and Socket.io. Media never touches the server. Only signaling (SDP + ICE) goes through the backend.
TURN Server: The free Google STUN server works for most network configurations. However, users behind symmetric NATs (some corporate networks) may fail to connect. For production, add a free TURN server (e.g., Open Relay):
Render free tier spins down after 15min of inactivity (cold start ~30s)
Scale: This mesh topology works well for 10–15 users. For larger classes, consider an SFU (mediasoup, LiveKit).
🔧 Scaling Considerations
Users
Architecture
Notes
1–4
Full mesh (current)
Every peer connects to every other peer
5–15
Full mesh (current)
Works, but teacher has N-1 upload streams
15+
SFU recommended
One server-side routing node (mediasoup, LiveKit)
For the current full-mesh design, each user uploads one stream per peer. With 15 users, teacher uploads 14 streams. A modern connection handles this but bandwidth becomes the bottleneck.
📦 Dependencies
Backend
Package
Purpose
express
HTTP server
socket.io
WebSocket signaling
cors
Cross-origin requests
uuid
Room ID generation
Frontend
Package
Purpose
next
React framework
socket.io-client
WebSocket client
tailwindcss
Utility CSS
No paid services. No media servers. 100% free stack.
About
Peer-to-Peer Online Classroom built with WebRTC, Next.js, and Socket.io. Supports real-time video, chat, screen sharing, whiteboard, and raise-hand features with minimal backend (signaling only).