How mritunjaii/client-buddy works
Client Buddy captures WhatsApp conversations, filters them by monitoring preferences, batches message bursts, and uses local AI to produce client briefs and reminder candidates. Critical briefs can trigger outbound voice alerts; the dashboard presents briefs, contacts, reminders, source messages, and live alert updates. The excerpts show the core server, batching, worker, AI, database, and alert responsibilities. Several dashboard and API capabilities are documented in the README but their implementation details are not sampled, so those relationships are cited to the README.
Main entry points: worker.ts Analysis Worker · index.tsx Client Dashboard · server.ts Ingest and Filter · batching.ts Burst Batching
Components 19
Message Ingestion
- WhatsApp Connector
apps/server/src/whatsapp.ts - Ingest and Filter
apps/server/src/server.ts - Burst Batching
apps/server/src/batching.ts
Brief Intelligence
- Analysis Worker
apps/server/src/worker.ts - Brief Analysis
apps/server/src/ai.ts - Critical Call Alerts
apps/server/src/callAlert.ts
Server Data
- Source Messages
apps/server/src/batching.ts - Pending Batches
apps/server/src/batching.ts - Briefs and Reminders
apps/server/src/worker.ts - Contact Preferences
apps/server/src/server.ts - Shared Domain Types
packages/shared/src/index.ts
User Experience
- Client Dashboard
apps/web/src/pages/index.tsx
Other components
- Freelancer
- WhatsApp Web
- Local Ollama
- ElevenLabs
- Twilio
- User Phone
- MongoDB
Connections 28
- Freelancer → WhatsApp Web: messages
README.md - WhatsApp Web → WhatsApp Connector: streams messages
README.md - WhatsApp Connector → Ingest and Filter: normalizes messages
README.md - Ingest and Filter → Contact Preferences: checks preferences
apps/server/src/server.ts - Ingest and Filter → Burst Batching: ingests allowed messages
apps/server/src/server.ts - Burst Batching → Source Messages: caches messages
apps/server/src/batching.ts - Burst Batching → Pending Batches: updates batches
apps/server/src/batching.ts - Analysis Worker → Pending Batches: claims due batches
apps/server/src/worker.ts - Analysis Worker → Contact Preferences: reads context
apps/server/src/worker.ts - Analysis Worker → Brief Analysis: analyzes batch
apps/server/src/worker.ts - Brief Analysis → Local Ollama: requests generation
apps/server/src/ai.ts - Analysis Worker → Briefs and Reminders: persists results
apps/server/src/worker.ts - Analysis Worker → Pending Batches: marks processed
apps/server/src/worker.ts - Analysis Worker → Critical Call Alerts: dispatches critical alert
apps/server/src/worker.ts - Critical Call Alerts → ElevenLabs: synthesizes voice
apps/server/src/callAlert.ts - Critical Call Alerts → Twilio: places call
apps/server/src/callAlert.ts - Twilio → User Phone: rings
README.md - Analysis Worker → Client Dashboard: emits live events
README.md - Freelancer → Client Dashboard: reviews intelligence
README.md - Client Dashboard → Briefs and Reminders: views briefs and reminders
README.md - Client Dashboard → Source Messages: inspects originals
README.md - Client Dashboard → Contact Preferences: manages profiles
README.md - Ingest and Filter → MongoDB: reads and writes
apps/server/src/server.ts - Burst Batching → MongoDB: stores batches and sources
apps/server/src/batching.ts - Analysis Worker → MongoDB: stores analysis records
apps/server/src/worker.ts - Ingest and Filter → Shared Domain Types: uses domain types
apps/server/src/server.ts - Analysis Worker → Shared Domain Types: uses domain types
apps/server/src/worker.ts - Client Dashboard → ElevenLabs: replays alert audio
README.md