How joincalldotco/call works
Project Type & Purpose
• Open-source, AI-native, web-based video conferencing platform
• Monorepo with two main applications (web frontend, server backend) and shared packages
High-Level Components
A. Clients
• Browser / PWA on desktop & mobile
• Consumes Next.js app, connects via HTTP(S) & WebSockets
B. Frontend (“apps/web”)
• Next.js 15 (App Router)
• Tailwind CSS, shadcn/ui components
• React Query for server state, Zustand for shared state
• Mediasoup client for real-time media (over WebRTC)
• API routes (Next.js route handlers) for waitlist & other SSR endpoints
C. Backend API (“apps/server”)
• Hono web framework (HTTP + WebSocket handlers)
• Express-style routes: auth, calls, contacts, notifications, room, teams, thoughts
• Mediasoup SFU integration (media relay server)
• Redis (caching, rate limiting)
• Better Auth for authentication (JWT sessions)
• Email notifications (Resend API)
D. Database
• PostgreSQL (Docker-managed)
• Drizzle ORM for schema, migrations, queries
E. Shared Packages (“packages/…”)
• @call/auth – token extraction & auth-client
• @call/db – Drizzle config, schema, type definitions
• @call/ui – shadcn/ui component library
• ESLint & TypeScript configs
F. Infrastructure
• Turborepo (monorepo orchestration)
• Docker Compose (PostgreSQL service)
• Vercel for frontend deployment
• CI/CD via GitHub Actions (implied)
Interactions & Data Flow
1. User opens the Next.js web app (HTTP GET → Vercel CDN)
2. Frontend initializes React Query / Zustand for session and data
3. API calls from browser → Backend Hono server (HTTP REST)
– Authentication endpoints → Better Auth
– CRUD endpoints → PostgreSQL via Drizzle ORM
– Rate limiting → Redis
4. WebSocket (or Socket.IO) connections for real-time events
– Signaling messages for WebRTC setup (via Hono)
– Media streams peer-to-SFU (mediasoup-server.ts)
5. SFU (Mediasoup):
– Receives audio/video from participants
– Forwards media streams appropriately
6. Notifications & Emails
– Backend queues notifications → Email service (Resend)
– Frontend subscribes to notification streams
Architectural Patterns & Principles
• Monorepo with clear workspace boundaries (apps vs. packages)
• Separation of concerns:
• Frontend (UI, state management, media client)
• Backend (API, business logic, SFU, cache)
• Shared (auth, db, UI components)
• Modular routing (Hono) & Next.js App Router
• Scalable SFU pattern (Mediasoup) for video conferencing
• Rate limiting & caching with Redis
• Type-safe throughout (TypeScript, Drizzle, shared types)