As part of our commitment to social responsibility, Shilaavinyaas is offering free authentic Vaastu gridding and personalized Horoscope generation with Astakavarga charts, all available online for you to generate by yourself. Experience the power of traditional 81 Pad Vinyas methods and align your spaces with true Vaastu principles — at no cost.

Create My 81 Pad Vinyas

Search

The Rise of Open Source AI Communication Platforms (Build your Own WhatsApp CRM + Voice AI Ecosystem)

  • Share this:
The Rise of Open Source AI Communication Platforms (Build your Own WhatsApp CRM + Voice AI Ecosystem)

How Developers Can Build Their Own WhatsApp CRM + Voice AI Ecosystem Without Vendor Lock-In

The AI communication revolution has quietly entered a new phase.

For years, businesses depended on expensive SaaS platforms for:

  • WhatsApp automation
  • AI calling agents
  • CRM workflows
  • Voice bots
  • Customer engagement systems

Every month, companies paid:

  • WhatsApp API fees
  • Voice AI platform charges
  • Per-minute calling costs
  • LLM usage fees
  • Additional platform subscription fees

And despite spending heavily, organizations still did not truly own their infrastructure.

Now that is changing.

Two emerging open-source platforms are reshaping the ecosystem:

  1. Open-source WhatsApp CRM & Automation Platform
  2. Dograh, an open-source Voice AI orchestration platform

Together, these platforms represent something much bigger:

A fully self-hosted AI communication stack where organizations control:

  • their workflows,
  • their data,
  • their AI models,
  • their infrastructure,
  • and their long-term costs.

The Problem With Traditional AI Communication Platforms

Most businesses today use platforms like:

  • Vapi
  • Bland
  • Retell
  • Twilio workflows
  • Proprietary WhatsApp CRMs

These tools are fast to start with.

But over time, companies face several major challenges:

ProblemImpact
Rising subscription costsIncreasing operational expenses
Vendor lock-inDifficult migration
Limited customizationRestricted workflows
Black-box debuggingHard to identify failures
Platform dependencyRisk of pricing or policy changes
Limited infrastructure controlCompliance concerns
Scaling costsExponential pricing

Modern AI systems are no longer simple chatbots.

They are:

  • real-time systems,
  • event-driven platforms,
  • conversational orchestration engines,
  • multi-provider integrations,
  • API-driven workflow ecosystems.

And businesses increasingly want ownership.

Open Source WhatsApp CRM & AI Voice Revolution

Below is a novice-friendly step-by-step implementation guide combining both platforms:

  1. Open-source WhatsApp CRM
  2. Dograh Open-source Voice AI Platform

These steps are written so even a fresher can follow and develop a working prototype.

Part 1: Build Open-source WhatsApp CRM

A. Prerequisites

Install these first:

ToolPurpose
Node.jsRun the CRM project
npmInstall packages
GitClone GitHub project
Antigravity / VS CodeCode editor
Supabase accountDatabase + authentication
Meta Developer accountWhatsApp API
ngrokTest webhook locally
GitHub accountPush code for deployment

 

B. Project Setup

Step 1: Clone GitHub Repository

Open terminal:

 
git clone <github-repo-url>
 

Example:

 
git clone https://github.com/your-repo/wacrm.git
 

Go inside project folder:

 
cd wacrm
 

Step 2: Install Dependencies

 
npm install
 

This installs all required Node.js packages.

Step 3: Open Project in Antigravity IDE

  1. Open Antigravity IDE
  2. Click Open Folder
  3. Select wacrm folder
  4. Click Trust Project

Step 4: Create .env.local

Run:

 
cp .env.example .env.local
 

For Windows:

 
copy .env.example .env.local
 

Open .env.local.

You will later fill values like:

 
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
META_APP_SECRET=
ENCRYPTION_KEY=
 

C. Supabase Setup

Step 5: Create Supabase Project

  1. Go to Supabase
  2. Login
  3. Click New Project
  4. Enter:
    • Project name
    • Database password
  5. Click Create Project

Step 6: Copy Supabase Keys

Go to:

 
Project Settings → API
 

Copy:

 
NEXT_PUBLIC_SUPABASE_URL=your_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
 

Paste them in .env.local.

Important: Never share SUPABASE_SERVICE_ROLE_KEY.

Step 7: Run Database Migrations

In project, open:

 
supabase/migrations/
 

You will see multiple SQL files.

For each SQL file:

  1. Open file in Antigravity
  2. Copy full SQL
  3. Go to Supabase
  4. Open SQL Editor
  5. Paste SQL
  6. Click Run

Run files in order:

 
001 → 002 → 003 → ... last file
 

This creates CRM database tables.

Step 8: Generate Encryption Key

Run:

 
openssl rand -base64 32
 

