System Architecture
This page maps out the full request lifecycle in MeetAI — from a user clicking “Start Meeting” to receiving an AI-generated summary in their dashboard.
High-Level Architecture
Request Lifecycle
1. Meeting Creation
2. Live Meeting — Audio & Transcript Flow
3. Post-Meeting Processing
Component Responsibilities
| Component | Role | Key Files |
|---|---|---|
| Next.js App Router | SSR, API routes, tRPC server | src/app/, src/trpc/ |
| tRPC | Typesafe API layer for all CRUD | src/trpc/routers/ |
| Better Auth | OAuth + email auth, session mgmt | src/lib/auth.ts, src/middleware.ts |
| LiveKit Server SDK | Room creation, token generation | src/lib/stream-video.ts |
| LiveKit Agent | Voice AI pipeline, tool calling | meetai-agent/src/agent.ts |
| Inngest | Event-driven post-meeting processing | src/inngest/functions.ts |
| Drizzle ORM | Typesafe DB queries over Neon | src/db/schema.ts, src/db/index.ts |
| Polar.sh | Subscription billing, premium gating | src/lib/polar.ts |
Data Flow Summary
- Write path: Agent → HTTP POST → Next.js API → Drizzle → Neon (transcript lines batched every 3s)
- Read path: Dashboard → tRPC → Drizzle → Neon → React Server Components
- Real-time path: Agent → LiveKit Data Channel → Browser (live captions, no DB round-trip)
- Async path: LiveKit webhook → Inngest event → Durable function steps → Gemini → Neon
Last updated on