How luisbedinot/atendezap-turbosaas works
AtendeZap is a multi-company WhatsApp support SaaS centered on an inbound-message workflow: WhatsApp events are received and validated, handled with business rules and AI, and used to update CRM state and reply. Users access the product through an authenticated workspace; major documented branches include campaigns, team management, reports, integrations, finance, and commercial plans. The webhook excerpt and source index support the key runtime connections; some feature internals were not sampled, so those branches are shown without speculative implementation links.
Main entry points: whatsapp-webhook.ts WhatsApp webhook · client.server.ts Supabase data and auth · app.tsx App access gate · evolution.server.ts Evolution server client
Components 26
Workspace access
- App access gate
src/routes/app.tsx - Workspace shell
src/components/app-shell.tsx
WhatsApp and AI
- Conversations
src/routes/app/conversas.tsx - WhatsApp webhook
src/routes/api/public/whatsapp-webhook.ts - AI instructions
src/lib/ai-prompt.ts - WhatsApp operations
src/lib/evolution.functions.ts - Evolution server client
src/lib/evolution.server.ts
CRM and engagement
- CRM Kanban
src/routes/app/crm.tsx - Lead details
src/components/crm/lead-drawer.tsx - Campaigns
src/routes/app/campanhas.tsx - Campaign worker
src/routes/api/public/hooks/process-campaigns.ts - Customer satisfaction
src/routes/csat.$token.tsx
Business management
- Dashboard and reports
src/routes/app/dashboard.tsx - Team management
src/routes/app/equipe.tsx - Financial records
src/routes/app/financeiro.tsx - Plans and billing
src/lib/plan.functions.ts - Integration settings
src/routes/app/integracoes.tsx
Platform services
- Supabase data and auth
src/integrations/supabase/client.server.ts - Browser Supabase client
src/integrations/supabase/client.ts - Tenant resolution
src/lib/tenant.ts - Plan entitlements
src/lib/plan-limits.server.ts - Google integration
src/lib/google.server.ts
Other components
- Workspace user
- WhatsApp sender
- Evolution API
- Google Calendar
Connections 25
- Workspace user → App access gate: opens workspace
src/routes/app.tsx - App access gate → Browser Supabase client: checks session
src/routes/app.tsx - App access gate → Workspace shell: renders
src/routes/app.tsx - App access gate → Tenant resolution: uses tenant types
src/routes/app.tsx - Workspace shell → Workspace user: shows navigation
src/components/app-shell.tsx - WhatsApp sender → WhatsApp webhook: posts events
- WhatsApp webhook → Supabase data and auth: reads and writes
src/routes/api/public/whatsapp-webhook.ts - WhatsApp webhook → AI instructions: uses instructions
src/routes/api/public/whatsapp-webhook.ts - WhatsApp webhook → Evolution server client: sends replies
src/routes/api/public/whatsapp-webhook.ts - WhatsApp operations → Evolution server client: delegates operations
src/lib/evolution.functions.ts - Evolution server client → Evolution API: calls API
- WhatsApp webhook → Google integration: creates calendar events
src/routes/api/public/whatsapp-webhook.ts - Google integration → Google Calendar: integrates calendar
- Conversations → Workspace user: supports inbox work
- CRM Kanban → Lead details: opens lead details
src/components/crm/lead-drawer.tsx - Campaign worker → Supabase data and auth: reserves recipients
- Campaigns → Workspace user: offers campaign tools
- Customer satisfaction → Workspace user: collects feedback
- Dashboard and reports → Workspace user: shows metrics
- Team management → Workspace user: manages agents
- Financial records → Workspace user: tracks finances
- Plans and billing → Supabase data and auth: manages plan data
- Integration settings → Workspace user: configures integrations
- Browser Supabase client → Supabase data and auth: queries Supabase
- Plan entitlements → Supabase data and auth: checks limits