How akashksankar/bharat-virtual-moot-court works
Purpose and Runtime
CourtVerse is a virtual courtroom practice UI for legal education: users create or join simulated hearings, assume courtroom roles, and work through evidence, objections, transcripts, judgment, and evaluation. The implemented repository is a React/TypeScript Vite client with a TypeScript server entry point, rather than the full backend architecture described in the README.
Primary startup paths:
• Client bootstrap: src/main.tsx
• Root application orchestration: src/App.tsx
• Server process entry: server.ts
• Browser build shell: index.html
Application Shell and Session Entry
App.tsx is the top-level control boundary for navigating between landing, room-creation/joining, and active courtroom experiences. The landing and modal components form the session-entry workflow; room/session state is likely held in client component state or passed through props, as no dedicated store directory exists.
Key paths:
• src/App.tsx
• src/components/LandingPage.tsx
• src/components/CreateRoomModal.tsx
• src/components/JoinModal.tsx
• src/components/Navbar.tsx
Courtroom Composition and Role Interaction
The active hearing is assembled around a courtroom view/layout rather than a conventional meeting UI. Layout components place participants and expose courtroom-specific controls such as speaking order, invitations, and judge actions. Role-aware UI is represented through reusable participant cards and judge controls.
Key paths:
• src/components/CourtroomView.tsx
• src/components/courtroom/CourtroomLayout.tsx
• src/components/courtroom/ParticipantCard.tsx
• src/components/courtroom/SpeakingQueue.tsx
• src/components/judge/JudgeControlPanel.tsx
Case, Evidence, and Hearing Record
Case content is presented as structured, client-side domain data. Evidence management and document viewing support exhibit-oriented proceedings; the timeline, case summary, transcript, and judgment editor represent the persistent conceptual record of a hearing. The repository includes demo data, but no visible database/model layer.
Key paths:
• src/types.ts
• src/data/demoData.ts
• src/components/case/CaseSummaryPanel.tsx
• src/components/evidence/EvidenceManager.tsx
• src/components/evidence/DocumentViewer.tsx
• src/components/timeline/HearingTimeline.tsx
• src/components/transcript/StenographerPanel.tsx
• src/components/judgment/JudgmentEditor.tsx
Proceedings and Learning Features
During a hearing, participants communicate through courtroom chat, can raise formal objections, receive AI-facing assistance, and receive evaluation or practice-oriented feedback. These are feature modules attached to the courtroom experience, not separately exposed services in the file tree.
Key paths:
• src/components/chat/CourtroomChat.tsx
• src/components/objection/ObjectionModal.tsx
• src/components/ai/AICaseAssistant.tsx
• src/components/evaluation/EvaluationPanel.tsx
• src/components/practice/StudentPracticeMode.tsx
Media, Speech, and Export Boundaries
Browser-specific integration is isolated in utilities: WebRTC for peer media/session mechanics, speech recognition for transcription input, sound effects for interaction feedback, and PDF generation for exporting material. These are important boundaries because they depend on browser APIs or external runtime configuration rather than React rendering alone.
Key paths:
• src/utils/webrtc.ts
• src/utils/speechRecognition.ts
• src/utils/pdfExport.ts
• src/utils/sfx.ts
Infrastructure and External Dependencies
The client uses Vite/Bun-era project tooling (vite.config.ts, bun.lock) and is intended to run alongside server.ts. The README proposes Node/Express, Socket.IO signaling, WebRTC, AI APIs, PostgreSQL, Redis, storage, and TURN infrastructure, with credentials configured through .env; however, database, Socket.IO, API route, and persistence modules are not present in this tree. Treat those integrations as runtime/roadmap dependencies unless confirmed in server.ts and package metadata.
Key paths:
• server.ts
• .env.example
• package.json
• vite.config.ts
Components 19
Runtime
- Browser Build Shell
index.html - Client Bootstrap
src/main.tsx - Server Process · Implemented server boundary; broader backend integrations are not confirmed.
server.ts
Session Entry
- Application Shell · Controls landing, session entry, and hearing views.
src/App.tsx - Landing
src/components/LandingPage.tsx - Create Room
src/components/CreateRoomModal.tsx - Join Room
src/components/JoinModal.tsx
Active Courtroom
- Courtroom View
src/components/CourtroomView.tsx - Courtroom Layout
src/components/courtroom/CourtroomLayout.tsx - Participants & Speaking · Participant cards and speaking queue expose courtroom roles and order.
src/components/courtroom/ParticipantCard.tsx - Judge Controls
src/components/judge/JudgeControlPanel.tsx
Case & Hearing Record
- Case Domain Data · Client-side case data; no repository database layer is present.
src/data/demoData.ts - Case & Evidence · Case summary, exhibit management, and document viewing.
src/components/evidence/EvidenceManager.tsx - Hearing Record · Timeline, transcript, and judgment editing form the conceptual hearing record.
src/components/transcript/StenographerPanel.tsx
Proceeding Features
- Proceeding Tools · Courtroom chat and formal objection workflow.
src/components/chat/CourtroomChat.tsx - Learning Tools · AI assistance, evaluation, and student practice features.
src/components/ai/AICaseAssistant.tsx
Browser Integrations
- WebRTC Media · Peer media and session mechanics boundary.
src/utils/webrtc.ts - Speech Recognition · Transcription-input boundary.
src/utils/speechRecognition.ts - PDF Export
src/utils/pdfExport.ts
Connections 21
- Browser Build Shell → Client Bootstrap: loads
- Client Bootstrap → Application Shell: mounts
- Application Shell → Landing: shows
- Landing → Create Room: opens
- Landing → Join Room: opens
- Create Room → Courtroom View: enters hearing
- Join Room → Courtroom View: enters hearing
- Application Shell → Courtroom View: orchestrates
- Courtroom View → Courtroom Layout: composes
- Courtroom Layout → Participants & Speaking: places
- Courtroom Layout → Judge Controls: exposes
- Courtroom View → Case & Evidence: presents
- Courtroom View → Hearing Record: maintains
- Courtroom View → Proceeding Tools: attaches
- Courtroom View → Learning Tools: attaches
- Case Domain Data → Case & Evidence: supplies
- Case Domain Data → Hearing Record: supplies
- Courtroom View → WebRTC Media: uses media
- Hearing Record → Speech Recognition: uses input
- Hearing Record → PDF Export: exports
- Server Process → Browser Build Shell: runtime companion