How webzygo/wacrm works
wacrm is a self-hostable WhatsApp CRM. The main workflow is customer messages arriving through Meta’s webhook, becoming contacts and conversations for agents in the shared inbox, with optional automation and AI handling. The product also includes contact management, sales pipelines, broadcasts, team/account administration, a dashboard, a scoped REST API, and an MCP server. Paths and links reflect the README and supplied source index/excerpts; unsampled subsystem internals are represented at their existing directory or route paths.
Main entry points: webhook/route.ts Inbound webhook · whatsapp WhatsApp messaging core · server.ts Supabase data and auth · broadcast/route.ts Broadcasts
Components 24
Messaging
- Inbound webhook
src/app/api/whatsapp/webhook/route.ts - Shared inbox
src/app/(dashboard)/inbox/page.tsx - WhatsApp send
src/app/api/whatsapp/send/route.ts - WhatsApp messaging core
src/lib/whatsapp - Broadcasts
src/app/api/whatsapp/broadcast/route.ts - Message templates
src/components/settings/template-manager.tsx
Customer operations
- Contacts and tags
src/app/(dashboard)/contacts/page.tsx - Contact import
src/lib/contacts/parse-contact-csv.ts - Sales pipelines
src/components/pipelines/pipeline-board.tsx - Analytics dashboard
src/lib/dashboard/queries.ts
Automation and AI
- Automation builder
src/components/automations/automation-builder.tsx - Automation engine
src/lib/automations/engine.ts - Flow builder
src/components/flows/flow-builder.tsx - Flow engine
src/lib/flows/engine.ts - AI assistance and knowledge
src/lib/ai
Team and platform
- Team and account access
src/lib/auth/account.ts - Sign-in and signup
src/hooks/use-auth.tsx - Supabase data and auth
src/lib/supabase/server.ts
External interfaces
- Scoped REST API
src/app/api/v1 - MCP server
mcp-server/src
Other components
- WhatsApp customer
- CRM agent
- WhatsApp Business API
- API or MCP client
Connections 30
- WhatsApp customer → WhatsApp Business API: sends messages
README.md - WhatsApp Business API → Inbound webhook: delivers events
README.md - Inbound webhook → Contacts and tags: resolves identity
src/app/api/whatsapp/webhook/route.ts - Inbound webhook → Shared inbox: records conversation
- Inbound webhook → Automation engine: dispatches triggers
src/app/api/whatsapp/webhook/route.ts - Inbound webhook → Flow engine: dispatches inbound
src/app/api/whatsapp/webhook/route.ts - Inbound webhook → AI assistance and knowledge: may auto-reply
src/app/api/whatsapp/webhook/route.ts - CRM agent → Shared inbox: handles conversations
README.md - Shared inbox → WhatsApp send: sends replies
- WhatsApp send → WhatsApp messaging core: uses messaging logic
src/app/api/whatsapp/send/route.ts - WhatsApp messaging core → WhatsApp Business API: sends via API
README.md - Contacts and tags → Contact import: imports CSV
README.md - CRM agent → Sales pipelines: manages deals
README.md - CRM agent → Broadcasts: creates campaigns
README.md - Broadcasts → Message templates: uses templates
README.md - Broadcasts → WhatsApp Business API: delivers broadcasts
README.md - CRM agent → Automation builder: configures rules
README.md - Automation builder → Automation engine: defines automations
- Automation engine → WhatsApp messaging core: sends messages
src/lib/automations/engine.ts - CRM agent → Flow builder: builds flows
README.md - Flow builder → Flow engine: configures flow
- Flow engine → WhatsApp messaging core: sends messages
src/lib/flows/engine.ts - CRM agent → AI assistance and knowledge: drafts replies
README.md - AI assistance and knowledge → Supabase data and auth: retrieves knowledge
README.md - CRM agent → Analytics dashboard: views metrics
README.md - Sign-in and signup → Supabase data and auth: authenticates
src/hooks/use-auth.tsx - Team and account access → Supabase data and auth: loads account context
src/lib/auth/account.ts - API or MCP client → Scoped REST API: calls endpoints
README.md - API or MCP client → MCP server: connects assistants
README.md - Scoped REST API → Supabase data and auth: accesses CRM data