# johnbenedictjavier/videocall architecture

> Architecture diagram of the GitHub repository johnbenedictjavier/videocall, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/johnbenedictjavier/videocall
- Repository: https://github.com/johnbenedictjavier/videocall

## Overview

StudyMatch is a peer-learning app: students sign in, discover complementary study buddies or peer groups, send requests, and continue in conversations with messaging and calls. A separate Random Meet flow queues participants and opens a private Daily room, with reporting and blocking options. The app supports a local demo and Supabase-backed production mode. Edges use the supplied excerpts and README; unsampled page and backend details are represented only where documented, without assuming their internal call paths.

Main entry points: [`src/App.tsx`](https://github.com/johnbenedictjavier/videocall/blob/main/src/App.tsx) (App routing), [`src/context/AppDataContext.tsx`](https://github.com/johnbenedictjavier/videocall/blob/main/src/context/AppDataContext.tsx) (App data state), [`src/services/supabaseService.ts`](https://github.com/johnbenedictjavier/videocall/blob/main/src/services/supabaseService.ts) (Supabase operations), [`src/context/CallContext.tsx`](https://github.com/johnbenedictjavier/videocall/blob/main/src/context/CallContext.tsx) (Call state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Student experience"]
  node_app["App routing<br/>[App.tsx]"]
  node_authpage["Sign-in and signup<br/>[AuthPage.tsx]"]
  node_dashboard["Study dashboard<br/>[DashboardPage.tsx]"]
  node_profile["Student profile<br/>[ProfilePage.tsx]"]
  node_skillgps["Skill GPS<br/>[SkillGPSPage.tsx]"]
end

subgraph group_matching["Matching and meet"]
  node_matchpage["Match and Meet<br/>[MatchPage.tsx]"]
  node_matchinglogic["Match scoring<br/>[matching.ts]"]
  node_matchrequests["Match requests"]
end

subgraph group_communication["Communication"]
  node_chat["Conversation chat<br/>[ChatPage.tsx]"]
  node_messages["Message inbox<br/>[MessagesPage.tsx]"]
  node_typing["Typing indicators<br/>[useTyping.ts]"]
  node_callstate["Call state<br/>[CallContext.tsx]"]
  node_callui["Call controls<br/>[CallModal.tsx]"]
end

subgraph group_platform["Identity and data"]
  node_appdata["App data state<br/>[AppDataContext.tsx]"]
  node_authstate["Authentication state<br/>[AuthContext.tsx]"]
  node_demo["Demo profiles and data<br/>[demoData.ts]"]
  node_localstorage[("Demo local storage<br/>[storage.ts]")]
  node_service["Supabase operations<br/>[supabaseService.ts]"]
  node_supabaseclient["Supabase client<br/>[supabase.ts]"]
end

subgraph group_integrations["External services"]
  node_supabase[("Supabase platform")]
  node_realtime["Supabase Realtime"]
  node_storage[("Supabase Storage")]
  node_dailyfunction["Daily room function<br/>[index.ts]"]
  node_daily["Daily rooms"]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_app -->|"routes to"| node_authpage
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_matchpage
node_app -->|"routes to"| node_chat
node_app -->|"routes to"| node_messages
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_skillgps
node_authpage -->|"authenticates through"| node_authstate
node_authstate -->|"fetches profiles"| node_service
node_authstate -->|"loads demo identity"| node_localstorage
node_localstorage -->|"seeds from"| node_demo
node_dashboard -->|"calculates matches"| node_matchinglogic
node_dashboard -->|"reads app data"| node_appdata
node_matchpage -->|"uses app data"| node_appdata
node_matchrequests -->|"updates requests"| node_appdata
node_appdata -->|"persists demo data"| node_localstorage
node_appdata -->|"loads and writes"| node_service
node_chat -->|"reads and sends"| node_appdata
node_chat -->|"uses indicators"| node_typing
node_messages -->|"reads conversations"| node_appdata
node_appdata -->|"subscribes to events"| node_realtime
node_typing -->|"broadcasts typing"| node_realtime
node_callstate -->|"creates call invites"| node_service
node_callstate -->|"receives call events"| node_realtime
node_callstate -.->|"opens call controls"| node_callui
node_callui -->|"requests room"| node_service
node_service -->|"uses client"| node_supabaseclient
node_supabaseclient -->|"connects to"| node_supabase
node_service -->|"reads and writes"| node_supabase
node_service -->|"uploads chat images"| node_storage
node_callui -->|"requests Daily room"| node_dailyfunction
node_dailyfunction -->|"creates private room"| node_daily
node_dailyfunction -->|"persists room details"| node_supabase

click node_app "https://github.com/johnbenedictjavier/videocall/blob/main/src/App.tsx"
click node_authpage "https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/AuthPage.tsx"
click node_dashboard "https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/DashboardPage.tsx"
click node_profile "https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/ProfilePage.tsx"
click node_skillgps "https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/SkillGPSPage.tsx"
click node_matchpage "https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/MatchPage.tsx"
click node_matchinglogic "https://github.com/johnbenedictjavier/videocall/blob/main/src/features/matching/matching.ts"
click node_matchrequests "https://github.com/johnbenedictjavier/videocall/blob/main/src/components/MatchRequestOverlay.tsx"
click node_appdata "https://github.com/johnbenedictjavier/videocall/blob/main/src/context/AppDataContext.tsx"
click node_authstate "https://github.com/johnbenedictjavier/videocall/blob/main/src/context/AuthContext.tsx"
click node_demo "https://github.com/johnbenedictjavier/videocall/blob/main/src/data/demoData.ts"
click node_localstorage "https://github.com/johnbenedictjavier/videocall/blob/main/src/lib/storage.ts"
click node_chat "https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/ChatPage.tsx"
click node_messages "https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/MessagesPage.tsx"
click node_typing "https://github.com/johnbenedictjavier/videocall/blob/main/src/hooks/useTyping.ts"
click node_callstate "https://github.com/johnbenedictjavier/videocall/blob/main/src/context/CallContext.tsx"
click node_callui "https://github.com/johnbenedictjavier/videocall/blob/main/src/components/CallModal.tsx"
click node_service "https://github.com/johnbenedictjavier/videocall/blob/main/src/services/supabaseService.ts"
click node_supabaseclient "https://github.com/johnbenedictjavier/videocall/blob/main/src/lib/supabase.ts"
click node_dailyfunction "https://github.com/johnbenedictjavier/videocall/blob/main/supabase/functions/create-daily-room/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_authpage,node_dashboard,node_profile,node_skillgps toneBlue
class node_matchpage,node_matchinglogic,node_matchrequests toneAmber
class node_chat,node_messages,node_typing,node_callstate,node_callui toneMint
class node_appdata,node_authstate,node_demo,node_localstorage,node_service,node_supabaseclient toneRose
class node_supabase,node_realtime,node_storage,node_dailyfunction,node_daily,node_student toneIndigo
```

## Components

### Student experience

- [App routing](https://github.com/johnbenedictjavier/videocall/blob/main/src/App.tsx): `src/App.tsx`
- [Sign-in and signup](https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/AuthPage.tsx): `src/pages/AuthPage.tsx`
- [Study dashboard](https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/DashboardPage.tsx): `src/pages/DashboardPage.tsx`
- [Student profile](https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/ProfilePage.tsx): `src/pages/ProfilePage.tsx`
- [Skill GPS](https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/SkillGPSPage.tsx): `src/pages/SkillGPSPage.tsx`

### Matching and meet

- [Match and Meet](https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/MatchPage.tsx): `src/pages/MatchPage.tsx`
- [Match scoring](https://github.com/johnbenedictjavier/videocall/blob/main/src/features/matching/matching.ts): `src/features/matching/matching.ts`
- [Match requests](https://github.com/johnbenedictjavier/videocall/blob/main/src/components/MatchRequestOverlay.tsx): `src/components/MatchRequestOverlay.tsx`

### Communication

- [Conversation chat](https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/ChatPage.tsx): `src/pages/ChatPage.tsx`
- [Message inbox](https://github.com/johnbenedictjavier/videocall/blob/main/src/pages/MessagesPage.tsx): `src/pages/MessagesPage.tsx`
- [Typing indicators](https://github.com/johnbenedictjavier/videocall/blob/main/src/hooks/useTyping.ts): `src/hooks/useTyping.ts`
- [Call state](https://github.com/johnbenedictjavier/videocall/blob/main/src/context/CallContext.tsx): `src/context/CallContext.tsx`
- [Call controls](https://github.com/johnbenedictjavier/videocall/blob/main/src/components/CallModal.tsx): `src/components/CallModal.tsx`

### Identity and data

- [App data state](https://github.com/johnbenedictjavier/videocall/blob/main/src/context/AppDataContext.tsx): `src/context/AppDataContext.tsx`
- [Authentication state](https://github.com/johnbenedictjavier/videocall/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Demo profiles and data](https://github.com/johnbenedictjavier/videocall/blob/main/src/data/demoData.ts): `src/data/demoData.ts`
- [Demo local storage](https://github.com/johnbenedictjavier/videocall/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- [Supabase operations](https://github.com/johnbenedictjavier/videocall/blob/main/src/services/supabaseService.ts): `src/services/supabaseService.ts`
- [Supabase client](https://github.com/johnbenedictjavier/videocall/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### External services

- **Supabase platform**
- **Supabase Realtime**
- **Supabase Storage**
- [Daily room function](https://github.com/johnbenedictjavier/videocall/blob/main/supabase/functions/create-daily-room/index.ts): `supabase/functions/create-daily-room/index.ts`
- **Daily rooms**

### Other components

- **Student**

## Connections

- Student → App routing: uses (evidence: `README.md`)
- App routing → Sign-in and signup: routes to (evidence: `src/App.tsx`)
- App routing → Study dashboard: routes to (evidence: `src/App.tsx`)
- App routing → Match and Meet: routes to (evidence: `src/App.tsx`)
- App routing → Conversation chat: routes to (evidence: `src/App.tsx`)
- App routing → Message inbox: routes to (evidence: `src/App.tsx`)
- App routing → Student profile: routes to (evidence: `src/App.tsx`)
- App routing → Skill GPS: routes to (evidence: `src/App.tsx`)
- Sign-in and signup → Authentication state: authenticates through (evidence: `src/pages/AuthPage.tsx`)
- Authentication state → Supabase operations: fetches profiles (evidence: `src/context/AuthContext.tsx`)
- Authentication state → Demo local storage: loads demo identity (evidence: `src/context/AuthContext.tsx`)
- Demo local storage → Demo profiles and data: seeds from (evidence: `src/lib/storage.ts`)
- Study dashboard → Match scoring: calculates matches (evidence: `src/pages/DashboardPage.tsx`)
- Study dashboard → App data state: reads app data (evidence: `src/pages/DashboardPage.tsx`)
- Match and Meet → App data state: uses app data (evidence: `src/pages/MatchPage.tsx`)
- Match requests → App data state: updates requests (evidence: `src/components/MatchRequestOverlay.tsx`)
- App data state → Demo local storage: persists demo data (evidence: `src/context/AppDataContext.tsx`)
- App data state → Supabase operations: loads and writes (evidence: `src/context/AppDataContext.tsx`)
- Conversation chat → App data state: reads and sends (evidence: `src/pages/ChatPage.tsx`)
- Conversation chat → Typing indicators: uses indicators (evidence: `src/pages/ChatPage.tsx`)
- Message inbox → App data state: reads conversations (evidence: `src/pages/MessagesPage.tsx`)
- App data state → Supabase Realtime: subscribes to events (evidence: `README.md`)
- Typing indicators → Supabase Realtime: broadcasts typing (evidence: `README.md`)
- Call state → Supabase operations: creates call invites (evidence: `src/context/CallContext.tsx`)
- Call state → Supabase Realtime: receives call events (evidence: `README.md`)
- Call state → Call controls: opens call controls
- Call controls → Supabase operations: requests room (evidence: `src/components/CallModal.tsx`)
- Supabase operations → Supabase client: uses client (evidence: `src/services/supabaseService.ts`)
- Supabase client → Supabase platform: connects to (evidence: `src/lib/supabase.ts`)
- Supabase operations → Supabase platform: reads and writes (evidence: `src/services/supabaseService.ts`)
- Supabase operations → Supabase Storage: uploads chat images (evidence: `src/services/supabaseService.ts`)
- Call controls → Daily room function: requests Daily room (evidence: `README.md`)
- Daily room function → Daily rooms: creates private room (evidence: `README.md`)
- Daily room function → Supabase platform: persists room details (evidence: `README.md`)
