v1.0.0

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

Tech Stack

Next.js 15 React 19 Tailwind CSS v4 shadcn/ui Framer Motion Recharts Zustand Drizzle ORM Better Auth PostgreSQL Lucide Icons

Requirements

DependencyMinimum VersionNotes
Node.js20.0+LTS recommended. Required for Next.js 15
npm10.0+Bundled with Node.js 20+. pnpm/yarn also supported
PostgreSQL14+Required for production. Local or hosted (Neon, Supabase, Railway)
Git2.30+Optional, for version control
Tip: For quick local development, you can use SQLite (via 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.

1

Extract the Package

Unzip the downloaded archive to your preferred directory.

unzip callcenter-ia.zip -d callcenter-ia
cd callcenter-ia
2

Install Dependencies

npm install
3

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
4

Generate Database Schema

npm run db:generate
5

Run Database Migrations

npm run db:migrate
6

Seed Demo Data (Optional)

Populate the database with sample agents, calls, and analytics data.

npm run db:seed
7

Start Development Server

npm run dev

Open http://localhost:3000 in your browser. You will be redirected to the Setup Wizard on first run.

Production build: 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:

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.

Important: The Setup Wizard is only available before the initial setup is complete. After creating the admin account, access to /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

VariableDescriptionExample
DATABASE_URLPostgreSQL connection stringpostgresql://user:pass@localhost:5432/callcenter
BETTER_AUTH_SECRETSecret key for Better Auth session encryption. Use a random 32+ char stringyour-random-secret-key-here
BETTER_AUTH_URLBase URL of your applicationhttp://localhost:3000
NEXTAUTH_URLAlias for BETTER_AUTH_URL (compatibility)http://localhost:3000

AI / Voice Providers

VariableDescriptionRequired
OPENAI_API_KEYOpenAI API key for GPT agent conversationsFor AI features
ELEVENLABS_API_KEYElevenLabs API key for text-to-speech and voice cloningFor TTS
DEEPGRAM_API_KEYDeepgram API key for real-time speech-to-textFor STT

Telephony

VariableDescriptionRequired
TWILIO_ACCOUNT_SIDTwilio Account SIDFor phone calls
TWILIO_AUTH_TOKENTwilio Auth TokenFor phone calls
TWILIO_PHONE_NUMBERDefault Twilio phone numberFor phone calls

Payments

VariableDescriptionRequired
STRIPE_SECRET_KEYStripe secret key for server-side billing operationsFor billing
STRIPE_PUBLISHABLE_KEYStripe publishable key for client-side checkoutFor billing
STRIPE_WEBHOOK_SECRETStripe webhook signing secret for /api/stripe/webhookFor billing

Google Calendar

VariableDescriptionRequired
GOOGLE_CLIENT_IDGoogle OAuth 2.0 client IDFor calendar
GOOGLE_CLIENT_SECRETGoogle OAuth 2.0 client secretFor calendar
GOOGLE_REDIRECT_URIOAuth redirect URIFor calendar

Notifications

VariableDescriptionRequired
SLACK_WEBHOOK_URLSlack Incoming Webhook URL for notificationsOptional
SLACK_BOT_TOKENSlack Bot token for richer integrationsOptional

Demo Mode

VariableDescriptionDefault
DEMO_MODEEnable demo mode. Set to true to restrict destructive actionsfalse

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:

Integrations

Twilio (Telephony)

Twilio powers phone number provisioning, inbound/outbound calling, and call recording.

  1. Create a Twilio account and note your Account SID and Auth Token
  2. Purchase a phone number from the Twilio console
  3. Set the Voice webhook URL to https://yourdomain.com/api/twilio/webhook (HTTP POST)
  4. Add TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, and TWILIO_PHONE_NUMBER to your .env.local

OpenAI (Conversation AI)

OpenAI GPT models power the AI agent conversations, generating context-aware responses in real-time.

  1. Get an API key from platform.openai.com
  2. Set OPENAI_API_KEY in your environment
  3. 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.

  1. Sign up at elevenlabs.io
  2. Copy your API key from Profile > API Keys
  3. Set ELEVENLABS_API_KEY in your environment
  4. 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.

  1. Create an account at deepgram.com
  2. Generate an API key from the Deepgram console
  3. Set DEEPGRAM_API_KEY in your environment

Stripe (Billing)

Stripe handles subscription billing, plan management, and payment processing.

  1. Create a Stripe account
  2. Get your keys from Developers > API Keys
  3. Set STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY in your environment
  4. Create a webhook endpoint pointing to https://yourdomain.com/api/stripe/webhook
  5. Set STRIPE_WEBHOOK_SECRET from the webhook signing secret

Google Calendar

Enables AI agents to book meetings and callbacks directly into Google Calendar.

  1. Create a project in Google Cloud Console
  2. Enable the Google Calendar API
  3. Create OAuth 2.0 credentials (Web application type)
  4. Set GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GOOGLE_REDIRECT_URI

Slack (Notifications)

Receive real-time notifications about calls, transfers, and alerts in Slack.

  1. Create a Slack App at api.slack.com/apps
  2. Enable Incoming Webhooks and copy the webhook URL
  3. Set SLACK_WEBHOOK_URL in your environment
  4. 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

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.

  1. Push your project to a Git repository (GitHub, GitLab, or Bitbucket)
  2. Import the project in vercel.com
  3. Add all environment variables from .env.local in the Vercel dashboard
  4. Set the build command to npm run build (default)
  5. Deploy. Vercel handles SSL, CDN, and edge functions automatically
Note: Ensure your 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

ActionBehavior in Demo Mode
Create / Edit / Delete agentsBlocked with notification
Make outbound callsBlocked
Purchase phone numbersBlocked
Modify API keysBlocked
Delete knowledge base documentsBlocked
Change billing / subscriptionBlocked
View dashboard, analytics, call logsFully accessible with sample data
Navigate all pagesFully accessible
Setup WizardDisabled
Tip: Run 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

MethodEndpointDescription
ALL/api/auth/*Better Auth catch-all handler (login, register, session, logout)

Agents

MethodEndpointDescription
GET/api/agentsList all agents
POST/api/agentsCreate a new agent
GET/api/agents/:idGet agent by ID
PUT/api/agents/:idUpdate agent
DELETE/api/agents/:idDelete agent

Calls

MethodEndpointDescription
GET/api/callsList call logs with pagination and filters
POST/api/callsInitiate an outbound call
GET/api/calls/:idGet call details, transcript, and sentiment data
DELETE/api/calls/:idDelete a call record

Phone Numbers

MethodEndpointDescription
GET/api/numbersList provisioned phone numbers
POST/api/numbersProvision a new phone number via Twilio

Knowledge Base

MethodEndpointDescription
GET/api/knowledgeList knowledge base documents
POST/api/knowledgeUpload a document or crawl a URL

Campaigns

MethodEndpointDescription
GET/api/campaignsList campaigns
POST/api/campaignsCreate a new outbound campaign

Automations

MethodEndpointDescription
GET/api/automationsList automation rules
POST/api/automationsCreate a new automation

Webhooks

MethodEndpointDescription
GET/api/webhooksList configured webhooks
POST/api/webhooksRegister a new webhook endpoint

Incoming Webhooks

MethodEndpointDescription
POST/api/twilio/webhookTwilio voice webhook handler
POST/api/stripe/webhookStripe payment webhook handler

Export

MethodEndpointDescription
GET/api/export/callsExport call logs as CSV
GET/api/export/campaignsExport campaign data as CSV

Setup

MethodEndpointDescription
POST/api/verify-licenseVerify Envato purchase code
POST/api/setup/test-dbTest database connection
POST/api/setup/migrateRun database migrations
POST/api/setup/create-adminCreate initial admin account

Changelog

v1.0.0 -- Initial Release

April 2026

Support

Getting Help

If you encounter issues or have questions about CallCenter IA:

  1. Check this documentation -- Most common setup and configuration questions are covered here
  2. Envato Item Comments -- Post your question on the item page for community and author support
  3. 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:

What Is Included in Support

IncludedNot Included
Bug fixes and patchesCustom feature development
Installation assistanceThird-party plugin conflicts
Documentation clarificationsHosting or server configuration
Configuration guidanceBackend/API implementation beyond the boilerplate