CallCenter IA
The Ultimate Next.js AI Voice Agent SaaS Boilerplate
CallCenter IA is a premium, production-ready Next.js 15 template designed to build, manage, and scale AI Voice Agents. Inspired by industry leaders like Vapi.ai and Retell AI, it gives you a massive head start in the fastest-growing SaaS niche.
This is a functional-first UI boilerplate. Every screen, interaction, and animation is crafted to look and feel like a high-end, production-ready SaaS. The BYOK (Bring Your Own Key) architecture lets your users connect their own AI and telephony providers instantly.
Key Highlights
- Live Call Monitoring with real-time transcripts and "Barge-In" capability
- Advanced Prompt Builder with split-screen editor and live simulator
- Embeddable Web Widget generator with live preview
- Webhooks & Automations engine for CRM sync, Slack alerts, and more
- Sentiment Analysis Timeline with Recharts visualizations
- Knowledge Base (RAG) with PDF upload and web crawling
- Voice Cloning interface (ElevenLabs-style)
- Cinematic Marketing Pages with Framer Motion animations
- Interactive Setup Wizard for guided onboarding
Tech Stack
Requirements
| Dependency | Minimum Version | Notes |
|---|---|---|
Node.js | 20.0+ | LTS recommended. Required for Next.js 15 |
npm | 10.0+ | Bundled with Node.js 20+. pnpm/yarn also supported |
PostgreSQL | 14+ | Required for production. Local or hosted (Neon, Supabase, Railway) |
| Git | 2.30+ | Optional, for version control |
better-sqlite3) without setting up PostgreSQL. Switch to PostgreSQL for production deployments.
Installation
Follow these steps to get CallCenter IA running on your local machine.
Extract the Package
Unzip the downloaded archive to your preferred directory.
unzip callcenter-ia.zip -d callcenter-ia
cd callcenter-ia
Install Dependencies
npm install
Configure Environment Variables
Copy the example env file and fill in your values. See the Configuration section for all available variables.
cp .env.example .env.local
Generate Database Schema
npm run db:generate
Run Database Migrations
npm run db:migrate
Seed Demo Data (Optional)
Populate the database with sample agents, calls, and analytics data.
npm run db:seed
Start Development Server
npm run dev
Open http://localhost:3000 in your browser. You will be redirected to the Setup Wizard on first run.
npm run build followed by npm run start to launch the optimized production server.
Setup Wizard
On first launch, CallCenter IA presents an interactive Setup Wizard at /setup that guides you through the initial configuration. The wizard follows the BYOK (Bring Your Own Key) architecture.
Wizard Steps
Step 1 -- License Verification
Enter your Envato purchase code to verify your license. The application calls /api/verify-license to validate the code before proceeding.
Step 2 -- Database Connection
Configure and test your PostgreSQL connection. The wizard calls /api/setup/test-db to verify connectivity, then /api/setup/migrate to run migrations.
Step 3 -- API Keys (BYOK)
Enter your third-party service keys. All fields are optional and can be configured later from Settings:
- OpenAI -- GPT models for AI agent conversations
- ElevenLabs -- Text-to-speech and voice cloning
- Deepgram -- Speech-to-text transcription
- Twilio -- Phone number provisioning and call routing
- Stripe -- Subscription billing
Step 4 -- Create Admin Account
Set up your initial admin user via /api/setup/create-admin. This account has full access to all dashboard features.
/setup is disabled for security.
Configuration
All configuration is managed through environment variables in .env.local. Below is a complete reference of every supported variable.
Core
| Variable | Description | Example |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | postgresql://user:pass@localhost:5432/callcenter |
BETTER_AUTH_SECRET | Secret key for Better Auth session encryption. Use a random 32+ char string | your-random-secret-key-here |
BETTER_AUTH_URL | Base URL of your application | http://localhost:3000 |
NEXTAUTH_URL | Alias for BETTER_AUTH_URL (compatibility) | http://localhost:3000 |
AI / Voice Providers
| Variable | Description | Required |
|---|---|---|
OPENAI_API_KEY | OpenAI API key for GPT agent conversations | For AI features |
ELEVENLABS_API_KEY | ElevenLabs API key for text-to-speech and voice cloning | For TTS |
DEEPGRAM_API_KEY | Deepgram API key for real-time speech-to-text | For STT |
Telephony
| Variable | Description | Required |
|---|---|---|
TWILIO_ACCOUNT_SID | Twilio Account SID | For phone calls |
TWILIO_AUTH_TOKEN | Twilio Auth Token | For phone calls |
TWILIO_PHONE_NUMBER | Default Twilio phone number | For phone calls |
Payments
| Variable | Description | Required |
|---|---|---|
STRIPE_SECRET_KEY | Stripe secret key for server-side billing operations | For billing |
STRIPE_PUBLISHABLE_KEY | Stripe publishable key for client-side checkout | For billing |
STRIPE_WEBHOOK_SECRET | Stripe webhook signing secret for /api/stripe/webhook | For billing |
Google Calendar
| Variable | Description | Required |
|---|---|---|
GOOGLE_CLIENT_ID | Google OAuth 2.0 client ID | For calendar |
GOOGLE_CLIENT_SECRET | Google OAuth 2.0 client secret | For calendar |
GOOGLE_REDIRECT_URI | OAuth redirect URI | For calendar |
Notifications
| Variable | Description | Required |
|---|---|---|
SLACK_WEBHOOK_URL | Slack Incoming Webhook URL for notifications | Optional |
SLACK_BOT_TOKEN | Slack Bot token for richer integrations | Optional |
Demo Mode
| Variable | Description | Default |
|---|---|---|
DEMO_MODE | Enable demo mode. Set to true to restrict destructive actions | false |
Features
CallCenter IA includes 12+ fully designed dashboard modules, each with interactive UI, animations, and realistic data flows.
Dashboard
Overview with real-time KPIs, call volume charts, agent performance metrics, and recent activity feed. Built with Recharts.
AI Agents
Create and manage AI voice agents. Split-screen prompt builder with personality config, voice settings, and live simulator for testing before deployment.
Call Logs
Detailed call history with audio player, full transcript, sentiment analysis timeline, duration, cost tracking, and disposition tagging.
Phone Numbers
Manage Twilio phone numbers, assign them to agents, configure routing rules, and set up intelligent call forwarding.
Knowledge Base
RAG-powered knowledge management. Upload PDFs, crawl websites, and manage document collections to give your AI agents context.
Campaigns
Outbound calling campaigns with contact list management, scheduling, progress tracking, and performance analytics.
Automations
Visual automation cards for triggering events: sync to CRM on positive sentiment, send Slack alerts on call transfer, and more.
Analytics
Comprehensive analytics dashboards with call volume trends, agent performance comparisons, cost analysis, and sentiment breakdowns.
Calendar
Google Calendar integration for scheduling callbacks, follow-ups, and meetings booked by AI agents during calls.
Webhooks
Configure outbound webhooks to notify external services on call events. Manage endpoints, view delivery logs, and retry failed sends.
Web Widget
Embeddable "Call with AI" button generator. Customize colors, text, position with a live side-by-side preview. Single line of code to embed.
Live Calls
Real-time call monitoring with animated typing indicators, live transcripts, and the signature "Barge-In" button to take over from the AI.
Marketing Pages
The template includes a fully modular marketing site with Framer Motion animations:
/-- Landing page with hero, features, and social proof/pricing-- Three-tier pricing table/about-- Company and team page/features-- Detailed feature showcase/blog-- Blog listing page/developers-- API documentation portal/contact-- Contact form/careers,/privacy,/terms,/cookies-- Legal and careers pages
Integrations
Twilio (Telephony)
Twilio powers phone number provisioning, inbound/outbound calling, and call recording.
- Create a Twilio account and note your Account SID and Auth Token
- Purchase a phone number from the Twilio console
- Set the Voice webhook URL to
https://yourdomain.com/api/twilio/webhook(HTTP POST) - Add
TWILIO_ACCOUNT_SID,TWILIO_AUTH_TOKEN, andTWILIO_PHONE_NUMBERto your.env.local
OpenAI (Conversation AI)
OpenAI GPT models power the AI agent conversations, generating context-aware responses in real-time.
- Get an API key from platform.openai.com
- Set
OPENAI_API_KEYin your environment - Configure model selection per-agent in the Agents dashboard (GPT-4o recommended)
ElevenLabs (Text-to-Speech)
ElevenLabs provides ultra-realistic voice synthesis and custom voice cloning.
- Sign up at elevenlabs.io
- Copy your API key from Profile > API Keys
- Set
ELEVENLABS_API_KEYin your environment - Use the Voice Cloning page to create and manage custom voices
Deepgram (Speech-to-Text)
Deepgram provides real-time speech recognition for live call transcription.
- Create an account at deepgram.com
- Generate an API key from the Deepgram console
- Set
DEEPGRAM_API_KEYin your environment
Stripe (Billing)
Stripe handles subscription billing, plan management, and payment processing.
- Create a Stripe account
- Get your keys from Developers > API Keys
- Set
STRIPE_SECRET_KEY,STRIPE_PUBLISHABLE_KEYin your environment - Create a webhook endpoint pointing to
https://yourdomain.com/api/stripe/webhook - Set
STRIPE_WEBHOOK_SECRETfrom the webhook signing secret
Google Calendar
Enables AI agents to book meetings and callbacks directly into Google Calendar.
- Create a project in Google Cloud Console
- Enable the Google Calendar API
- Create OAuth 2.0 credentials (Web application type)
- Set
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET, andGOOGLE_REDIRECT_URI
Slack (Notifications)
Receive real-time notifications about calls, transfers, and alerts in Slack.
- Create a Slack App at api.slack.com/apps
- Enable Incoming Webhooks and copy the webhook URL
- Set
SLACK_WEBHOOK_URLin your environment - Optionally configure a Bot Token for richer integrations via
SLACK_BOT_TOKEN
Customization
Theme Customizer
The application uses shadcn/ui with CSS custom properties for theming. The dark theme is defined in src/app/globals.css under the .dark class.
Key design tokens you can modify:
.dark {
--background: oklch(0.145 0 0); /* zinc-950 */
--card: oklch(0.205 0 0); /* zinc-900 */
--primary: oklch(0.922 0 0); /* zinc-200 */
--accent: oklch(0.269 0 0); /* zinc-800 */
--sidebar-primary: oklch(0.488 0.243 264.376); /* indigo */
--border: oklch(1 0 0 / 10%); /* subtle white */
}
Branding
- Logo: Replace the SVG in the sidebar layout component at
src/app/(dashboard)/layout/ - Favicon: Replace
src/app/favicon.ico - Fonts: Custom fonts are loaded in
src/app/layout.tsx. The theme uses the system font stack by default - Colors: Modify CSS custom properties in
globals.cssto change the accent color scheme
Adding Pages
The application uses the Next.js App Router. To add a new dashboard page:
// Create a new file at:
src/app/(dashboard)/your-page/page.tsx
export default function YourPage() {
return (
<div className="p-6">
<h1>Your New Page</h1>
</div>
)
}
The page automatically inherits the dashboard layout with sidebar navigation. Add a navigation link in the sidebar component to make it accessible.
Adding Marketing Pages
Marketing pages live under src/app/(marketing)/ and inherit the marketing layout with the public header and footer.
Deployment
Vercel (Recommended)
Vercel is the recommended deployment platform for Next.js applications.
- Push your project to a Git repository (GitHub, GitLab, or Bitbucket)
- Import the project in vercel.com
- Add all environment variables from
.env.localin the Vercel dashboard - Set the build command to
npm run build(default) - Deploy. Vercel handles SSL, CDN, and edge functions automatically
BETTER_AUTH_URL matches your Vercel production domain. Update webhook URLs for Twilio and Stripe to use the production domain.
VPS with PM2 + Nginx
For self-hosted deployments on a VPS (Ubuntu/Debian):
# 1. Install Node.js 20+ and PM2
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt install -y nodejs
sudo npm install -g pm2
# 2. Clone/upload your project
cd /var/www/callcenter-ia
# 3. Install dependencies and build
npm install
npm run build
# 4. Start with PM2
pm2 start npm --name "callcenter-ia" -- start
pm2 save
pm2 startup
Nginx Reverse Proxy
server {
listen 443 ssl;
server_name yourdomain.com;
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Docker
# Dockerfile
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine AS runner
WORKDIR /app
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["npm", "start"]
# Build and run
docker build -t callcenter-ia .
docker run -p 3000:3000 --env-file .env.local callcenter-ia
Demo Mode
Demo Mode allows you to showcase the application without exposing real data or allowing destructive actions.
Enable / Disable
# .env.local
DEMO_MODE=true # Enable demo mode
DEMO_MODE=false # Disable demo mode (default)
What Demo Mode Restricts
| Action | Behavior in Demo Mode |
|---|---|
| Create / Edit / Delete agents | Blocked with notification |
| Make outbound calls | Blocked |
| Purchase phone numbers | Blocked |
| Modify API keys | Blocked |
| Delete knowledge base documents | Blocked |
| Change billing / subscription | Blocked |
| View dashboard, analytics, call logs | Fully accessible with sample data |
| Navigate all pages | Fully accessible |
| Setup Wizard | Disabled |
npm run db:seed before enabling demo mode to populate the dashboard with realistic sample data.
API Reference
CallCenter IA exposes the following API routes under /api. All authenticated routes require a valid session cookie from Better Auth.
Authentication
| Method | Endpoint | Description |
|---|---|---|
ALL | /api/auth/* | Better Auth catch-all handler (login, register, session, logout) |
Agents
| Method | Endpoint | Description |
|---|---|---|
GET | /api/agents | List all agents |
POST | /api/agents | Create a new agent |
GET | /api/agents/:id | Get agent by ID |
PUT | /api/agents/:id | Update agent |
DELETE | /api/agents/:id | Delete agent |
Calls
| Method | Endpoint | Description |
|---|---|---|
GET | /api/calls | List call logs with pagination and filters |
POST | /api/calls | Initiate an outbound call |
GET | /api/calls/:id | Get call details, transcript, and sentiment data |
DELETE | /api/calls/:id | Delete a call record |
Phone Numbers
| Method | Endpoint | Description |
|---|---|---|
GET | /api/numbers | List provisioned phone numbers |
POST | /api/numbers | Provision a new phone number via Twilio |
Knowledge Base
| Method | Endpoint | Description |
|---|---|---|
GET | /api/knowledge | List knowledge base documents |
POST | /api/knowledge | Upload a document or crawl a URL |
Campaigns
| Method | Endpoint | Description |
|---|---|---|
GET | /api/campaigns | List campaigns |
POST | /api/campaigns | Create a new outbound campaign |
Automations
| Method | Endpoint | Description |
|---|---|---|
GET | /api/automations | List automation rules |
POST | /api/automations | Create a new automation |
Webhooks
| Method | Endpoint | Description |
|---|---|---|
GET | /api/webhooks | List configured webhooks |
POST | /api/webhooks | Register a new webhook endpoint |
Incoming Webhooks
| Method | Endpoint | Description |
|---|---|---|
POST | /api/twilio/webhook | Twilio voice webhook handler |
POST | /api/stripe/webhook | Stripe payment webhook handler |
Export
| Method | Endpoint | Description |
|---|---|---|
GET | /api/export/calls | Export call logs as CSV |
GET | /api/export/campaigns | Export campaign data as CSV |
Setup
| Method | Endpoint | Description |
|---|---|---|
POST | /api/verify-license | Verify Envato purchase code |
POST | /api/setup/test-db | Test database connection |
POST | /api/setup/migrate | Run database migrations |
POST | /api/setup/create-admin | Create initial admin account |
Changelog
v1.0.0 -- Initial Release
April 2026
- Complete SaaS dashboard with 12+ modules (Agents, Calls, Numbers, Knowledge, Campaigns, Automations, Analytics, Calendar, Webhooks, Widget, Live Calls)
- Interactive Setup Wizard with BYOK architecture
- Cinematic marketing site with 10+ pages and Framer Motion animations
- Full authentication system with Better Auth
- Drizzle ORM with PostgreSQL support and seed scripts
- Integration-ready architecture for Twilio, OpenAI, ElevenLabs, Deepgram, Stripe, Google Calendar, and Slack
- Live Call Monitoring with "Barge-In" capability
- Sentiment Analysis Timeline with Recharts
- Embeddable Web Widget generator
- RESTful API with export endpoints
- Demo Mode for safe showcasing
- Dark theme with zinc-950 base and indigo accents
- Responsive design for mobile and desktop
Support
Getting Help
If you encounter issues or have questions about CallCenter IA:
- Check this documentation -- Most common setup and configuration questions are covered here
- Envato Item Comments -- Post your question on the item page for community and author support
- Email Support -- Contact us through our Envato profile for direct support
Before Contacting Support
Please include the following information to help us resolve your issue faster:
- Your Node.js version (
node -v) - Your operating system
- The full error message or screenshot
- Steps to reproduce the issue
- Your purchase code (for verification)
What Is Included in Support
| Included | Not Included |
|---|---|
| Bug fixes and patches | Custom feature development |
| Installation assistance | Third-party plugin conflicts |
| Documentation clarifications | Hosting or server configuration |
| Configuration guidance | Backend/API implementation beyond the boilerplate |