The Problem

Enterprises that want on‑demand AI assistants must stitch together authentication, database, AI APIs, and real‑time video/chat. Doing this from scratch costs weeks of engineering and introduces security gaps.

What This Does

meetai delivers a production‑ready stack that lets a user create an AI “agent”, schedule a meeting, and run a live AI‑powered assistant during the call. Core features live in the src folder:

  • Authentication – src/app/(auth)/* and src/lib/auth.ts use BetterAuth for magic‑link, social logins, and TOTP 2FA.
  • Agent & Meeting Management – UI components under src/modules/agents/ui and src/modules/meetings/ui interact with Drizzle ORM schemas (src/db/schema.ts) via TRPC procedures (src/modules/*/server/procedures.ts).
  • AI Services – src/lib/email/templates/*.ts and src/lib/stream‑chat.tsx call OpenAI (GPT‑4o) and Stream.io.
  • Background Jobs – Inngest functions (src/inngest/functions.ts) handle email delivery and post‑meeting summarisation.

The app is built with Next.js 15 (App Router), TypeScript, Tailwind CSS, and React Hook Form + Zod for validation.

How It Is Wired

Execution starts at the Next.js server entry defined in next.config.ts. A request to /api/trpc/[trpc] is handled by src/app/api/trpc/[trpc]/route.ts, which creates a TRPC router (src/trpc/*) that forwards calls to module‑level procedures, e.g.:

  • src/modules/agents/server/procedures.ts → src/db/index.ts (Drizzle) → PostgreSQL.
  • src/modules/meetings/server/procedures.ts → src/lib/email/index.ts (nodemailer) → SMTP.

The most connected module is src/modules/meetings/types (imported by 8 other files, no outgoing imports), making it a low‑risk data definition hub. Conversely, src/modules/meetings/ui/views/meeting-id-view imports 7 UI components, giving it an instability of 1 (high blast radius). The largest single file, src/components/ui/sidebar.tsx (661 LOC), aggregates navigation logic used across dashboard pages, so any change ripples through many routes.

Deep nesting appears in src/modules/agents/ui/components/agent-form.tsx and src/modules/meetings/ui/components/meeting-form.tsx where indentation reaches ten levels, making the control flow hard to trace. Repeated 6‑line blocks are present across auth and dashboard pages, indicating missing shared helpers.

How To Use It

# Clone the exact repo
git clone https://github.com/moses-y/meetai.git
cd meetai

# Install dependencies (npm is declared in package.json)
npm install

# Copy example environment and fill required keys
cp .env.example .env
# Edit .env: DATABASE_URL, OPENAI_API_KEY, STREAM_API_KEY, POLAR_API_KEY, etc.

# Apply database schema (Drizzle ORM)
npx drizzle-kit push

# Start the dev server
npm run dev

The dev server runs on http://localhost:3000. Authentication routes live under /auth/*, dashboard under /dashboard/*, and live calls under /call/[meetingId].

Real‑World Use

A SaaS provider could embed this repo as a white‑label meeting assistant. After configuring their own OpenAI and Stream keys, they would ship a branded version where each customer creates agents that automatically summarise calls and store transcripts in the provider’s PostgreSQL instance.

Code Health & Issues

  • Critical – next@15.3.2 is pinned to a version with a critical advisory (GHSA‑9qr9‑h5gf‑34mp). Upgrade to the patched release.
  • High – No LICENSE file; redistribution rights are undefined. Add MIT/Apache‑2.0.
  • High – No test suite. Introduce unit/integration tests for public entry points (src/db/index.ts, src/lib/email/index.ts).
  • High – No CI workflow. Add a GitHub Actions pipeline that runs npm run lint && npm run build && npm test.
  • Medium – Dependabot not configured. Add .github/dependabot.yml for npm and GitHub Actions.
  • Low – Repository conventions missing (.editorconfig, .gitattributes, formatter config). Add them to enforce consistent style.

Additional technical debt: deep nesting in agent/meeting forms, duplicated auth page logic, and an oversized sidebar.tsx component. Refactoring these will reduce cognitive load and lower the risk of regressions.

The Bottom Line

meetai offers a fully integrated AI meeting platform with modern Next.js and TypeScript tooling, but it ships with critical security, testing, and maintainability gaps. It is suitable for teams that can allocate effort to upgrade dependencies, add CI/CD, and refactor the identified high‑complexity modules before production use.