# DeskcommCRM

> A self-hosted CRM whose AI agents answer, qualify and sell to customers on WhatsApp, and hand off to a human when they should

- Category: Agents & Automation / Assistants & Chatbots
- Language: TypeScript
- Licence: MIT
- Repository: https://github.com/melgarafael/DeskcommCRM
- Website: https://deskcomm.com.br
- Canonical page: https://ai-tldr.dev/tools/deskcomm-crm/

## In short

DeskcommCRM describes itself as an open-source AI sales operating system for businesses that sell over WhatsApp. It sits in the Assistants & Chatbots category of the Agents & Automation tools and is open-source, written in TypeScript and licensed MIT. To get started: connect to your server.

## Overview

DeskcommCRM describes itself as an open-source AI sales operating system for businesses that sell over WhatsApp. It combines a shared inbox, a kanban sales pipeline and contact management with AI agents that answer customers, qualify leads, move deals between pipeline stages, trigger automations and hand the conversation to a person when a human decision is needed. The project positions itself as an open alternative to Kommo, Octadesk and Intercom, and it is built for self-hosting: the data stays on your own server and database, and the project states there is no paid tier and no gated features.

It started as a CRM for e-commerce (with a native Nuvemshop integration) and, according to the README, is used by clinics, real-estate agencies, info-product businesses, agencies, stores and service providers. Pipeline vocabulary is configurable per pipeline, so a lead can become a Customer, Patient or Buyer and "won" can read Paid, Booked or Closed. WhatsApp is connected either by QR code through WAHA (multiple numbers, with throttling, jitter and time windows to reduce ban risk) or through Meta's official Cloud API with approved templates.

Under the hood it is a Next.js and strict TypeScript app on Supabase (Postgres with row-level security and pgvector for retrieval, plus Auth, Realtime and Storage), with the Vercel AI SDK talking to OpenRouter, Anthropic or OpenAI — chosen at install time and switchable per part of the system later. It is multi-tenant, with an RLS isolation test run as a CI gate, an append-only audit log and privacy tooling aimed at Brazil's LGPD. The CRM is also exposed through an internal MCP server so agents can operate it. Most of the project's documentation is written in Brazilian Portuguese, with English and Spanish versions of the README.

## What it does

- AI agents that operate the CRM: per-tenant RAG over your knowledge, skills the agent runs by itself mid-conversation, operational memory, sentiment analysis and per-organization spending caps
- Audited AI-to-human handoff: when the agent is stuck on something only a person can resolve it opens a case and keeps talking to the customer while it waits
- Follow-ups that revive cold conversations with adaptive timing and per-stage triggers, plus a Radar of open conversations at risk of going unanswered
- Self-improvement loop: resolved conversations become new knowledge, an AI Evolution screen shows where the agent fails, and the AI proposes improvements that a human must approve
- WhatsApp two ways — QR code via WAHA with anti-ban controls, or Meta's official Cloud API with templates kept in sync
- Webhook capture sources and WHEN/IF/THEN automations that tag and move leads, assign agents, send WhatsApp messages or call external systems
- Support governance: server-side role-based access, round-robin queues, automatic intent routing and per-role visibility scopes

## Getting started

The main path is a one-command install on a VPS with Docker (4 GB of RAM recommended), a domain whose A record points at the server, a free Supabase project and an OpenRouter, Anthropic or OpenAI key. The app image is prebuilt, so there is no Node or pnpm to install on the server.

1. Connect to your server

   Open a terminal on your computer and SSH into the VPS with the IP (and port, if your host gave one) from your hosting provider. No server yet? The project's helper script, run on your own machine, recommends a plan and prints the exact install command for your case — it installs nothing without confirmation.

```bash
ssh -p PORT root@YOUR_IP

# optional, on your own computer, before you have a server:
curl -fsSL https://raw.githubusercontent.com/melgarafael/DeskcommCRM/main/hostgator-setup-kit/comecar.sh | bash
```

2. Run the installer

   The installer asks only for your domain, keys and admin password, validates each answer, generates the technical secrets, applies the database schema, creates the first admin, brings the stack up with automatic HTTPS and installs the automations cron and the update agent. It is idempotent, so re-running it is safe. Export SUPABASE_ACCESS_TOKEN first and it creates the Supabase project for you; for a non-interactive run, fill in a .env from .env.hostgator.example and add --yes.

```bash
git clone https://github.com/melgarafael/DeskcommCRM.git
cd DeskcommCRM
bash hostgator-setup-kit/install.sh
```

3. Sign in and connect WhatsApp

   Open https://<your-domain>, sign in as the admin you created and, during onboarding, scan the QR code with your business WhatsApp number (or use Meta's official channel). Two-step verification is optional and lives under Settings › Security.

4. Update from the screen or the terminal

   When a new release exists, the sidebar offers an update that backs up the database, applies the new version and rolls back on its own if the new image comes up broken. From the terminal, update.sh does the same and only ever lands on a tagged release, never an untested commit; backup.sh, restore.sh and healthcheck.sh cover the rest. Supabase's free plan does not back up on its own, so schedule backup.sh daily.

```bash
cd /path/to/DeskcommCRM
bash hostgator-setup-kit/update.sh
```

5. Hacking on the code (contributors only)

   For local development the README applies the schema from supabase/baseline.sql rather than the migrations, then starts the Next.js dev server on http://localhost:3000. docs/SETUP.md walks through every integration.

```bash
git clone https://github.com/melgarafael/DeskcommCRM.git
cd DeskcommCRM
nvm use
npm install -g pnpm && pnpm install
cp .env.example .env.local
docker compose up -d
supabase link --project-ref <your-ref>
psql "$SUPABASE_DB_URL" -v ON_ERROR_STOP=1 -f supabase/baseline.sql
pnpm dev
```

## When to use it

- A clinic, real-estate agency or online store that sells over WhatsApp and wants an AI agent to answer and qualify leads around the clock, with staff taking over from the same inbox
- Replacing a hosted WhatsApp CRM subscription with a self-hosted one where customer conversations and data stay on your own server and database
- Capturing leads from landing pages, forms, Zapier or n8n into a pipeline stage and running WHEN/IF/THEN rules that tag, assign and message them automatically
- Agencies installing a rebranded instance per client, following the project's white-label guide
