<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Blessing Aighangbe</title>
    <description>The latest articles on DEV Community by Blessing Aighangbe (@tallest18).</description>
    <link>https://dev.to/tallest18</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3919693%2Fd50baf25-3e1f-480c-97ef-d6f9e6829790.png</url>
      <title>DEV Community: Blessing Aighangbe</title>
      <link>https://dev.to/tallest18</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tallest18"/>
    <language>en</language>
    <item>
      <title>MindBridge: A Mental Health First Responder AI Built with Gemma 4</title>
      <dc:creator>Blessing Aighangbe</dc:creator>
      <pubDate>Thu, 21 May 2026 12:28:19 +0000</pubDate>
      <link>https://dev.to/tallest18/mindbridge-a-mental-health-first-responder-ai-built-with-gemma-4-5hm7</link>
      <guid>https://dev.to/tallest18/mindbridge-a-mental-health-first-responder-ai-built-with-gemma-4-5hm7</guid>
      <description>&lt;h2&gt;
  
  
  The Problem That Kept Me Up At Night
&lt;/h2&gt;

&lt;p&gt;Over &lt;strong&gt;970 million people&lt;/strong&gt; worldwide live with a mental health disorder. That's roughly 1 in 8 people on Earth.&lt;/p&gt;

&lt;p&gt;Yet most of them will never get help.&lt;/p&gt;

&lt;p&gt;Not because they don't want it — but because of barriers that feel impossible to overcome:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;💸 Therapy costs $100–$300 per session, often not covered by insurance&lt;/li&gt;
&lt;li&gt;⏳ Waitlists of 3–6 months to see a psychiatrist&lt;/li&gt;
&lt;li&gt;🌍 In many countries (including mine), mental health infrastructure barely exists&lt;/li&gt;
&lt;li&gt;😶 Stigma so heavy that people won't tell a single soul they're struggling&lt;/li&gt;
&lt;li&gt;🕐 Crises happen at 2am — not during office hours&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I kept thinking: &lt;strong&gt;what happens in those critical hours before someone can reach a professional?&lt;/strong&gt; What if there was something — anything — available at the exact moment someone hits rock bottom?&lt;/p&gt;

&lt;p&gt;That's what MindBridge is.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MindBridge&lt;/strong&gt; is a compassionate AI-powered mental health first responder, built with Next.js and powered by &lt;strong&gt;Gemma 4's 31B dense model&lt;/strong&gt; via OpenRouter.&lt;/p&gt;

&lt;p&gt;It's not a therapist replacement. It's a bridge — from "I'm not okay and I don't know what to do" to "I have support, resources, and someone listening."&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://mindbridgementalhealth.vercel.app/" rel="noopener noreferrer"&gt;https://mindbridgementalhealth.vercel.app/&lt;/a&gt;&lt;br&gt;
🐙 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Tallest18/gemma4-mental-health" rel="noopener noreferrer"&gt;https://github.com/Tallest18/gemma4-mental-health&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  How it works
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1 — You share how you feel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Type freely, or tap one of six quick-start mood buttons (Sad, Anxious, Angry, Numb, Stressed, Lonely). You can even upload a journal page, a piece of artwork, or any image that expresses how you feel — Gemma 4 will analyze it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2sju1j0ml1atx79wns1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2sju1j0ml1atx79wns1w.png" alt="MindBridge check-in screen showing mood buttons and a text input field" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 — Gemma 4 listens and assesses&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The model performs a structured mental health triage, returning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;triage level&lt;/strong&gt; (Low / Moderate / High / Crisis)&lt;/li&gt;
&lt;li&gt;A warm &lt;strong&gt;summary&lt;/strong&gt; of what it heard&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patterns&lt;/strong&gt; it identified in what you shared&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grounding strategies&lt;/strong&gt; tailored to your situation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Curated resources&lt;/strong&gt; — hotlines, apps, online therapy, exercises&lt;/li&gt;
&lt;li&gt;A genuine &lt;strong&gt;affirmation&lt;/strong&gt; just for you&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu1htb0yu8806r9ygjzei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu1htb0yu8806r9ygjzei.png" alt="MindBridge loading screen showing " width="799" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpbulpkc7b0hxbp31dq8s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpbulpkc7b0hxbp31dq8s.png" alt="MindBridge results screen showing a Moderate triage level, affirmation quote, and patterns identified" width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 — Keep talking&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The conversation continues in an empathetic chat interface for as long as you need. Full conversation history is maintained across the session thanks to Gemma 4's 128K context window.&lt;/p&gt;


&lt;h2&gt;
  
  
  Why Gemma 4? The Intentional Choice
&lt;/h2&gt;

