跳到正文
DEV Community· Mritunjai Gupta·· 2 小時前AI 評分38

Client Buddy:將 WhatsApp 零散訊息整理成項目概要的本地 AI 工具

Turning WhatsApp Bursts into Briefs: A Local AI Tool for Freelancers & Small Businesses

AI 導讀

Client Buddy 將 WhatsApp 零散訊息整理成含交付項目、期限及建議回覆的概要,是面向自由工作者及小型企業的本地 AI 工具。它以 120 秒滑動窗口批次訊息,透過 Ollama 在本機執行 llama3.2:latest 或 gemma:2b;工具不會自動回覆客戶,CRITICAL 緊急事件則觸發 ElevenLabs 語音及 Twilio 電話提醒。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

What I Built

Client communication on WhatsApp is notoriously chaotic. Freelancers and agency owners rarely receive structured project briefs; instead, clients send rapid-fire bursts of fragmented messages that bury essential scope shifts, budgets, and deadlines.

I built Client Buddy (formerly ClientPulse AI), a privacy-first, local-first client intelligence dashboard. It solves the "fragmented burst" problem by securely capturing live WhatsApp message streams via an authenticated headless web session and aggregating them using a custom 2-minute sliding-window batching engine.

Once a client finishes typing, Client Buddy processes the grouped messages entirely locally on your hardware to generate structured executive briefs containing explicit deliverables, hard deadlines, and tone-matched suggested reply drafts.

To respect professional boundaries, it enforces a strict "Zero Auto-Reply" policy—the application never messages clients automatically, ensuring all outbound communication requires human discretion via 1-click copy-paste drafts. For severe incidents (like a server crash or payment failure), the system flags the batch as CRITICAL and triggers an immediate outbound phone call alert to your mobile device using a synthesized AI voice.

Demo

Video Demo[https://youtu.be/T6_h7ZFzigc]

Code

Code Base[https://github.com/Mritunjaii/Client-Buddy.git]

How I Built It

Client Buddy is structured as a modern monorepo separating the dashboard from the heavy-lifting background workers.

  • The Ingestion Engine: I used whatsapp-web.js with Puppeteer to run a headless browser session that securely captures live incoming messages.

  • The Sliding-Window Batcher: To prevent disjointed summaries, incoming messages from the same chat reset a 120-second inactivity countdown (flushAt). I used MongoDB to store these pending batches, implementing atomic lease locks (findOneAndUpdate) to guarantee thread safety and exactly-once processing across background workers.

  • Local-First AI: The background worker feeds the aggregated batch into Ollama, running open-weight models (llama3.2:latest or gemma:2b) locally. The prompt forces strict JSON outputs to populate the Next.js dashboard with requirements, open questions, and drafted replies.

  • Critical Alerts: If the local LLM classifies a burst as a CRITICAL emergency, the backend calls the ElevenLabs API (eleven_multilingual_v2) to synthesize a realistic voice briefing, and uses Twilio to literally ring my mobile phone with the alert.

  • Zero-Footprint Privacy: Raw source messages are protected by a native MongoDB 7-day TTL index (expireAfterSeconds: 0), automatically purging raw chat records to maintain GDPR compliance.

Why Does Open Innovation Matter?

When you are managing client relationships, privacy is non-negotiable. Processing client NDAs, proprietary code snippets, and financial budgets through a closed-source cloud API is often a massive compliance violation.

Open innovation made Client Buddy possible. By leveraging local inference through Ollama and open-weight models, sensitive conversation histories never leave the user's machine for analysis. It provides enterprise-grade intelligence with zero cloud LLM exposure and zero per-token costs. Open models give freelancers the power of advanced AI without forcing them to compromise their clients' trust.

Prize Categories

I am submitting Client Buddy for the following prize categories:

- Best Use of Gemma: Utilized locally via Ollama as the core reasoning engine to extract structured deadlines, requirements, and reply drafts from messy chat data.

- Best Use of MongoDB Atlas: Used for complex state management, atomic worker lease locks (findOneAndUpdate) for the batching engine, and TTL indexes for privacy-first raw data purging.

- Best Use of ElevenLabs: Integrated the eleven_multilingual_v2 model to synthesize crystal-clear, natural speech for outbound emergency PSTN phone calls.

來源:DEV Community · dev.to