How ronendotan/whatsapp-claude-bridge works
WhatsApp & Signal ↔ Claude/Codex Bridge accepts messages per allowed chat, processes commands and media, resumes a per-chat LLM session, then sends replies through the originating channel. A separate Python MCP server exposes WhatsApp history and messaging tools. The README documents major capabilities such as per-chat personalities, working directories, transcription, and admin controls; unsampled modules are represented only where the tree supports their paths, so uncertain internal links are omitted.
Main entry points: main.go Bridge dispatcher · process.go Message processing · claude/llm.go Claude adapter · codex/llm.go Codex adapter
Components 26
Message channels
- WhatsApp channel
whatsapp-bridge/channels/whatsapp/channel.go - WhatsApp handler
whatsapp-bridge/channels/whatsapp/handler.go - Signal channel
whatsapp-bridge/channels/signal/channel.go - Signal handler
whatsapp-bridge/channels/signal/handler.go - WhatsApp message store
whatsapp-bridge/channels/whatsapp/handler.go - Channel sender
whatsapp-bridge/channels/whatsapp/handler.go
Bridge runtime
- Bridge dispatcher
whatsapp-bridge/main.go - Message processing
whatsapp-bridge/core/process.go - Bridge commands
whatsapp-bridge/core/commands.go - Chat access rules
whatsapp-bridge/core/allowed.go - Personalities
whatsapp-bridge/core/personalities.go - Audio transcription
whatsapp-bridge/core/transcribe.go - Session state
whatsapp-bridge/core/sessions.go
LLM processing
- Claude adapter
whatsapp-bridge/llms/claude/llm.go - Codex adapter
whatsapp-bridge/llms/codex/llm.go
Admin console
- Admin HTTP API
whatsapp-bridge/admin/server.go - Admin handlers
whatsapp-bridge/admin/handlers.go - Admin web UI
whatsapp-bridge/admin/static/app.js
MCP access
- WhatsApp MCP tools
whatsapp-mcp-server/main.py - WhatsApp data access
whatsapp-mcp-server/whatsapp.py
Other components
- WhatsApp users
- Signal users
- Claude CLI
- Codex CLI
- WhatsApp message database
- Bridge REST API
Connections 26
- WhatsApp users → WhatsApp channel: sends messages
- Signal users → Signal channel: sends messages
- WhatsApp channel → WhatsApp handler: delivers events
- Signal channel → Signal handler: delivers events
- WhatsApp handler → Bridge dispatcher: queues messages
- Signal handler → Bridge dispatcher: queues messages
- Bridge dispatcher → Bridge commands: dispatches commands
- Bridge dispatcher → Chat access rules: checks access
- Bridge dispatcher → Message processing: processes events
- Message processing → Audio transcription: transcribes audio
- Message processing → Personalities: loads context
- Message processing → Claude adapter: invokes selected LLM
- Message processing → Codex adapter: invokes selected LLM
- Claude adapter → Session state: reads and saves
- Codex adapter → Session state: reads and saves
- Claude adapter → Claude CLI: runs subprocess
- Codex adapter → Codex CLI: runs subprocess
- Bridge dispatcher → Channel sender: sends replies
- Admin web UI → Admin HTTP API: calls API
- Admin HTTP API → Admin handlers: routes requests
- Admin handlers → Chat access rules: reads and updates
- Admin handlers → Message processing: runs admin prompts
- WhatsApp MCP tools → WhatsApp data access: calls tools
- WhatsApp data access → WhatsApp message database: queries history
- WhatsApp data access → Bridge REST API: sends messages
- Bridge REST API → WhatsApp handler: dispatches send