System Architecture
TalkifAI is composed of four independently deployed services:Services
TalkifAI Studio
Main Next.js app — dashboard, agent builder, auth, API endpoints.
Voice Agent Runtime
Python service running the actual voice agents on LiveKit.
Billing Service
FastAPI service managing credits, usage, and payments.
Security
Authentication, encryption, and multi-tenant isolation.
Database Architecture
All services share a PostgreSQL database (Neon serverless) via Prisma ORM. Key tables:| Table | Purpose |
|---|---|
user | User accounts |
organization | Tenant workspaces |
member | User-org relationships + roles |
Agent | Voice agent configurations |
PhoneNumber | BYOC phone numbers |
CarrierCredentials | Encrypted SIP credentials |
UserVoiceSession | Call session records |
DeveloperQuota | Monthly usage limits |
ApiKeys | Organization API keys (encrypted) |
CustomFunction | Custom webhook functions |
PostCallAnalysisForm | QA form definitions |
Infrastructure
| Component | Technology | Hosting |
|---|---|---|
| Studio Frontend/Backend | Next.js 15 | Vercel |
| Voice Agent Runtime | Python + FastAPI | Google Cloud VM |
| Billing Service | Python + FastAPI | Google Cloud Run |
| Database | PostgreSQL (Neon) | Neon Cloud |
| Cache | Redis | Google Cloud Memorystore |
| Recordings | GCS Buckets | Google Cloud Storage |
| LiveKit Server | LiveKit Cloud | LiveKit Cloud |
| Status Page | BetterStack | BetterStack |
Scale Characteristics
| Metric | Value |
|---|---|
| LiveKit rooms per node | 3,000 |
| Participants per node | 6,000 |
| Concurrent users (horizontal) | 10,000+ |
| Batch calls per day | 100,000+ |
| DB connection pool | 5 (Neon limit) |
| Redis cache TTL | 30 seconds (credits) |