How samuelklausfischer-rgb/central-whatsapp works
Central Whats is a team WhatsApp service desk with web and Electron clients sharing a React application. The principal workflow is an authenticated agent entering the chat hub, working conversations, and sending or receiving messages through Supabase Edge Functions and Evolution API. The repository also exposes email, campaigns, scheduling, analytics, and hosted business tools. Edges reflect the README’s stated backend boundary and sampled webhook/worker behavior; unsampled page-to-service wiring is left out.
Main entry points: client.ts Supabase services · App.tsx App routes · ChatHub.tsx Chat hub · engine.ts Campaign worker
Components 25
Client application
- App routes
src/App.tsx - Authentication
src/hooks/use-auth.tsx
WhatsApp operations
- Chat hub
src/pages/ChatHub.tsx - Message services
src/services/messages.ts - Attachment storage
src/services/storage.ts - Message function
supabase/functions/send-message/index.ts - Inbound webhook
supabase/functions/evolution-webhook/index.ts - Legacy webhook hook
pocketbase/hooks/evolution_webhook.js - Campaign worker
worker/src/engine.ts - Bulk campaigns
src/pages/tools/DisparadorEmMassa.tsx
Other communications
- Email hub
src/pages/EmailHub.tsx - Email functions
supabase/functions/email-send/index.ts - Scheduled messages
src/pages/ScheduledMessages.tsx - Agenda
src/pages/Agenda.tsx
Business tools
- Service dashboard
src/pages/Index.tsx - PRN analysis
src/pages/tools/AnalisePrn.tsx - PRN processing
src/services/prn-analise/prn-service.ts - Hosted tools
src/components/tools/FerramentaHospedada.tsx
Backend and state
- Supabase services
src/lib/supabase/client.ts - Supabase data
- Edge functions
supabase/functions - Evolution API
- PocketBase
- Evolution MCP
evolution-api-mcp/src/index.ts
Other components
- Support agent
Connections 24
- Support agent → App routes: uses
- App routes → Authentication: provides auth
- App routes → Chat hub: routes to
- Chat hub → Message services: works with
- Message services → Supabase services: uses
- Supabase services → Supabase data: reads and writes
- Chat hub → Attachment storage: uploads media
- Attachment storage → Supabase services: stores files
- Message function → Evolution API: sends messages
- Inbound webhook → Supabase services: uses backend
- Legacy webhook hook → PocketBase: writes contacts/messages
- Bulk campaigns → Campaign worker: campaign sending
- Campaign worker → Supabase services: leases and updates targets
- Campaign worker → Evolution API: sends messages
- Email hub → Supabase services: uses backend
- Email functions → Supabase services: uses backend
- Scheduled messages → Supabase services: uses backend
- Agenda → Supabase services: uses backend
- Service dashboard → Supabase services: uses backend
- PRN analysis → PRN processing: submits analysis
- PRN processing → Supabase services: records runs
- PRN processing → Edge functions: uses proxy
- Hosted tools → Supabase services: checks tool access
- Evolution MCP → Evolution API: calls API