&lt;p&gt;This is the heart of why Gemma 4 specifically was the right tool — not just any model.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Multimodal understanding for richer emotional context
&lt;/h3&gt;

&lt;p&gt;Mental health isn't purely verbal. People express distress in art, in journals, in the photos they take. Gemma 4's native multimodal capability means a user can upload a page from their journal or a piece of artwork alongside their words, and the model analyzes both together for a deeper understanding.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User types: "I don't really know how to explain it..."
User uploads: A photo of their journal filled with scribbled-out words

Gemma 4 sees both → understands the depth of their struggle
better than words alone could convey
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No other approach in this size class handles this as cleanly.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Advanced reasoning for nuanced emotional language
&lt;/h3&gt;

&lt;p&gt;Mental health language is extraordinarily subtle. "I'm fine" almost never means fine. "I've just been tired lately" can mask severe depression. "I've been thinking a lot" can be the first step toward disclosing suicidal ideation.&lt;/p&gt;

&lt;p&gt;Gemma 4's reasoning capabilities allow it to read between the lines — to understand what someone &lt;em&gt;means&lt;/em&gt;, not just what they &lt;em&gt;said&lt;/em&gt;. This is critical in a mental health context where the wrong response to a signal can cause real harm.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. 128K context window for continuity of care
&lt;/h3&gt;

&lt;p&gt;Mental health support is not a single transaction — it's a relationship built over time. A model that forgets what someone said three messages ago cannot provide meaningful support.&lt;/p&gt;

&lt;p&gt;Gemma 4's 128K context window means MindBridge can hold the entire conversation in memory, refer back to earlier disclosures, and build a coherent picture of what someone is going through — just like a real therapist would.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Privacy-first deployment
&lt;/h3&gt;

&lt;p&gt;Perhaps most importantly: mental health data is among the most sensitive information that exists. Gemma 4 is an open model that can run locally or be accessed via OpenRouter without sending data to a large proprietary cloud. For a domain this sensitive, that matters enormously.&lt;/p&gt;




&lt;h2&gt;
  
  
  Technical Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────┐
│            User's Browser               │
│  Next.js 14 · React 18 · TypeScript     │
│                                         │
│  Landing → Check-in → Results → Chat   │
└──────────────────┬──────────────────────┘
                   │ HTTPS (no API key exposed)
┌──────────────────▼──────────────────────┐
│           Next.js API Routes            │
│     (Server-side — Vercel Edge)         │
│                                         │
│  POST /api/assess  →  Initial triage    │
│  POST /api/chat    →  Ongoing support   │
└──────────────────┬──────────────────────┘
                   │ Bearer token (server env var)
┌──────────────────▼──────────────────────┐
│         OpenRouter API                  │
│    google/gemma-4-31b (31B dense)       │
│                                         │
│  Structured JSON assessment output      │
│  Multimodal input (text + images)       │
│  128K context for full chat history     │
└─────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key technical decisions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Server-side API key&lt;/strong&gt; — The OpenRouter key never touches the client. It lives in Vercel's environment variables and is called only from Next.js API routes. Users just use the app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structured JSON output&lt;/strong&gt; — The initial assessment prompt asks Gemma 4 to return a strict JSON schema with triage level, symptoms, coping strategies, resources, affirmation, and disclaimer. This makes the output predictable, parseable, and safe to render.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Triage-aware prompting&lt;/strong&gt; — The chat continuation prompt is dynamically adjusted based on the triage level. A "crisis" level conversation has different system instructions than a "low" concern — the model is told to prioritize crisis line resources in every response.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trauma-informed system prompts&lt;/strong&gt; — The prompts were written using trauma-informed communication principles: validate before advising, never minimize, use "I" statements, keep language warm and non-clinical.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stack
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Framework&lt;/td&gt;
&lt;td&gt;Next.js 14 (App Router)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language&lt;/td&gt;
&lt;td&gt;TypeScript&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;Tailwind CSS + CSS Variables&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Model&lt;/td&gt;
&lt;td&gt;Gemma 4 31B via OpenRouter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Vercel (free tier)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Image upload&lt;/td&gt;
&lt;td&gt;react-dropzone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Markdown&lt;/td&gt;
&lt;td&gt;react-markdown&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  The Triage System
&lt;/h2&gt;

