How diegovasquez-ai/builder-crm works
Builder CRM is a self-hosted agentic CRM: people manage contacts and sales pipelines while an AI agent handles inbound conversations, updates lead records, and can hand work to an adviser. The main flow runs from a connected messaging channel through ingestion and the agent to CRM state and replies. Other major branches cover team access, automations, reporting, and customer-specific modules. Edges use README statements or shown source references; unsampled implementation details are not inferred.
Main entry points: schema.ts CRM database · index.ts AI agent · route.ts Contact management · ingest.ts Message ingestion
Components 21
Messaging and agent
- WhatsApp webhook
src/app/api/webhooks/whatsapp/route.ts - Message ingestion
src/lib/channels/ingest.ts - Agent queue
src/lib/agent/queue.ts - AI agent
src/lib/agent/index.ts - Conversation inbox
src/components/conversations/ConversationView.tsx
CRM workflow
- Contact management
src/app/api/contacts/route.ts - Sales pipeline
src/components/pipeline/PipelineWorkspace.tsx - Activities
src/app/api/activities/route.ts - Contact documents
src/lib/documents.ts
Access and configuration
- Member access
src/lib/api-auth.ts - Team and roles
src/lib/team.ts
Automation and insights
- Automations
src/lib/automations/index.ts - Reports and dashboard
src/lib/reportes.ts - Agent simulator
src/lib/simulador.ts
Customer modules
- Property search
modules/propiedades/lib/busqueda.ts - Visit scheduling
modules/visitas/servidor.tsx - Customer modules
src/lib/modules/cliente.ts
Other components
- CRM user
- Messaging channels
- OpenRouter
- CRM database
src/db/schema.ts
Connections 29
- Messaging channels → WhatsApp webhook: sends events
- WhatsApp webhook → Message ingestion: upserts messages
src/app/api/webhooks/whatsapp/route.ts - Message ingestion → Agent queue: enqueues job
src/lib/channels/ingest.ts - Message ingestion → CRM database: writes conversations
src/lib/channels/ingest.ts - Agent queue → CRM database: stores jobs
src/lib/agent/queue.ts - Agent queue → AI agent: dispatches work
- AI agent → OpenRouter: requests inference
- AI agent → Contact management: updates lead
- AI agent → Sales pipeline: moves stages
- AI agent → Activities: records activity
- AI agent → Conversation inbox: replies in
- Conversation inbox → Messaging channels: sends replies
- CRM user → Conversation inbox: handles conversations
- CRM user → Contact management: manages leads
- Contact management → CRM database: reads and writes
src/app/api/contacts/route.ts - Contact management → Member access: requires member
src/app/api/contacts/route.ts - Member access → Team and roles: checks membership
src/lib/api-auth.ts - Team and roles → CRM database: reads members
src/lib/team.ts - Sales pipeline → CRM database: loads pipeline data
- CRM user → Automations: configures rules
- Automations → CRM database: persists runs
- CRM user → Reports and dashboard: views results
- CRM user → Agent simulator: tests agent
- CRM user → Contact documents: manages documents
- CRM user → Customer modules: configures modules
- Customer modules → Property search: enables module
- Customer modules → Visit scheduling: enables module
- Property search → CRM database: uses property data
- Visit scheduling → CRM database: uses visit data