DEV Community

mohit01-beep
mohit01-beep

Posted on

BuddyBrain: A Private, On-Device AI Companion Built for My Overwhelmed Friend

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built BuddyBrain, a private, 100% on-device AI companion and ADHD task deconstructor created specifically for my friend Alex.
Alex is a freelance software developer and student who frequently deals with severe cognitive overload and task paralysis. When juggling multiple deadlines, unread client messages, failing tests, and personal life, Alex often freezes up completely—not knowing what to do first. Moreover, because Alex handles confidential client NDA codebases and personal health/mood reflections, sending raw stream-of-consciousness brain dumps to corporate third-party cloud AI APIs (like OpenAI or Anthropic) was never an acceptable privacy risk.
BuddyBrain solves this with four core capabilities:

  1. Brain Dump to Micro-Action Plan: Takes an unstructured, emotional stream of consciousness and automatically breaks it down into low-friction, 5-to-15-minute bite-sized steps with category tags and time estimates.
  2. Emotional Temperature & Stress Check: Analyzes the emotional tone of the brain dump to detect high stress or anxiety using on-device sentiment classification (Xenova/distilbert-base-uncased-finetuned-sst-2-english), offering calming feedback and immediate grounding suggestions.
  3. Local Semantic Memory Index: Stores private developer notes, past victories, and bug solutions, allowing Alex to search them by conceptual meaning rather than exact keywords using dense vector embeddings (Xenova/all-MiniLM-L6-v2).

4. Adaptive AI Buddy Pep-Talks: Delivers customizable encouragement tailored to Alex's current mental state (Empathetic Friend, Energetic Coach, Mindful Stoic, or Pragmatic Senior Dev).

Demo

  • Live / Local Interface: Runs locally on http://localhost:3000 with instant offline capabilities.
  • Walkthrough:
    1. Step 1: Alex types a chaotic stream-of-consciousness: "I'm super stressed about tomorrow's presentation, my code has 3 failing tests, I haven't eaten lunch, and Sarah messaged me asking for the project link."
    2. Step 2: BuddyBrain runs on-device sentiment classification, gauges emotional temperature, and converts the pile of panic into clear, sequential micro-tasks:
      • 🥪 Self-care reset: eat lunch & drink water (~5 mins)
      • ✉️ Draft quick reply to Sarah (~5 mins)
      • 💻 Isolate 1 failing test in test suite (~15 mins)
      • 📊 Outline 3 key slide bullet points (~20 mins)
    3. Step 3: Alex queries the local semantic memory for past solutions (e.g., "database connection issue") and gets instant cosine similarity matches without sending queries across the internet. > Friend's Reaction: > "Normally when I have 5 things piling up, my brain shuts down. Dumping a messy paragraph into BuddyBrain and watching it immediately turn into clear 5-minute checkboxes took the panic away. The fact that it runs locally and doesn't log my thoughts to a cloud server made me actually feel safe using it." — Alex --- ## Code The complete source code is licensed under the permissive MIT License: {https://github.com/mohit01-beep/buddy-brain} (https://github.com/mohit01-beep/buddy-brain) ### Architecture & Tech Stack

mermaid
flowchart TD
    subgraph Client ["Browser Client (100% On-Device)"]
        UI["Modern Web Interface (Tailwind CSS + ESM)"]

        subgraph OpenSourceAI ["Open-Source AI Engine (Transformers.js / ONNX)"]
            SentimentModel["Xenova/distilbert-base-uncased\n(Emotional Stress Classifier)"]
            EmbeddingModel["Xenova/all-MiniLM-L6-v2\n(Vector Embeddings Generator)"]
            CosineEngine["In-Browser Cosine Similarity Matrix"]
        end

        TaskEngine["ADHD Task Deconstruction Engine"]
    end

    subgraph Storage ["Local Storage & Offline Sync"]
        ExpressServer["Express.js Server (Port 3000)"]
        DiskStore[("Local Disk JSON Files\n(data/tasks.json, data/memories.json)")]
    end

    UI -->|Stream of Consciousness| SentimentModel
    UI -->|Brain Dump Text| TaskEngine
    UI -->|Note & Search Query| EmbeddingModel
    EmbeddingModel --> CosineEngine
    TaskEngine --> ExpressServer
    CosineEngine --> ExpressServer
    ExpressServer --> DiskStore
Enter fullscreen mode Exit fullscreen mode

Top comments (0)