DEV Community

Cover image for CogniFlow AI: An Open-Source Executive Dysfunction Copilot Powered by Google Gemma 2
Divyansh Mishra
Divyansh Mishra

Posted on

CogniFlow AI: An Open-Source Executive Dysfunction Copilot Powered by Google Gemma 2

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

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


What I Built

The Problem

If you deal with ADHD, anxiety, or burnout, starting a task can feel impossible.

You need to reply to an email, file paperwork, or finish an assignment. You sit down, but your brain freezes. Hours go by, and you feel guilty for not getting anything done.

Most to-do apps are made for busy offices, not for people who get overwhelmed:

  1. Big tasks feel scary. Writing "Do taxes" or "Clean house" feels like too much work at once.
  2. Guilt and stress. Red overdue dates and loud reminders make you feel worse.
  3. Too complicated. Organizing tags, folders, and priority lists takes energy you do not have when you feel stuck.

The Solution: CogniFlow AI

CogniFlow AI is a simple, private task helper built with Google's open model, Gemma 2.

It does not ask you for motivation. Instead, it helps you take the very first step:

  • Small micro-steps: It turns a big goal into tiny 2 to 10 minute steps based on your energy level (Low, Balanced, or Sprint).
  • Plain English translator: It takes confusing emails, legal notices, or policy rules and explains them in simple everyday words.
  • Spoken voice: It can read your steps out loud at a comfortable speed to help you stay focused.
  • Simple focus mode: A clean screen with a gentle timer and zero distractions.
  • 100% private: All your personal notes stay in your browser. Nothing is saved to an external database.

Who Would Pay For It? (Side Hustle Business Idea)

CogniFlow AI solves a real daily struggle for people with ADHD, college students, and remote workers who have trouble getting started on tasks.

How It Can Make Money:

  1. Free Core Version:
    • Always free and open source. Runs directly in your browser using local storage and open models.
  2. CogniFlow Pro ($8 per month or $72 per year):
    • Fast cloud AI included without needing to set up technical API keys.
    • Sync your tasks between your phone and laptop with end-to-end encryption.
    • Natural, calm voice options powered by ElevenLabs.
    • Export simple progress summaries to share with an ADHD coach or counselor.

Demo

1. Main Dashboard

Type in any goal, choose your energy level, and let Gemma turn it into small steps:

2. Distraction-Free Focus Mode

A clean screen with a round timer, calm chimes, and voice reading:

3. Plain English Translator

Turns confusing contracts, bills, or official emails into clear next steps:


Code

CogniFlow AI is open source under the MIT License.

GitHub Repository: https://github.com/itsdivyansh1/cogniflow-ai

Tech Stack

  • Framework: Next.js 16, TypeScript
  • Styling: Tailwind CSS, Lucide React icons
  • Storage: localStorage
  • Audio: Web Speech API and ElevenLabs voice streaming
  • Celebrations: Gentle micro-confetti when you finish a step

How I Built It

The Core: Google Gemma 2 (9B-it)

CogniFlow AI uses Google's open-weight model, Gemma 2 (9B-it). Gemma 2 is fast, smart, and small enough to run on regular computers while still giving helpful, thoughtful answers.

System Architecture and Multi-Tier Inference

When you feel overwhelmed, an error screen makes things worse. CogniFlow uses a 4-tier fallback pipeline so it never fails:

graph TD
    A[User Goal: Decompress Task] --> B{Google AI Studio Gemma 2}
    B -->|Success| R[Return Clear Micro-Steps]
    B -->|Network or Key Error| C{Groq Gemma 2}
    C -->|Success| R
    C -->|Unavailable| D{Local Ollama Gemma 2}
    D -->|Success| R
    D -->|Offline or No Ollama| E[Offline Rule Engine]
    E --> R
  1. Primary Provider: Google AI Studio Gemma 2 for smart, natural answers.
  2. Fast Backup: Groq inference for answers in under half a second.
  3. Local Model: Ollama running Gemma 2 on your own computer for total offline privacy.
  4. Offline Helper: An embedded rule system that gives you steps even if your internet is completely down.

Safe JSON Formatting

To make sure the website never crashes from bad formatting, the model is instructed to always return clean JSON data:

const SYSTEM_PROMPT = `You are CogniFlow AI, a gentle assistant for ADHD and task paralysis.
Break big goals into tiny 2 to 10 minute steps.

Rules:
1. Step 1 must be very easy (for example, "Open the document and drink some water").
2. Be encouraging and calm. Never use pressure or guilt.
3. Return only valid JSON.`;
Enter fullscreen mode Exit fullscreen mode

Why Does Open Innovation Matter?

Open-source models like Gemma 2 are important for projects like this for three big reasons:

1. Total Privacy for Personal Thoughts

When people struggle to get things done, their task lists can be very private. People write about overdue bills, personal struggles, and stressful work issues.
With open models, everything can run right on your own device. Your private thoughts never leave your computer.

2. Affordable Accessibility

Helpful tools for people with attention issues should not be locked behind expensive corporate subscriptions. Open models allow anyone to build and use assistive tools for free.

3. Community Improvements

Because the model is open, developers and researchers can train custom versions specifically for ADHD pacing, calm communication, and better habit building.


My First User

I am my own first user.

I built CogniFlow AI because I personally struggle with executive dysfunction and task paralysis.

Whenever I looked at normal to-do apps, seeing big items like "Finish project" or "Catch up on email" made my brain freeze. I would spend hours avoiding the work by scrolling through my phone or organizing my desk instead.

Using It on My Own Tasks

When the first version was ready, I tested it on things I had been putting off:

  1. Project Documentation: Instead of telling me to write a full guide, CogniFlow told me: "Step 1: Open the file and write just one sentence about the project (2 minutes)." Because the first step was so easy, I started right away. Finishing that first step gave me the momentum to do steps 2 and 3.
  2. Confusing Rules: I pasted long contest guidelines into the Plain English tool. It turned four dense paragraphs into three clear bullet points.
  3. Audio Reading: Listening to the voice read each step helped keep my attention steady when I was tired in the evening.

Building this to solve my own problem taught me something simple: the hardest part is almost never the work itself, but taking the very first step. Because I use this every day, every feature was built with care for how an overwhelmed mind actually works.


Prize Categories

CogniFlow AI is submitted for these tracks:

  • Open-Source Innovation with Google Gemma 2
  • Assistive Technology and Accessible UX

Top comments (0)