# md-anass/nexmeet architecture

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

- Interactive diagram: https://gitdiagram.com/md-anass/nexmeet
- Repository: https://github.com/md-anass/nexmeet

## Overview

NexMeet is a private video-meeting platform. Users create or join meetings, prepare camera and microphone, then participate in a LiveKit call with chat and host controls; accounts and meeting state are supported by Supabase. The graph preserves the meeting, waiting-room, dashboard, and account capabilities visible in the tree. Edges are limited to README statements and SOURCE INDEX references; unsampled page wiring and some runtime connections are therefore omitted.

Main entry points: [`src/components/meeting/participant-meeting.tsx`](https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/participant-meeting.tsx) (Live meeting), [`src/app/api/meetings/[code]/livekit-token/route.ts`](https://github.com/md-anass/nexmeet/blob/main/src/app/api/meetings/%5Bcode%5D/livekit-token/route.ts) (LiveKit token route), [`src/lib/supabase/server.ts`](https://github.com/md-anass/nexmeet/blob/main/src/lib/supabase/server.ts) (Supabase server client), [`src/app/api/meetings/[code]/chat/route.ts`](https://github.com/md-anass/nexmeet/blob/main/src/app/api/meetings/%5Bcode%5D/chat/route.ts) (Chat API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Product experience"]
  node_marketing["Marketing site<br/>[marketing-home.tsx]"]
  node_dashboard["Meeting dashboard<br/>[page.tsx]"]
  node_profile["Profile management<br/>[page.tsx]"]
end

subgraph group_meeting["Meeting runtime"]
  node_meeting_page["Meeting entry<br/>[page.tsx]"]
  node_participant["Live meeting"]
  node_prejoin["Media preview"]
  node_chat["Meeting chat<br/>[chat-panel.tsx]"]
  node_controls["Call controls"]
  node_stage["Meeting stage<br/>[meeting-stage.tsx]"]
  node_participants["Participant panel"]
  node_waiting_ui["Waiting-room controls"]
end

subgraph group_services["Meeting services"]
  node_token["LiveKit token route<br/>[route.ts]"]
  node_chat_api["Chat API<br/>[route.ts]"]
  node_waiting_api["Waiting-room API<br/>[route.ts]"]
  node_session["Participant sessions"]
  node_session_crypto["Session credentials"]
  node_waiting_logic["Waiting-room logic<br/>[waiting-room.ts]"]
  node_lifecycle["Meeting lifecycle"]
end

subgraph group_accounts["Accounts and data"]
  node_auth_ui["Sign-in and signup<br/>[auth-form.tsx]"]
  node_signup["Signup route<br/>[route.ts]"]
  node_login["Login route<br/>[route.ts]"]
  node_supabase["Supabase server client<br/>[server.ts]"]
  node_webhook["LiveKit lifecycle webhook<br/>[route.ts]"]
  node_livekit_lifecycle["Lifecycle persistence"]
end

node_user(("Meeting participant"))
node_livekit{{"LiveKit service"}}
node_supabase_service[("Supabase")]

node_user -->|"visits"| node_marketing
node_user -.->|"manages meetings"| node_dashboard
node_user -.->|"joins meeting"| node_meeting_page
node_user -.->|"authenticates"| node_auth_ui
node_participant -->|"renders"| node_controls
node_participant -->|"renders"| node_stage
node_participant -->|"renders"| node_chat
node_participant -->|"renders"| node_participants
node_participant -->|"renders"| node_prejoin
node_participant -->|"renders"| node_waiting_ui
node_prejoin -->|"reads preferences"| node_session_crypto
node_token -->|"hashes credentials"| node_session_crypto
node_token -->|"resolves credentials"| node_session
node_token -->|"queries meeting access"| node_supabase
node_token -->|"normalizes meeting"| node_lifecycle
node_token -->|"checks join gate"| node_waiting_logic
node_token -->|"issues join token"| node_livekit
node_chat_api -->|"hashes credentials"| node_session_crypto
node_chat_api -->|"resolves credentials"| node_session
node_chat_api -->|"reads and sends messages"| node_supabase
node_waiting_api -->|"uses access logic"| node_waiting_logic
node_signup -->|"creates account"| node_supabase
node_login -->|"signs in"| node_supabase
node_webhook -->|"updates lifecycle"| node_livekit_lifecycle
node_webhook -->|"receives events"| node_livekit
node_livekit_lifecycle -.->|"persists lifecycle"| node_supabase_service
node_supabase -->|"connects"| node_supabase_service

click node_marketing "https://github.com/md-anass/nexmeet/blob/main/src/components/marketing/marketing-home.tsx"
click node_dashboard "https://github.com/md-anass/nexmeet/blob/main/src/app/(app)/dashboard/page.tsx"
click node_profile "https://github.com/md-anass/nexmeet/blob/main/src/app/(app)/profile/page.tsx"
click node_meeting_page "https://github.com/md-anass/nexmeet/blob/main/src/app/m/%5Bcode%5D/page.tsx"
click node_participant "https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/participant-meeting.tsx"
click node_prejoin "https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/prejoin-media-preview.tsx"
click node_chat "https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/chat-panel.tsx"
click node_controls "https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/meeting-controls.tsx"
click node_stage "https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/meeting-stage.tsx"
click node_participants "https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/participants-panel.tsx"
click node_waiting_ui "https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/waiting-room-host-panel.tsx"
click node_token "https://github.com/md-anass/nexmeet/blob/main/src/app/api/meetings/%5Bcode%5D/livekit-token/route.ts"
click node_chat_api "https://github.com/md-anass/nexmeet/blob/main/src/app/api/meetings/%5Bcode%5D/chat/route.ts"
click node_waiting_api "https://github.com/md-anass/nexmeet/blob/main/src/app/api/meetings/%5Bcode%5D/waiting-room/request/route.ts"
click node_session "https://github.com/md-anass/nexmeet/blob/main/src/lib/participant-session-server.ts"
click node_session_crypto "https://github.com/md-anass/nexmeet/blob/main/src/lib/participant-session.ts"
click node_waiting_logic "https://github.com/md-anass/nexmeet/blob/main/src/lib/waiting-room.ts"
click node_lifecycle "https://github.com/md-anass/nexmeet/blob/main/src/lib/meeting-lifecycle.ts"
click node_auth_ui "https://github.com/md-anass/nexmeet/blob/main/src/components/shared/auth-form.tsx"
click node_signup "https://github.com/md-anass/nexmeet/blob/main/src/app/auth/signup/route.ts"
click node_login "https://github.com/md-anass/nexmeet/blob/main/src/app/auth/login/route.ts"
click node_supabase "https://github.com/md-anass/nexmeet/blob/main/src/lib/supabase/server.ts"
click node_webhook "https://github.com/md-anass/nexmeet/blob/main/src/app/api/livekit/webhook/route.ts"
click node_livekit_lifecycle "https://github.com/md-anass/nexmeet/blob/main/src/lib/supabase/livekit-lifecycle.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_marketing,node_dashboard,node_profile toneBlue
class node_meeting_page,node_participant,node_prejoin,node_chat,node_controls,node_stage,node_participants,node_waiting_ui,node_supabase_service toneAmber
class node_token,node_chat_api,node_waiting_api,node_session,node_session_crypto,node_waiting_logic,node_lifecycle toneMint
class node_auth_ui,node_signup,node_login,node_supabase,node_webhook,node_livekit_lifecycle toneRose
class node_user,node_livekit toneIndigo
```

## Components

### Product experience

- [Marketing site](https://github.com/md-anass/nexmeet/blob/main/src/components/marketing/marketing-home.tsx): `src/components/marketing/marketing-home.tsx`
- [Meeting dashboard](https://github.com/md-anass/nexmeet/blob/main/src/app/(app)/dashboard/page.tsx): `src/app/(app)/dashboard/page.tsx`
- [Profile management](https://github.com/md-anass/nexmeet/blob/main/src/app/(app)/profile/page.tsx): `src/app/(app)/profile/page.tsx`

### Meeting runtime

- [Meeting entry](https://github.com/md-anass/nexmeet/blob/main/src/app/m/%5Bcode%5D/page.tsx): `src/app/m/[code]/page.tsx`
- [Live meeting](https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/participant-meeting.tsx): `src/components/meeting/participant-meeting.tsx`
- [Media preview](https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/prejoin-media-preview.tsx): `src/components/meeting/prejoin-media-preview.tsx`
- [Meeting chat](https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/chat-panel.tsx): `src/components/meeting/chat-panel.tsx`
- [Call controls](https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/meeting-controls.tsx): `src/components/meeting/meeting-controls.tsx`
- [Meeting stage](https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/meeting-stage.tsx): `src/components/meeting/meeting-stage.tsx`
- [Participant panel](https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/participants-panel.tsx): `src/components/meeting/participants-panel.tsx`
- [Waiting-room controls](https://github.com/md-anass/nexmeet/blob/main/src/components/meeting/waiting-room-host-panel.tsx): `src/components/meeting/waiting-room-host-panel.tsx`

### Meeting services

- [LiveKit token route](https://github.com/md-anass/nexmeet/blob/main/src/app/api/meetings/%5Bcode%5D/livekit-token/route.ts): `src/app/api/meetings/[code]/livekit-token/route.ts`
- [Chat API](https://github.com/md-anass/nexmeet/blob/main/src/app/api/meetings/%5Bcode%5D/chat/route.ts): `src/app/api/meetings/[code]/chat/route.ts`
- [Waiting-room API](https://github.com/md-anass/nexmeet/blob/main/src/app/api/meetings/%5Bcode%5D/waiting-room/request/route.ts): `src/app/api/meetings/[code]/waiting-room/request/route.ts`
- [Participant sessions](https://github.com/md-anass/nexmeet/blob/main/src/lib/participant-session-server.ts): `src/lib/participant-session-server.ts`
- [Session credentials](https://github.com/md-anass/nexmeet/blob/main/src/lib/participant-session.ts): `src/lib/participant-session.ts`
- [Waiting-room logic](https://github.com/md-anass/nexmeet/blob/main/src/lib/waiting-room.ts): `src/lib/waiting-room.ts`
- [Meeting lifecycle](https://github.com/md-anass/nexmeet/blob/main/src/lib/meeting-lifecycle.ts): `src/lib/meeting-lifecycle.ts`

### Accounts and data

- [Sign-in and signup](https://github.com/md-anass/nexmeet/blob/main/src/components/shared/auth-form.tsx): `src/components/shared/auth-form.tsx`
- [Signup route](https://github.com/md-anass/nexmeet/blob/main/src/app/auth/signup/route.ts): `src/app/auth/signup/route.ts`
- [Login route](https://github.com/md-anass/nexmeet/blob/main/src/app/auth/login/route.ts): `src/app/auth/login/route.ts`
- [Supabase server client](https://github.com/md-anass/nexmeet/blob/main/src/lib/supabase/server.ts): `src/lib/supabase/server.ts`
- [LiveKit lifecycle webhook](https://github.com/md-anass/nexmeet/blob/main/src/app/api/livekit/webhook/route.ts): `src/app/api/livekit/webhook/route.ts`
- [Lifecycle persistence](https://github.com/md-anass/nexmeet/blob/main/src/lib/supabase/livekit-lifecycle.ts): `src/lib/supabase/livekit-lifecycle.ts`

### Other components

- **Meeting participant**
- **LiveKit service**
- **Supabase**

## Connections

- Meeting participant → Marketing site: visits (evidence: `README.md`)
- Meeting participant → Meeting dashboard: manages meetings
- Meeting participant → Meeting entry: joins meeting
- Meeting participant → Sign-in and signup: authenticates
- Live meeting → Call controls: renders (evidence: `src/components/meeting/participant-meeting.tsx`)
- Live meeting → Meeting stage: renders (evidence: `src/components/meeting/participant-meeting.tsx`)
- Live meeting → Meeting chat: renders (evidence: `src/components/meeting/participant-meeting.tsx`)
- Live meeting → Participant panel: renders (evidence: `src/components/meeting/participant-meeting.tsx`)
- Live meeting → Media preview: renders (evidence: `src/components/meeting/participant-meeting.tsx`)
- Live meeting → Waiting-room controls: renders (evidence: `src/components/meeting/participant-meeting.tsx`)
- Media preview → Session credentials: reads preferences (evidence: `src/components/meeting/prejoin-media-preview.tsx`)
- LiveKit token route → Session credentials: hashes credentials (evidence: `src/app/api/meetings/[code]/livekit-token/route.ts`)
- LiveKit token route → Participant sessions: resolves credentials (evidence: `src/app/api/meetings/[code]/livekit-token/route.ts`)
- LiveKit token route → Supabase server client: queries meeting access (evidence: `src/app/api/meetings/[code]/livekit-token/route.ts`)
- LiveKit token route → Meeting lifecycle: normalizes meeting (evidence: `src/app/api/meetings/[code]/livekit-token/route.ts`)
- LiveKit token route → Waiting-room logic: checks join gate (evidence: `src/app/api/meetings/[code]/livekit-token/route.ts`)
- LiveKit token route → LiveKit service: issues join token (evidence: `README.md`)
- Chat API → Session credentials: hashes credentials (evidence: `src/app/api/meetings/[code]/chat/route.ts`)
- Chat API → Participant sessions: resolves credentials (evidence: `src/app/api/meetings/[code]/chat/route.ts`)
- Chat API → Supabase server client: reads and sends messages (evidence: `src/app/api/meetings/[code]/chat/route.ts`)
- Waiting-room API → Waiting-room logic: uses access logic (evidence: `src/lib/waiting-room.ts`)
- Signup route → Supabase server client: creates account (evidence: `src/app/auth/signup/route.ts`)
- Login route → Supabase server client: signs in (evidence: `src/app/auth/login/route.ts`)
- LiveKit lifecycle webhook → Lifecycle persistence: updates lifecycle (evidence: `src/app/api/livekit/webhook/route.ts`)
- LiveKit lifecycle webhook → LiveKit service: receives events (evidence: `README.md`)
- Lifecycle persistence → Supabase: persists lifecycle
- Supabase server client → Supabase: connects (evidence: `src/lib/supabase/server.ts`)
