How human-bee/thought-partners works
Main Components
• Frontend Interface: Represent the Next.js application—the primary user interface. This includes individual pages like the whiteboard (with room-based collaboration), videoconference, transcription board, and debugging/test pages.
• Whiteboard Module: Highlight integration with TLDraw, visible in pages under “/whiteboard” and supporting components such as the “CollaborativeBoard.”
• Video Conferencing Module: Illustrate LiveKit integration, covering both API route endpoints (e.g., /api/livekit, /api/refresh-token) and UI components (such as VideoConference, VideoConferenceContext, and Connection/Device Managers).
• Authentication & Token Management: Capture the API endpoints like create-agent, get-token, and refresh-token which secure room access by issuing and refreshing LiveKit tokens.
• Speech-to-Text Transcription: Include components and contexts for transcription (e.g., TranscriptionBoard, useSpeechRecognition, and TranscriptionContext) that translate audio streams into whiteboard annotations.
Relationships and Interactions
• That user actions in the frontend (e.g., joining a room) trigger API calls to authentication endpoints which in turn interface with the LiveKit cloud service.
• Data flow between LiveKit’s real-time video streams and the frontend UI components that render video as well as visual debugging tools (e.g., LiveKitDebugger).
Architectural Patterns and Principles
• Modular Design: Identify that the project is partitioned into clearly defined modules (whiteboard, videoconference, transcription) each with their dedicated components, contexts, and utilities.
• Real-Time Communication: Emphasize the bidirectional data flow required for real-time collaboration, including live updates from both TLDraw-drawn content and video/audio streams.