How sarathygit/studyhive works
StudyHive is a collaborative study-room application. Students authenticate, reach a dashboard, create or join rooms, then use room-scoped collaboration and learning tools; HTTP requests use JWT-backed API access, while Socket.io supports live room activity. The graph preserves the documented AI, scheduling, focus, leaderboard, notes, whiteboard, and voice capabilities. Several feature components and routes are unsampled, so their documented roles are shown without inferring internal calls beyond the README or indexed references.
Main entry points: Room.jsx Study room · server.js HTTP and socket server · App.jsx App routing · SocketContext.jsx Socket context
Components 34
Web application
- App routing
client/src/App.jsx - Auth state
client/src/context/AuthContext.jsx - Theme state
client/src/context/ThemeContext.jsx - Dashboard
client/src/pages/Dashboard.jsx - Study room
client/src/pages/Room.jsx - HTTP client
client/src/utils/api.js - Group chat
client/src/components/Chat.jsx - Shared whiteboard
client/src/components/Whiteboard.jsx - Pomodoro timer
client/src/components/PomodoroTimer.jsx - Focus statistics
client/src/components/FocusStats.jsx - Leaderboard
client/src/components/Leaderboard.jsx - Notes and files
client/src/components/NotesPanel.jsx - AI quiz
client/src/components/QuizGenerator.jsx - AI summary
client/src/components/DocSummarizer.jsx - Study scheduler
client/src/components/Scheduler.jsx - Voice calling
client/src/components/VoiceCall.jsx - Socket context
client/src/context/SocketContext.jsx
API and domain
- HTTP and socket server
server/server.js - Authentication routes
server/routes/auth.js - Room management
server/routes/rooms.js - Message history
server/routes/messages.js - Focus tracking
server/routes/focus.js - Notes service
server/routes/notes.js - AI services
server/routes/ai.js - Study scheduling
server/routes/sessions.js - JWT authorization
server/middleware/auth.js - Room membership check
server/middleware/roomAccess.js
Live collaboration
- Socket event handlers
server/socket/index.js
Persistence
- MongoDB connection
server/config/db.js - User profiles
server/models/User.js - Study rooms
server/models/Room.js - Messages
server/models/Message.js - Focus sessions
server/models/FocusSession.js
Other components
- Student
Connections 48
- Student → App routing: uses
client/src/App.jsx - App routing → Auth state: provides auth
client/src/App.jsx - App routing → Theme state: provides theme
client/src/App.jsx - App routing → Dashboard: routes to
client/src/App.jsx - App routing → Study room: routes to
client/src/App.jsx - Auth state → HTTP client: requests identity
client/src/context/AuthContext.jsx - Dashboard → HTTP client: loads dashboard data
client/src/pages/Dashboard.jsx - Study room → HTTP client: loads room and messages
client/src/pages/Room.jsx - Study room → Group chat: renders
client/src/pages/Room.jsx - Study room → Shared whiteboard: renders
client/src/pages/Room.jsx - Study room → Notes and files: renders
client/src/pages/Room.jsx - Study room → AI quiz: renders
client/src/pages/Room.jsx - Study room → AI summary: renders
client/src/pages/Room.jsx - Study room → Study scheduler: renders
client/src/pages/Room.jsx - Study room → Pomodoro timer: includes
client/src/pages/Room.jsx - Study room → Focus statistics: includes
client/src/pages/Room.jsx - Study room → Leaderboard: includes
client/src/pages/Room.jsx - Study room → Voice calling: includes
client/src/pages/Room.jsx - Group chat → Socket context: uses live events
client/src/components/Chat.jsx - Shared whiteboard → Socket context: syncs strokes
client/src/components/Whiteboard.jsx - Voice calling → Socket context: signals calls
client/src/components/VoiceCall.jsx - Socket context → Auth state: reads user
client/src/context/SocketContext.jsx - HTTP client → HTTP and socket server: sends API requests
README.md - Socket context → Socket event handlers: emits events
README.md - HTTP and socket server → MongoDB connection: connects
server/server.js - HTTP and socket server → Authentication routes: mounts routes
server/server.js - HTTP and socket server → Room management: mounts routes
server/server.js - HTTP and socket server → Message history: mounts routes
server/server.js - HTTP and socket server → Focus tracking: mounts routes
server/server.js - HTTP and socket server → Notes service: mounts routes
server/server.js - HTTP and socket server → AI services: mounts routes
server/server.js - HTTP and socket server → Study scheduling: mounts routes
server/server.js - HTTP and socket server → Socket event handlers: configures handlers
server/server.js - Authentication routes → User profiles: reads and writes
server/routes/auth.js - Authentication routes → JWT authorization: protects profile
server/routes/auth.js - JWT authorization → User profiles: loads user
server/middleware/auth.js - Room membership check → Study rooms: checks membership
server/middleware/roomAccess.js - Room management → Study rooms: manages rooms
server/routes/rooms.js - Room management → JWT authorization: requires identity
server/routes/rooms.js - Room management → Room membership check: guards room data
server/routes/rooms.js - Message history → Messages: reads messages
server/routes/messages.js - Message history → JWT authorization: requires identity
server/routes/messages.js - Message history → Room membership check: guards room data
server/routes/messages.js - Focus tracking → Focus sessions: records sessions
server/routes/focus.js - Focus tracking → User profiles: updates focus scores
server/routes/focus.js - Notes service → JWT authorization: requires identity
server/routes/notes.js - Notes service → Room membership check: guards room data
server/routes/notes.js - Notes service → HTTP and socket server: uses notes model
server/server.js