Copy output and paste in .env.local:

 
ENCRYPTION_KEY=generated_key_here
 

Step 9: Start CRM Locally

Run:

 
npm run dev
 

Open browser:

 
http://localhost:3000
 

If port is busy, it may run on:

 
http://localhost:3003
 

Step 10: Disable Email Confirmation

In Supabase:

 
Authentication → Providers → Email
 

Disable:

 
Confirm Email
 

Save changes.

Step 11: Create CRM User

Open CRM URL.

Click:

 
Create Account
 

Enter:

  • Name
  • Email
  • Password

Now login to CRM dashboard.

D. Meta WhatsApp API Setup

Step 12: Create Meta Developer App

Go to:

 
developers.facebook.com
 

Steps:

  1. Login
  2. Click Create App
  3. Select Connect with customers through WhatsApp
  4. Give app name
  5. Select business portfolio
  6. Click Create App

Step 13: Get WhatsApp Details

Inside Meta app:

 
WhatsApp → API Setup
 

Copy:

FieldUse
Phone Number IDSend WhatsApp messages
WhatsApp Business Account IDBusiness account mapping
Temporary Access TokenTesting only

Step 14: Test Message from Meta

In Meta API Setup:

  1. Add recipient phone number
  2. Verify OTP
  3. Click Send Message

If WhatsApp message comes, Meta setup is working.

E. Create Permanent Access Token

Step 15: Go to Meta Business Settings

Open:

 
business.facebook.com
 

Go to:

 
Business Settings → Users → System Users
 

Step 16: Create System User

  1. Click Add
  2. Enter system user name
  3. Select type: Admin
  4. Click Create System User

Step 17: Assign Assets

Assign:

  1. Meta App
  2. WhatsApp Account

Give:

 
Full Control
 

Step 18: Generate Permanent Token

Click:

 
Generate Token
 

Select app.

Set expiry:

 
Never
 

Select permissions:

 
whatsapp_business_management
whatsapp_business_messaging
business_management
 

Copy token.

F. Configure CRM WhatsApp Settings

In CRM dashboard, go to:

 
Settings → WhatsApp Config
 

Enter:

 
Permanent Access Token
Phone Number ID
WhatsApp Business Account ID
Webhook Verify Token
 

Example verify token:

 
my_secure_verify_token_123
 

Save.

G. Add Meta App Secret

In Meta Developer Portal:

 
App Settings → Basic
 

Copy:

 
App Secret
 

Paste in .env.local:

 
META_APP_SECRET=your_app_secret
 

Restart local server:

 
npm run dev
 

H. Webhook Setup Using ngrok

Step 19: Start ngrok

If CRM runs on port 3000:

 
ngrok http 3000
 

If CRM runs on port 3003:

 
ngrok http 3003
 

You will get HTTPS URL like:

 
https://abc123.ngrok-free.app
 

Step 20: Configure Webhook in Meta

Go to:

 
Meta App → WhatsApp → Configuration
 

Callback URL:

 
https://abc123.ngrok-free.app/api/whatsapp/webhook
 

Verify token:

 
same_token_used_in_crm
 

Click:

 
Verify and Save
 

I. Create First WhatsApp Automation

Step 21: Create Contact

In CRM:

 
Contacts → Add Contact
 

Enter:

  • Name
  • Mobile number with country code
  • Email
  • Company

Save.

Step 22: Create Automation

Go to:

 
Automations → Create Automation
 

Trigger:

 
New message received
 

Condition:

 
Message contains keyword
 

Keyword:

 
Astro
 

Action:

 
Send Message
 

Message:

 
Hi, thanks for contacting Astro.
 

Set automation:

 
Active
 

Save.

Step 23: Test WhatsApp Automation

From your test WhatsApp number, send:

 
Hi Astro
 

Expected reply:

 
Hi, thanks for contacting Astro.
 

Now your WhatsApp CRM automation is working.

Part 2: Build Dograh Voice AI Platform

Dograh is an open-source alternative to hosted voice AI platforms like Vapi, Bland, and Retell. It allows developers to self-host voice AI agents with workflows, tracing, recordings, and API calls.

A. Prerequisites

Install:

ToolPurpose
GitClone Dograh
DockerRun containers
Docker ComposeStart full app stack
BrowserAccess Dograh UI
LLM API keyAI response generation
STT providerSpeech-to-text
TTS providerText-to-speech
Phone providerCall handling

B. Dograh Setup

Step 1: Clone Dograh Repository

 
git clone <dograh-github-repo-url>
 

Go inside folder:

 
cd dograh
 

Step 2: Start Dograh with Docker

Run:

 
docker compose up
 

or:

 
docker-compose up
 

Wait until all containers are running.

Step 3: Open Dograh UI

Open browser:

 
http://localhost:<dograh-port>
 

The exact port depends on project configuration.

