# dundi126/meet-ai architecture

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

- Interactive diagram: https://gitdiagram.com/dundi126/meet-ai
- Repository: https://github.com/dundi126/meet-ai

## Overview

meet.ai is a video-meeting app where authenticated users manage AI agents, schedule meetings, join Stream calls, and review transcripts and summaries. The main flow runs from dashboard pages through typed tRPC procedures to PostgreSQL and Stream; Stream webhooks update meeting state and enqueue post-call processing. The README also documents sign-in, chat, and Polar upgrades. Several UI and integration details are represented at their known module paths because their source was not sampled; edges are limited to sampled references or README-described behavior.

Main entry points: [`src/app/api/webhook/route.ts`](https://github.com/dundi126/meet-ai/blob/main/src/app/api/webhook/route.ts) (Stream webhook), [`src/trpc/routers/_app.ts`](https://github.com/dundi126/meet-ai/blob/main/src/trpc/routers/_app.ts) (Procedure router), [`src/db/index.ts`](https://github.com/dundi126/meet-ai/blob/main/src/db/index.ts) (PostgreSQL data), [`src/modules/meetings/server/procedures.ts`](https://github.com/dundi126/meet-ai/blob/main/src/modules/meetings/server/procedures.ts) (Meeting procedures)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_dashboard["Dashboard pages"]
  node_agent_ui["Agent management"]
  node_meeting_ui["Meeting management"]
  node_call_ui["Call experience"]
  node_auth_ui["Sign-in views"]
end

subgraph group_api["Application API"]
  node_trpc_endpoint["tRPC endpoint<br/>[route.ts]"]
  node_trpc_router["Procedure router<br/>[_app.ts]"]
  node_trpc_runtime["tRPC runtime<br/>[init.ts]"]
  node_meeting_procs["Meeting procedures<br/>[procedures.ts]"]
  node_agent_procs["Agent procedures<br/>[procedures.ts]"]
  node_premium_procs["Premium procedures<br/>[procedures.ts]"]
  node_query_client["Query client<br/>[query-client.ts]"]
end

subgraph group_data["Data and identity"]
  node_database[("PostgreSQL data<br/>[index.ts]")]
  node_schema["Drizzle schema<br/>[schema.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_auth_route["Auth endpoint<br/>[route.ts]"]
end

subgraph group_calls["Calls and processing"]
  node_webhook["Stream webhook<br/>[route.ts]"]
  node_video["Stream Video client<br/>[stream-video.ts]"]
  node_chat["Stream Chat client<br/>[stream-chat.ts]"]
  node_avatar["Avatar generation<br/>[avatar.tsx]"]
  node_inngest_route["Inngest endpoint<br/>[route.ts]"]
  node_inngest_functions["Meeting processing<br/>[functions.ts]"]
  node_inngest_client["Inngest client<br/>[client.ts]"]
  node_openai["OpenAI services"]
  node_stream_service["Stream services"]
end

subgraph group_billing["Subscription billing"]
  node_polar["Polar billing<br/>[polar.ts]"]
  node_polar_service["Polar service"]
end

node_user(("Meeting user"))

node_user -->|"signs in"| node_auth_ui
node_user -->|"manages work"| node_dashboard
node_dashboard -->|"opens agents"| node_agent_ui
node_dashboard -->|"opens meetings"| node_meeting_ui
node_user -->|"joins call"| node_call_ui
node_dashboard -.->|"requests data"| node_trpc_endpoint
node_trpc_endpoint -->|"dispatches"| node_trpc_router
node_trpc_router -->|"registers"| node_meeting_procs
node_trpc_router -->|"registers"| node_agent_procs
node_trpc_router -->|"registers"| node_premium_procs
node_trpc_router -->|"creates router"| node_trpc_runtime
node_trpc_runtime -->|"checks sessions"| node_auth
node_trpc_runtime -->|"counts usage"| node_database
node_trpc_runtime -->|"checks subscription"| node_polar
node_meeting_procs -->|"reads and writes"| node_database
node_meeting_procs -->|"creates call tokens"| node_video
node_meeting_procs -->|"creates chat tokens"| node_chat
node_meeting_procs -->|"generates images"| node_avatar
node_database -.->|"uses schema"| node_schema
node_auth -->|"persists identity"| node_database
node_auth_route -.->|"handles auth requests"| node_auth
node_webhook -->|"verifies events"| node_video
node_webhook -->|"updates meetings"| node_database
node_webhook -->|"sends processing event"| node_inngest_client
node_webhook -->|"requests agent response"| node_openai
node_webhook -->|"sends chat message"| node_chat
node_webhook -->|"generates agent image"| node_avatar
node_stream_service -->|"posts call events"| node_webhook
node_inngest_route -->|"serves functions"| node_inngest_client
node_inngest_route -->|"registers"| node_inngest_functions
node_inngest_functions -->|"processes meetings"| node_database
node_inngest_functions -->|"summarizes calls"| node_openai
node_user -->|"upgrades plan"| node_polar
node_auth -->|"configures checkout"| node_polar
node_polar -.->|"uses billing service"| node_polar_service
node_query_client -.->|"types queries"| node_trpc_router

click node_dashboard "https://github.com/dundi126/meet-ai/tree/main/src/app/(dashboard)"
click node_agent_ui "https://github.com/dundi126/meet-ai/tree/main/src/modules/agents/ui"
click node_meeting_ui "https://github.com/dundi126/meet-ai/tree/main/src/modules/meetings/ui"
click node_call_ui "https://github.com/dundi126/meet-ai/tree/main/src/modules/call/ui"
click node_auth_ui "https://github.com/dundi126/meet-ai/tree/main/src/modules/auth/ui/views"
click node_trpc_endpoint "https://github.com/dundi126/meet-ai/blob/main/src/app/api/trpc/%5Btrpc%5D/route.ts"
click node_trpc_router "https://github.com/dundi126/meet-ai/blob/main/src/trpc/routers/_app.ts"
click node_trpc_runtime "https://github.com/dundi126/meet-ai/blob/main/src/trpc/init.ts"
click node_meeting_procs "https://github.com/dundi126/meet-ai/blob/main/src/modules/meetings/server/procedures.ts"
click node_agent_procs "https://github.com/dundi126/meet-ai/blob/main/src/modules/agents/server/procedures.ts"
click node_premium_procs "https://github.com/dundi126/meet-ai/blob/main/src/modules/premium/server/procedures.ts"
click node_query_client "https://github.com/dundi126/meet-ai/blob/main/src/trpc/query-client.ts"
click node_database "https://github.com/dundi126/meet-ai/blob/main/src/db/index.ts"
click node_schema "https://github.com/dundi126/meet-ai/blob/main/src/db/schema.ts"
click node_auth "https://github.com/dundi126/meet-ai/blob/main/src/lib/auth.ts"
click node_auth_route "https://github.com/dundi126/meet-ai/blob/main/src/app/api/auth/%5B...all%5D/route.ts"
click node_webhook "https://github.com/dundi126/meet-ai/blob/main/src/app/api/webhook/route.ts"
click node_video "https://github.com/dundi126/meet-ai/blob/main/src/lib/stream-video.ts"
click node_chat "https://github.com/dundi126/meet-ai/blob/main/src/lib/stream-chat.ts"
click node_avatar "https://github.com/dundi126/meet-ai/blob/main/src/lib/avatar.tsx"
click node_inngest_route "https://github.com/dundi126/meet-ai/blob/main/src/app/api/inngest/route.ts"
click node_inngest_functions "https://github.com/dundi126/meet-ai/blob/main/src/inngest/functions.ts"
click node_inngest_client "https://github.com/dundi126/meet-ai/blob/main/src/inngest/client.ts"
click node_polar "https://github.com/dundi126/meet-ai/blob/main/src/lib/polar.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_dashboard,node_agent_ui,node_meeting_ui,node_call_ui,node_auth_ui,node_user toneBlue
class node_trpc_endpoint,node_trpc_router,node_trpc_runtime,node_meeting_procs,node_agent_procs,node_premium_procs,node_query_client toneAmber
class node_database,node_schema,node_auth,node_auth_route toneMint
class node_webhook,node_video,node_chat,node_avatar,node_inngest_route,node_inngest_functions,node_inngest_client,node_openai,node_stream_service toneRose
class node_polar,node_polar_service toneIndigo
```

## Components

### User experience

- [Dashboard pages](https://github.com/dundi126/meet-ai/tree/main/src/app/(dashboard)): `src/app/(dashboard)`
- [Agent management](https://github.com/dundi126/meet-ai/tree/main/src/modules/agents/ui): `src/modules/agents/ui`
- [Meeting management](https://github.com/dundi126/meet-ai/tree/main/src/modules/meetings/ui): `src/modules/meetings/ui`
- [Call experience](https://github.com/dundi126/meet-ai/tree/main/src/modules/call/ui): `src/modules/call/ui`
- [Sign-in views](https://github.com/dundi126/meet-ai/tree/main/src/modules/auth/ui/views): `src/modules/auth/ui/views`

### Application API

- [tRPC endpoint](https://github.com/dundi126/meet-ai/blob/main/src/app/api/trpc/%5Btrpc%5D/route.ts): `src/app/api/trpc/[trpc]/route.ts`
- [Procedure router](https://github.com/dundi126/meet-ai/blob/main/src/trpc/routers/_app.ts): `src/trpc/routers/_app.ts`
- [tRPC runtime](https://github.com/dundi126/meet-ai/blob/main/src/trpc/init.ts): `src/trpc/init.ts`
- [Meeting procedures](https://github.com/dundi126/meet-ai/blob/main/src/modules/meetings/server/procedures.ts): `src/modules/meetings/server/procedures.ts`
- [Agent procedures](https://github.com/dundi126/meet-ai/blob/main/src/modules/agents/server/procedures.ts): `src/modules/agents/server/procedures.ts`
- [Premium procedures](https://github.com/dundi126/meet-ai/blob/main/src/modules/premium/server/procedures.ts): `src/modules/premium/server/procedures.ts`
- [Query client](https://github.com/dundi126/meet-ai/blob/main/src/trpc/query-client.ts): `src/trpc/query-client.ts`

### Data and identity

- [PostgreSQL data](https://github.com/dundi126/meet-ai/blob/main/src/db/index.ts): `src/db/index.ts`
- [Drizzle schema](https://github.com/dundi126/meet-ai/blob/main/src/db/schema.ts): `src/db/schema.ts`
- [Authentication](https://github.com/dundi126/meet-ai/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Auth endpoint](https://github.com/dundi126/meet-ai/blob/main/src/app/api/auth/%5B...all%5D/route.ts): `src/app/api/auth/[...all]/route.ts`

### Calls and processing

- [Stream webhook](https://github.com/dundi126/meet-ai/blob/main/src/app/api/webhook/route.ts): `src/app/api/webhook/route.ts`
- [Stream Video client](https://github.com/dundi126/meet-ai/blob/main/src/lib/stream-video.ts): `src/lib/stream-video.ts`
- [Stream Chat client](https://github.com/dundi126/meet-ai/blob/main/src/lib/stream-chat.ts): `src/lib/stream-chat.ts`
- [Avatar generation](https://github.com/dundi126/meet-ai/blob/main/src/lib/avatar.tsx): `src/lib/avatar.tsx`
- [Inngest endpoint](https://github.com/dundi126/meet-ai/blob/main/src/app/api/inngest/route.ts): `src/app/api/inngest/route.ts`
- [Meeting processing](https://github.com/dundi126/meet-ai/blob/main/src/inngest/functions.ts): `src/inngest/functions.ts`
- [Inngest client](https://github.com/dundi126/meet-ai/blob/main/src/inngest/client.ts): `src/inngest/client.ts`
- **OpenAI services**
- **Stream services**

### Subscription billing

- [Polar billing](https://github.com/dundi126/meet-ai/blob/main/src/lib/polar.ts): `src/lib/polar.ts`
- **Polar service**

### Other components

- **Meeting user**

## Connections

- Meeting user → Sign-in views: signs in (evidence: `README.md`)
- Meeting user → Dashboard pages: manages work (evidence: `README.md`)
- Dashboard pages → Agent management: opens agents (evidence: `src/app/(dashboard)/agents/page.tsx`)
- Dashboard pages → Meeting management: opens meetings (evidence: `src/app/(dashboard)/meetings/page.tsx`)
- Meeting user → Call experience: joins call (evidence: `README.md`)
- Dashboard pages → tRPC endpoint: requests data
- tRPC endpoint → Procedure router: dispatches (evidence: `src/app/api/trpc/[trpc]/route.ts`)
- Procedure router → Meeting procedures: registers (evidence: `src/trpc/routers/_app.ts`)
- Procedure router → Agent procedures: registers (evidence: `src/trpc/routers/_app.ts`)
- Procedure router → Premium procedures: registers (evidence: `src/trpc/routers/_app.ts`)
- Procedure router → tRPC runtime: creates router (evidence: `src/trpc/routers/_app.ts`)
- tRPC runtime → Authentication: checks sessions (evidence: `src/trpc/init.ts`)
- tRPC runtime → PostgreSQL data: counts usage (evidence: `src/trpc/init.ts`)
- tRPC runtime → Polar billing: checks subscription (evidence: `src/trpc/init.ts`)
- Meeting procedures → PostgreSQL data: reads and writes (evidence: `src/modules/meetings/server/procedures.ts`)
- Meeting procedures → Stream Video client: creates call tokens (evidence: `src/modules/meetings/server/procedures.ts`)
- Meeting procedures → Stream Chat client: creates chat tokens (evidence: `src/modules/meetings/server/procedures.ts`)
- Meeting procedures → Avatar generation: generates images (evidence: `src/modules/meetings/server/procedures.ts`)
- PostgreSQL data → Drizzle schema: uses schema
- Authentication → PostgreSQL data: persists identity (evidence: `src/lib/auth.ts`)
- Auth endpoint → Authentication: handles auth requests
- Stream webhook → Stream Video client: verifies events (evidence: `src/app/api/webhook/route.ts`)
- Stream webhook → PostgreSQL data: updates meetings (evidence: `src/app/api/webhook/route.ts`)
- Stream webhook → Inngest client: sends processing event (evidence: `src/app/api/webhook/route.ts`)
- Stream webhook → OpenAI services: requests agent response (evidence: `src/app/api/webhook/route.ts`)
- Stream webhook → Stream Chat client: sends chat message (evidence: `src/app/api/webhook/route.ts`)
- Stream webhook → Avatar generation: generates agent image (evidence: `src/app/api/webhook/route.ts`)
- Stream services → Stream webhook: posts call events (evidence: `README.md`)
- Inngest endpoint → Inngest client: serves functions (evidence: `src/app/api/inngest/route.ts`)
- Inngest endpoint → Meeting processing: registers (evidence: `src/app/api/inngest/route.ts`)
- Meeting processing → PostgreSQL data: processes meetings (evidence: `src/inngest/functions.ts`)
- Meeting processing → OpenAI services: summarizes calls (evidence: `README.md`)
- Meeting user → Polar billing: upgrades plan (evidence: `README.md`)
- Authentication → Polar billing: configures checkout (evidence: `src/lib/auth.ts`)
- Polar billing → Polar service: uses billing service
- Query client → Procedure router: types queries