&lt;p&gt;MindBridge uses a four-level triage system modeled loosely on real mental health intake processes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;Example signals&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🟢 &lt;strong&gt;Low&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Mild everyday stress&lt;/td&gt;
&lt;td&gt;Work pressure, minor anxiety&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔵 &lt;strong&gt;Moderate&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Needs attention&lt;/td&gt;
&lt;td&gt;Sleep problems, low mood, social withdrawal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🟠 &lt;strong&gt;High&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Significant concern&lt;/td&gt;
&lt;td&gt;Panic attacks, trauma symptoms, major life crisis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔴 &lt;strong&gt;Crisis&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Immediate danger&lt;/td&gt;
&lt;td&gt;Suicidal ideation, self-harm, active danger&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For &lt;strong&gt;Crisis&lt;/strong&gt; level, the UI changes dramatically — a pulsing red banner with crisis line numbers appears immediately, before any other content. The chat input shows a permanent reminder to call 988 or 911. Gemma 4's system prompt is rewritten to prioritize connecting the user to professional help above all else.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned Building This
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Prompt engineering for mental health is genuinely hard
&lt;/h3&gt;

&lt;p&gt;Getting Gemma 4 to consistently return valid JSON while also being warm and empathetic required significant iteration. Early versions were either too clinical (returned perfect JSON but felt cold) or too conversational (great tone but malformed output). The solution was separating the structured assessment from the conversational chat — two different prompt strategies for two different needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Structured output is your best friend
&lt;/h3&gt;

&lt;p&gt;Asking Gemma 4 to return a strict JSON schema for the initial assessment — rather than free-form text — made the entire downstream experience reliable. The model is remarkably good at this when the schema is clearly specified in the system prompt with examples.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Open models enable trust in sensitive domains
&lt;/h3&gt;

&lt;p&gt;For a mental health application, the fact that Gemma 4 is open matters beyond the technical. Users (and regulators) increasingly want to know where sensitive conversations go. With an open model, the answer is clear and auditable. This is a real advantage over proprietary alternatives for this use case.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The smallest UX details carry enormous weight
&lt;/h3&gt;

&lt;p&gt;A mental health tool isn't just a technical product — every word, color, and interaction either builds trust or erodes it. The warm cream palette instead of clinical white. "What I'm hearing" instead of "Symptoms detected." "Things that can help right now" instead of "Recommended interventions." These choices matter enormously when someone is vulnerable.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next for MindBridge
&lt;/h2&gt;

&lt;p&gt;The foundation is solid. Here's what I'd build next with more time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On-device mode&lt;/strong&gt; using Gemma 4's 4B model (runs on a phone) for fully offline, completely private support&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice input&lt;/strong&gt; — many people find it easier to speak than type when distressed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mood tracking&lt;/strong&gt; across sessions with optional local storage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Localization&lt;/strong&gt; — mental health resources are country-specific; a Nigerian user needs different resources than a US user&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Professional handoff&lt;/strong&gt; — structured summaries a user can share with a therapist to accelerate their first session&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Safety &amp;amp; Ethics
&lt;/h2&gt;

&lt;p&gt;I want to be transparent about the limitations and safety considerations:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What MindBridge is:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A compassionate first point of contact&lt;/li&gt;
&lt;li&gt;A bridge to professional care and crisis resources&lt;/li&gt;
&lt;li&gt;A private space to process feelings without judgment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What MindBridge is NOT:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A replacement for professional mental health care&lt;/li&gt;
&lt;li&gt;A diagnostic tool&lt;/li&gt;
&lt;li&gt;A crisis intervention service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every response includes a disclaimer. Crisis-level triage immediately surfaces 988, Crisis Text Line, and findahelpline.com. The system prompts explicitly position MindBridge as a companion, not a clinician.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live:&lt;/strong&gt; &lt;a href="https://mindbridgementalhealth.vercel.app/" rel="noopener noreferrer"&gt;https://mindbridgementalhealth.vercel.app/&lt;/a&gt;&lt;br&gt;
🐙 &lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/Tallest18/gemma4-mental-health" rel="noopener noreferrer"&gt;https://github.com/Tallest18/gemma4-mental-health&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No sign-up. No data stored. No cost. Just open it and talk.&lt;/p&gt;




&lt;p&gt;If this resonates with you, or if you've experienced the gap in mental health access firsthand — I'd love to hear your thoughts in the comments. And if you're struggling right now: you don't have to figure it out alone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;988&lt;/strong&gt; (US)/ &lt;strong&gt;112&lt;/strong&gt; (NG) · &lt;strong&gt;findahelpline.com&lt;/strong&gt; (international)&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with Gemma 4 for the &lt;a href="https://dev.to/challenges/gemma4"&gt;DEV.to Gemma 4 Challenge&lt;/a&gt; · May 2026&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
    <item>
      <title>New Beginnings</title>
      <dc:creator>Blessing Aighangbe</dc:creator>
      <pubDate>Fri, 08 May 2026 09:29:41 +0000</pubDate>
      <link>https://dev.to/tallest18/new-beginnings-4h49</link>
      <guid>https://dev.to/tallest18/new-beginnings-4h49</guid>
      <description>&lt;p&gt;I am excited to be here 💃💃💃💃&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
