How shynaac/watchparty works
WatchParty is a private, socket-backed virtual theatre. Guests join or create a named room, choose a seat in a Three.js scene, and use room controls for chat, reactions, and screen sharing. The browser scene coordinates the UI and shared room state; the server’s socket handlers own room operations and dispatch updates, with in-memory room state behind them. Screen sharing combines browser capture, WebRTC peers, and socket signaling. The graph follows shown calls and documented capabilities; unsampled modules are represented only where the README or source index supports them.
Main entry points: scene_theatre.js 3D theatre · socketClient.js Socket client · sockethandlers.js Socket handlers · room.js Room controls
Components 14
Theatre experience
- App bootstrap
main.js - 3D theatre
scenes/scene_theatre.js - Theatre model
assets/Movie_Theater_Scene_Refactored_6.glb - Popcorn model
assets/popcorn.glb - Room controls
ui/room.js - Seat controls
ui/seats.js - Panel toggles
ui/panels.js
Screen sharing
- Share capture UI
ui/room.js - WebRTC peers
net/screenShare.js
Room backend
- Socket client
net/socketClient.js - Socket server
server/index.js - Socket handlers
server/sockethandlers.js
Room state
- Room state
server/rooms.js
Other components
- Guest
Connections 16
- Guest → Room controls: joins room
README.md - App bootstrap → 3D theatre: loads scene
main.js - 3D theatre → Room controls: initializes
scenes/scene_theatre.js - 3D theatre → Seat controls: initializes
scenes/scene_theatre.js - 3D theatre → Panel toggles: initializes
scenes/scene_theatre.js - 3D theatre → Socket client: reads state
scenes/scene_theatre.js - 3D theatre → Popcorn model: loads model
scenes/scene_theatre.js - 3D theatre → Theatre model: uses scene asset
README.md - Room controls → Socket client: room events
ui/room.js - Share capture UI → WebRTC peers: starts sharing
ui/room.js - WebRTC peers → Socket client: signals peers
net/screenShare.js - Socket client → Socket server: connects
net/socketClient.js - Socket server → Socket handlers: registers handlers
server/index.js - Socket handlers → Room state: updates rooms
server/sockethandlers.js - Socket handlers → Socket client: dispatches room events
server/sockethandlers.js - Socket handlers → WebRTC peers: relays signaling
server/sockethandlers.js