How viniciosragazzidev/ancorahub works
CorreTop is a multi-tenant CRM SaaS for health-plan brokerages. The principal workflow is lead intake, qualification, distribution to brokers, conversation and follow-up, then sales and commission tracking; reporting and tenant administration support that work. The graph also captures documented AI, WhatsApp, marketing, and document capabilities. Several routes and feature directories are represented from the tree rather than inspected source, so their internal wiring is intentionally not inferred; direct engine calls shown are supported by sampled excerpts.
Main entry points: capability-execution-engine.ts Agent execution · pipeline.ts Tenant knowledge ingestion · engine.ts Automation engine · page.tsx Authentication
Components 24
Access and tenancy
- CRM portal
src/app/(dashboard)/layout.tsx - Authentication
src/app/(auth)/login/page.tsx - Platform administration
src/app/(platform-admin)/super-admin/page.tsx
CRM operations
- Lead workspace
src/app/(dashboard)/leads/page.tsx - Lead intake APIs
src/app/api/webhooks/leads/route.ts - Lead routing
src/features/lead-distribution/routing-engine.ts - Conversations
src/app/(dashboard)/conversas/page.tsx - Sales and commissions
src/app/(dashboard)/vendas/page.tsx - Automation engine
src/features/automations/engine.ts
AI and qualification
- Qualification workspace
src/app/(dashboard)/qualificacao/page.tsx - Agent execution
src/features/ai-agent/capability-execution-engine.ts - Agent triggers
src/features/ai-agent/trigger-execution-engine.ts - AI engine
src/features/ai/engine.ts - Tenant knowledge ingestion
src/features/tenant-intelligence/ingestion/pipeline.ts
Messaging and integrations
- WhatsApp service
services/whatsapp-api/src/app.ts - Meta integrations
src/app/api/webhooks/meta/lead-ads/route.ts - Document storage
src/shared/storage/r2-storage.ts
Sales and oversight
- Reports and exports
src/app/(dashboard)/relatorios/page.tsx - Operational dashboards
src/app/(dashboard)/dashboard/page.tsx
Other components
- Brokerage users
- Prospects
- WhatsApp provider
- Cloudflare R2
- CRM database
Connections 27
- Brokerage users → Authentication: signs in
- Authentication → CRM portal: opens workspace
- Brokerage users → Lead workspace: manages leads
- Prospects → Lead intake APIs: submits lead
- Lead intake APIs → CRM database: writes lead data
- Lead workspace → Lead routing: requests routing
- Lead routing → CRM database: reads routing rules
- Brokerage users → Conversations: handles conversations
- Brokerage users → Qualification workspace: reviews qualification
- Qualification workspace → Agent execution: requests capability
- Agent execution → CRM database: reads and records
- Agent execution → Agent triggers: executes trigger
- Agent execution → AI engine: requests AI
- Agent execution → CRM database: updates conversation
- Tenant knowledge ingestion → AI engine: classifies and extracts
- Tenant knowledge ingestion → CRM database: stores knowledge
- Tenant knowledge ingestion → Document storage: stores documents
- Document storage → Cloudflare R2: uploads and downloads
- Automation engine → CRM database: reads and updates
- Automation engine → WhatsApp provider: sends relay message
- WhatsApp service → WhatsApp provider: integrates messaging
- Meta integrations → CRM database: records integration data
- Brokerage users → Sales and commissions: tracks sales
- Sales and commissions → CRM database: reads sales data
- Brokerage users → Reports and exports: views reports
- Brokerage users → Operational dashboards: views operations
- Platform administration → CRM database: administers tenants