DEV Community

Cover image for ChatInspector AI: I Built a Privacy-First Local AI That Inspects Your Chats You Up on 1,000 Messages in Seconds
Ajay Mourya
Ajay Mourya

Posted on

ChatInspector AI: I Built a Privacy-First Local AI That Inspects Your Chats You Up on 1,000 Messages in Seconds

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

ChatInspector AI is a local, privacy-first Chrome browser extension with an attached Python FastAPI backend that inspects active group and 1-on-1 chats in WhatsApp Web, Telegram, Discord, and Slack.

Opening a busy WhatsApp group or Slack channel with 100+ unread messages usually means 20 minutes of tedious scrolling, parsing passive-aggressive comments, trying to figure out who agreed to what, and figuring out who you owe a reply to. ChatInspector AI eliminates this chore entirely.

With one click:

  • Auto-Scrolls to Date: Select Today, Yesterday, or pick a date on a calendar — the extension smoothly auto-scrolls WhatsApp upward to load older messages from that date.
  • Discussion Genesis: Instantly identifies the opening message where the conversation or scenario started, with a "📍 Focus Where It Started" button that scrolls WhatsApp directly to it with a pulsing neon highlight.
  • Opinions & Tone Assessment: Surface unspoken tensions, team alignment, and emotional dynamics with direct quoted evidence.
  • 1-Click "Reply in WhatsApp": Generates grounded draft replies and copies the text, scrolls to the sender's message, and puts the cursor directly into the WhatsApp input box.
  • Fixed AI Chatbot: A docked bottom assistant to ask natural language questions about the conversation (e.g. "What did Sarah decide on the release timeline?" or "What are the unresolved budget items?").
  • Local History Archive: Automatically archives all chats and analyses into IndexedDB with search and re-loading capabilities.

Who gets to be lazy? Anyone overwhelmed by group chats, team coordination channels, community Discords, and client threads who wants an instant 10-second brief without reading hundreds of messages.


Demo

ChatInspector AI Demo Screenshot

Live Flow:

  1. Open WhatsApp Web or Slack in Chrome.
  2. Open the ChatInspector AI Side Panel.
  3. Click Analyze Chat (or pick a date from the calendar to auto-scroll up).
  4. Review opinions, suggestions, and next steps in seconds.
  5. Click "Reply in WhatsApp" or interrogate the chat in the docked AI chatbox.

Code



How I Built It

ChatInspector AI is engineered around local inference and open-weight models:

  • Open-Weight Model: Google Gemma 2 (2B) (gemma2:2b), running locally via Ollama.
  • Local Inference Backend: A FastAPI + Uvicorn Python service running on http://127.0.0.1:8000. It communicates directly with Ollama's /api/chat and /api/tags endpoints, utilizing strict JSON schema prompting and grounded temperature (0.2).
  • Smart Fallback Engine: If Ollama is offline or compiling, the backend seamlessly provides heuristic dynamic analysis so the user experience is never blocked.
  • Chrome Extension (Manifest V3):
    • Built with React 18, TypeScript, and Vite.
    • Uses the Chrome Side Panel API (chrome.sidePanel) to live comfortably beside chat tabs.
    • Uses Chrome Scripting API (chrome.scripting.executeScript) to target WhatsApp Web's virtualized scroll container ([data-testid="conversation-panel-messages"]), message rows ([data-testid^="conv-msg-"]), and date dividers.
    • Local persistence via IndexedDB (idb) so conversation history and briefings remain 100% on-device.

Why Does Open Innovation Matter?

Chat conversations are among the most intimate and sensitive data on any computer. They contain confidential workplace strategy, private personal conversations, contact numbers, and internal disagreements.

Uploading entire WhatsApp and Slack chat histories to closed cloud APIs like OpenAI or Anthropic is a major privacy and compliance liability:

  1. Privacy & Trust: With open-weight models like Google Gemma running on Ollama, zero bytes of chat text leave your machine. There is no third-party telemetry, no cloud logging, and no risk of your private messages training a public foundation model.
  2. Zero Per-Token Cost: Parsing 150 lengthy group chat messages on closed APIs adds up quickly. With local open-weight inference, inspection is completely free, infinite, and works even when completely offline or traveling.
  3. Open Ecosystem Flexibility: We can swap between Gemma 2B, Gemma 9B, or domain-specialized open models with a single dropdown in the settings without rewriting client logic.

The Lazy Payoff

ChatInspector AI saves an estimated 45 to 60 minutes per day for power users in active messaging groups:

  • No Manual Catch-Up: Skim 200 unread messages in 15 seconds through the executive review.
  • Zero Writing Friction: Click "Reply in WhatsApp" — the suggested response is copied to your clipboard, WhatsApp scrolls to the message, and the cursor is placed in the message input box. Just hit Ctrl + V and press Enter.
  • Context Search: Instead of scrolling up for 5 minutes trying to find "when did we talk about the meeting time?", the auto-scroller and starting point finder jump straight to the source message.

Prize Categories

  • Best Overall "Slow and Steady" Project (Eliminating repetitive daily chores through practical, local AI)
  • Local / Open-Source AI Track (Built on open-weight Google Gemma + Ollama)

Top comments (0)