Common examples:

 
http://localhost:3000
http://localhost:8080
 

C. Create Voice AI Agent

Step 4: Create New Agent

Inside Dograh UI:

  1. Click Create Agent
  2. Give name:
 
Lead Qualification Agent
 
  1. Select voice provider
  2. Select speech-to-text provider
  3. Select LLM provider

Step 5: Add Prompt Node

Create first prompt:

 
You are a polite AI sales assistant. Your job is to qualify inbound leads. Ask the caller what they want to build, their company size, industry, budget, and timeline.
 

Step 6: Add Qualification Questions

Create flow:

StepQuestion
1What are you looking to build?
2What is your company name?
3What is your company size?
4What is your expected monthly call volume?
5What is your budget?
6When do you want to start?

Step 7: Add API Tool Call

Create API tool:

 
Create or Update Lead in CRM
 

Example API:

 
POST https://your-crm.com/api/leads
 

Payload:

 
{
  "name": "{{caller_name}}",
  "company": "{{company_name}}",
  "industry": "{{industry}}",
  "budget": "{{budget}}",
  "requirement": "{{requirement}}",
  "call_volume": "{{call_volume}}"
}
 

Step 8: Add Branch Logic

Create condition:

 
If budget is high and requirement is clear
 

Then:

 
Transfer to human sales team
 

Else:

 
Save lead and send follow-up message
 

Step 9: Add Human Transfer

Transfer condition:

 
Qualified Lead = Yes
 

Action:

 
Transfer Call
 

Transfer number:

 
+91XXXXXXXXXX
 

D. Test Dograh Voice Agent

Step 10: Run Test Call

Inside Dograh:

  1. Click Test Call
  2. Speak as customer:
 
We are looking for an AI phone agent for inbound demo requests.
 

AI should ask follow-up questions.

Step 11: Verify Runtime Logs

After call, check:

SectionWhat to Check
TranscriptWhat caller said
TraceEach AI decision
Tool CallCRM API success/failure
State ChangesCaptured variables
RecordingFull call recording

This helps debug voice AI properly.

Part 3: Combine WhatsApp CRM + Dograh Voice AI

Now the powerful part.

You can connect both systems into one communication ecosystem.


A. Combined Architecture

 
Customer
   |
   | WhatsApp Message / Phone Call
   |
-----------------------------------------
|        AI Communication Layer          |
-----------------------------------------
| WhatsApp CRM       | Dograh Voice AI   |
| Meta API           | STT + LLM + TTS   |
| Automation Engine  | Voice Workflow    |
-----------------------------------------
   |
   | API Calls
   |
-----------------------------------------
| CRM / ERP / HMIS / HRMS / Synth Ed     |
-----------------------------------------
   |
   | Database
   |
-----------------------------------------
| Supabase / PostgreSQL / MySQL          |
-----------------------------------------
 

B. Example Combined Flow

Scenario: Admission Inquiry

  1. Parent sends WhatsApp:
 
I want admission details
 
  1. WhatsApp CRM auto replies:
 
Thank you. Our AI counselor can call you. Please share preferred time.
 
  1. Parent replies:
 
Call now
 
  1. CRM calls Dograh API:
 
Start voice call
 
  1. Dograh AI asks:
    • Student class
    • Location
    • Board preference
    • Budget
    • Transport need
  2. Dograh updates CRM lead.
  3. Qualified lead is assigned to admission counselor.

C. Example Healthcare Flow

  1. Patient sends WhatsApp:
 
Need appointment with dentist
 
  1. CRM captures mobile number.
  2. Dograh voice agent calls patient.
  3. AI asks:
    • Symptoms
    • Preferred date
    • Doctor preference
    • Emergency or routine
  4. API creates appointment in HMIS.
  5. WhatsApp CRM sends confirmation.

Final Learning Outcome

You will learn:

  • Git cloning
  • Node.js project setup
  • Environment variables
  • Supabase database setup
  • SQL migration execution
  • Meta WhatsApp API setup
  • Webhook configuration
  • ngrok tunneling
  • Docker Compose
  • Voice AI workflow creation
  • API tool calling
  • CRM integration
  • Basic AI automation architecture
Dr Vinaayak Singh

Dr Vinaayak Singh

Dr. Vinaayak Singh is deeply passionate about Vaastu and has dedicated his journey to exploring its profound connection with Astrology and Numerology. By weaving these sciences together, he brings a holistic perspective that not only preserves ancient wisdom but also makes it practical and relevant for modern living. His work reflects a unique blend of tradition and innovation, helping individuals and spaces align with cosmic harmony. To receive his guidance, drop a WhatsApp text at +91 98672 56452.

Leave a comment

Your email address will not be published. Email is optional. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Your experience on this site will be improved by allowing cookies Cookie Policy