How parijagitsss/labsphere works
LabSphere is a lab-classroom monitoring and teaching-control system. Teachers manage sessions and lab computers in the dashboard; student clients register with the backend and send activity and screen data, which teachers can review and act on. The backend coordinates live connections and persists session/activity records, while teacher screen broadcasts and desktop annotation provide live instruction. Source excerpts establish the main HTTP, WebSocket, and local browser-activity flows; other dashboard capabilities are represented where documented, without inferring unsampled call paths.
Main entry points: main.py Lab API · App.jsx Teacher dashboard · student.py Student client · database.py Database connection
Components 19
Teacher tools
- Teacher dashboard
teacher-dashboard/src/App.jsx - Dashboard mount
teacher-dashboard/src/main.jsx - Desktop ink overlay
teacher_overlay.py - Session control
teacher-dashboard/src/App.jsx - Teacher screen broadcast
teacher-dashboard/src/App.jsx - Activity review
teacher-dashboard/src/App.jsx
Backend services
- Lab API
backend/app/main.py - Connection manager
backend/app/websocket/manager.py - Backend configuration
backend/app/config.py - Computer monitoring
backend/app/main.py - Activity classification
backend/app/main.py - Session activity records
backend/app/main.py - Computer commands
backend/app/main.py
Student monitoring
- Student client
student-client/student.py - Browser extension
student-client/browser-extension/background.js - Local activity receiver
student-client/student.py
Persistence
- Database connection
backend/app/database.py - MongoDB Atlas
Other components
- Teacher
Connections 20
- Teacher → Teacher dashboard: uses
teacher-dashboard/src/App.jsx - Dashboard mount → Teacher dashboard: renders
teacher-dashboard/src/main.jsx - Teacher dashboard → Lab API: calls HTTP API
teacher-dashboard/src/App.jsx - Teacher dashboard → Session control: manages sessions
teacher-dashboard/src/App.jsx - Teacher dashboard → Computer monitoring: fetches status
teacher-dashboard/src/App.jsx - Teacher dashboard → Teacher screen broadcast: uploads frames
teacher-dashboard/src/App.jsx - Teacher dashboard → Activity review: fetches activity
teacher-dashboard/src/App.jsx - Desktop ink overlay → Lab API: connects WebSocket
teacher_overlay.py - Lab API → Connection manager: uses
backend/app/main.py - Lab API → Database connection: imports collections
backend/app/main.py - Database connection → MongoDB Atlas: connects
backend/app/database.py - Student client → Lab API: registers and streams
student-client/student.py - Lab API → Student client: sends frames and commands
backend/app/main.py - Browser extension → Local activity receiver: posts tab activity
student-client/browser-extension/background.js - Student client → Local activity receiver: hosts receiver
student-client/student.py - Lab API → Activity classification: classifies activity
backend/app/main.py - Lab API → Session activity records: reads session records
backend/app/main.py - Session activity records → Database connection: uses collections
backend/app/main.py - Computer commands → Connection manager: dispatches commands
backend/app/main.py - Teacher screen broadcast → Student client: broadcast reaches clients