How kanna-sakthi27/whatsapp-ai-autoreply works
WhatsApp AI Auto-Reply receives WAHA webhooks, filters incoming messages, generates replies with a configured local or cloud LLM, then applies outgoing safeguards and can hold replies for human approval before sending. The FastAPI service also exposes message history, statistics, settings, and logs to a React dashboard. The README documents the overall webhook-to-reply flow and dashboard capabilities; source excerpts confirm selected backend storage and frontend API relationships, but do not expose the full webhook handler implementation.
Main entry points: main.py FastAPI Webhooks · App.jsx Dashboard App · client.js API Client · ApprovalQueue.jsx Approval UI
Components 20
AI Service
- FastAPI Webhooks
ai_service/main.py - Guard Rails
ai_service/guard_rails.py - Approval Queue
ai_service/main.py
Service Data
- Message History
ai_service/message_history.py - Log Store
ai_service/logs_store.py
Admin Dashboard
- Dashboard App
frontend/src/App.jsx - API Client
frontend/src/api/client.js - Message History UI
frontend/src/components/MessageList.jsx - Manual Send UI
frontend/src/components/SendMessage.jsx - Approval UI
frontend/src/components/ApprovalQueue.jsx - Provider Settings UI
frontend/src/components/AIProviderConfig.jsx - Guard Settings UI
frontend/src/components/GuardRailsConfig.jsx - General Settings UI
frontend/src/components/GeneralSettings.jsx - Log Viewer UI
frontend/src/components/LogViewer.jsx - Connection Status UI
frontend/src/components/ConnectionStatus.jsx - Statistics UI
frontend/src/components/StatsCards.jsx
Other components
- WAHA API
- Ollama / OpenAI
- Operator
Connections 29
- WhatsApp → WAHA API: sends messages
README.md - WAHA API → FastAPI Webhooks: posts webhook
README.md - FastAPI Webhooks → Guard Rails: filters messages
ai_service/main.py - FastAPI Webhooks → Ollama / OpenAI: requests replies
README.md - FastAPI Webhooks → Approval Queue: queues review
ai_service/main.py - Operator → Approval UI: reviews replies
README.md - Approval UI → API Client: submits decisions
frontend/src/components/ApprovalQueue.jsx - FastAPI Webhooks → WAHA API: sends replies
README.md - FastAPI Webhooks → Message History: stores messages
ai_service/main.py - FastAPI Webhooks → Log Store: reads logs
ai_service/main.py - Dashboard App → Message History UI: routes to
frontend/src/App.jsx - Dashboard App → Manual Send UI: routes to
frontend/src/App.jsx - Dashboard App → Approval UI: routes to
frontend/src/App.jsx - Dashboard App → Provider Settings UI: routes to
frontend/src/App.jsx - Dashboard App → Guard Settings UI: routes to
frontend/src/App.jsx - Dashboard App → General Settings UI: routes to
frontend/src/App.jsx - Dashboard App → Log Viewer UI: routes to
frontend/src/App.jsx - Dashboard App → Connection Status UI: routes to
frontend/src/App.jsx - Dashboard App → Statistics UI: renders
frontend/src/App.jsx - Message History UI → API Client: requests history
frontend/src/components/MessageList.jsx - Manual Send UI → API Client: submits message
frontend/src/components/SendMessage.jsx - Provider Settings UI → API Client: updates provider
frontend/src/components/AIProviderConfig.jsx - Guard Settings UI → API Client: updates guards
frontend/src/components/GuardRailsConfig.jsx - General Settings UI → API Client: updates settings
frontend/src/components/GeneralSettings.jsx - Log Viewer UI → API Client: fetches logs
frontend/src/components/LogViewer.jsx - Connection Status UI → API Client: checks status
frontend/src/components/ConnectionStatus.jsx - API Client → FastAPI Webhooks: calls REST API
README.md - FastAPI Webhooks → Message History: serves history
ai_service/main.py - FastAPI Webhooks → Log Store: serves log data
ai_service/main.py