How 1120-estudio/atiendo-crm works
Atiendo CRM is a multi-company WhatsApp CRM: an incoming customer message reaches the inbox, creates or updates a lead in a configurable Kanban funnel, and an AI agent responds or hands the conversation to a person. Workspace setup connects WhatsApp and configures the agent; optional knowledge files support answers. The README documents these product relationships, but the relevant webhook and worker implementations were not sampled, so internal links are limited to documented behavior rather than assumed call chains.
Main entry points: conversations/route.ts Conversation inbox · main.ts AI agent · sources/route.ts Knowledge base · [token]/route.ts WhatsApp webhook
Components 17
Conversations
- WhatsApp webhook
app/api/v1/webhooks/channel/[token]/route.ts - Conversation inbox
app/api/v1/conversations/route.ts - Human handoff
app/api/v1/conversations/[id]/transfer/route.ts
Lead management
- Lead records
app/api/v1/leads/_handler.ts - Kanban pipeline
app/api/v1/pipelines/[id]/board/route.ts
AI engagement
- AI agent
workers/agent-worker/main.ts - Agent management
app/api/v1/ai/agents/route.ts - Knowledge base
app/api/v1/ai/knowledge/sources/route.ts - Knowledge indexing
workers/rag-indexer.ts
Workspace setup
- Account signup
app/actions/auth/signUp.ts - Workspace onboarding
app/actions/onboarding/finishOnboarding.ts - Channel connections
app/api/v1/channel-sessions/route.ts
Platform services
- Organization isolation
lib/supabase/server.ts - API client
lib/api/client.ts
Other components
- WhatsApp customer
- Workspace admin
- Zernio WhatsApp
Connections 15
- WhatsApp customer → Zernio WhatsApp: sends message
- Zernio WhatsApp → WhatsApp webhook: delivers webhook
- WhatsApp webhook → Conversation inbox: arrives in
- Conversation inbox → Lead records: creates lead
- Lead records → Kanban pipeline: appears in
- AI agent → Conversation inbox: responds in
- AI agent → Kanban pipeline: moves lead
- Conversation inbox → Human handoff: hands off
- Workspace admin → Account signup: creates account
- Account signup → Workspace onboarding: starts setup
- Workspace admin → Channel connections: connects channel
- Workspace admin → Agent management: configures agent
- Workspace admin → Knowledge base: adds files
- Knowledge base → Knowledge indexing: indexes sources
- AI agent → Knowledge base: consults materials