<?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: bluerockymountain</title>
    <description>The latest articles on DEV Community by bluerockymountain (@passivenotcodecoment).</description>
    <link>https://dev.to/passivenotcodecoment</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%2F3609705%2F0f5ef451-28c8-493f-bb8c-f11926a38836.png</url>
      <title>DEV Community: bluerockymountain</title>
      <link>https://dev.to/passivenotcodecoment</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/passivenotcodecoment"/>
    <language>en</language>
    <item>
      <title>Companion — A Privacy-First Health Companion for Diabetes and Hypertension</title>
      <dc:creator>bluerockymountain</dc:creator>
      <pubDate>Sun, 24 May 2026 14:36:58 +0000</pubDate>
      <link>https://dev.to/passivenotcodecoment/companion-a-privacy-first-health-companion-for-diabetes-and-hypertension-1gjo</link>
      <guid>https://dev.to/passivenotcodecoment/companion-a-privacy-first-health-companion-for-diabetes-and-hypertension-1gjo</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Build with Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Companion is a quiet daily check-in for people managing Type 2 diabetes and high blood pressure together — which is most of them. (Roughly 70% of people with diabetes also have hypertension.)&lt;/p&gt;

&lt;p&gt;The problem: 537 million people worldwide live with diabetes. Most see their doctor once every three to six months. Between visits, they collect numbers in a notebook or an app — and they have no way of knowing what those numbers mean &lt;em&gt;together&lt;/em&gt;. Was Tuesday's 215 mg/dL bad? Is the blood pressure trend going up? Did missing one dose of amlodipine actually matter?&lt;/p&gt;

&lt;p&gt;Companion reads a week of their readings the way a kind nurse would. It:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Flags danger zones first&lt;/strong&gt; — any reading that warrants a call to the doctor today&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spots patterns&lt;/strong&gt; — "Rice meals on Tuesday and Saturday both pushed glucose over 215. Worth noticing."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Suggests one small thing to try&lt;/strong&gt; — not generic advice, a specific experiment based on &lt;em&gt;their&lt;/em&gt; data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writes a clinical summary&lt;/strong&gt; they can hand to their doctor at the next appointment — clean, factual, 30 seconds to scan&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every reading stays in the user's browser. No backend, no database, no account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🎥 &lt;strong&gt;Video walkthrough:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/XUSMMYL_zvY"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;🌐 &lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://companion-sooty.vercel.app" rel="noopener noreferrer"&gt;https://companion-sooty.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The flow is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Paste your week of readings (or load the sample)&lt;/li&gt;
&lt;li&gt;Click "Analyze my week"&lt;/li&gt;
&lt;li&gt;See danger flags, trends, one suggested experiment, and a doctor summary&lt;/li&gt;
&lt;li&gt;Download the PDF for your next appointment&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;📦 &lt;strong&gt;GitHub:&lt;/strong&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kangeli13" rel="noopener noreferrer"&gt;
        kangeli13
      &lt;/a&gt; / &lt;a href="https://github.com/kangeli13/companion" rel="noopener noreferrer"&gt;
        companion
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Companion&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A quiet daily check-in for people managing diabetes and high blood pressure. Paste your week's readings, get a plain-language briefing of what's normal, what needs attention, and one small thing to try — plus a clean PDF summary to bring to your next doctor's appointment.&lt;/p&gt;
&lt;p&gt;Built for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06" rel="nofollow"&gt;DEV.to Gemma 4 Challenge&lt;/a&gt;, May 2026.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why this exists&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;There are 537 million people living with diabetes worldwide. Most of them see their doctor once every three to six months. In between, they collect numbers in a notebook or an app and have no idea what those numbers mean together.&lt;/p&gt;
&lt;p&gt;Companion is the in-between. It reads a week of glucose and blood pressure readings the way a kind nurse would — looks for danger zones, spots patterns, suggests one specific thing to try, and writes a clinical summary the doctor can scan in 30 seconds.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How it works&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;It's a…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kangeli13/companion" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The entire app is one HTML file. No framework, no build step, no npm install. The only dependency is jsPDF (loaded via CDN) for the doctor-summary download. The "intelligence" of the app lives almost entirely in the system prompt — which I tuned more times than I'd like to admit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The model call is dead simple:&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://openrouter.ai/api/v1/chat/completions&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Authorization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;google/gemma-4-26b-a4b-it:free&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;system&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SYSTEM_PROMPT&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Here are my readings for the past 7 days:\n\n&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;readings&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1500&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system prompt is where the product lives. It defines reference ranges, output schema, tone rules ("Talk like a kind friend who happens to be a nurse, not a textbook"), and explicit safety constraints (never replace medical advice, always include a doctor summary).&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Used Gemma 4
&lt;/h2&gt;

&lt;p&gt;I chose &lt;strong&gt;Gemma 4 26B MoE (4B active)&lt;/strong&gt; — the Mixture-of-Experts variant — and the model choice is load-bearing for this product.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why MoE and not the 31B Dense:&lt;/strong&gt; Companion needs to feel snappy. People won't use a daily check-in tool that takes 12 seconds to respond. MoE gives me reasoning quality close to the Dense model with only 4B parameters active per token, which means low latency on OpenRouter's free tier. For a daily-use tool, that latency budget matters more than the last few points of benchmark accuracy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why MoE and not E4B:&lt;/strong&gt; The reasoning task here is genuinely hard. The model has to connect a Tuesday glucose spike to the rice-and-chicken meal noted on Tuesday, then notice the same pattern on Saturday's curry. It has to understand that a missed amlodipine dose on Tuesday correlates with the BP creeping up. It has to weigh five different reference ranges simultaneously and decide what's worth flagging vs. mentioning vs. ignoring. E4B (4B parameters) starts to drop signals here. The MoE's expert routing handles the cross-domain reasoning — diet, medication adherence, time-of-day patterns — without bloating active parameter count.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Gemma 4 at all (and not Gemini Flash or GPT-4o-mini):&lt;/strong&gt; Apache 2.0 license matters more than people realize for health applications. The architecture is intentionally swappable to a fully local Gemma 4 E4B deployment via LiteRT-LM or Ollama once the local inference path stabilizes. For privacy-strict markets — German healthcare, EU GDPR contexts, anyone who can't send patient data to a US cloud — that migration path is the difference between "interesting demo" and "actual product." The hosted call today is a deployment convenience. The model choice is for tomorrow's privacy guarantee.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Gemma 4 unlocked that I couldn't have built two years ago:&lt;/strong&gt; The reasoning. Earlier open models would have given me a summary ("Your glucose ranged from 128 to 268 this week, average 144"). Gemma 4 gives me an &lt;em&gt;insight&lt;/em&gt; ("Your two highest readings both followed rice-heavy meals. Worth noticing.") That shift — from summary to insight — is what makes the difference between a logging app and a companion.&lt;/p&gt;

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

&lt;p&gt;I built this in roughly seven hours and I cut a lot of nice-to-haves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ Multimodal photo upload (would let users snap their glucometer screen) — saved for v2&lt;/li&gt;
&lt;li&gt;❌ Trend charts over multiple weeks — the doctor PDF carries enough&lt;/li&gt;
&lt;li&gt;❌ Mobile app — the web works fine on a phone browser&lt;/li&gt;
&lt;li&gt;❌ User accounts — everything lives in the browser, that's the privacy story&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What I kept is the smallest possible thing that actually helps someone between doctor visits. That's the whole pitch.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note on responsibility
&lt;/h2&gt;

&lt;p&gt;I'm not a doctor. The app is explicit about this — every screen, every PDF, includes "this is not medical advice." The reference ranges in the prompt come from standard ADA and AHA guidelines, but the model can still get things wrong. The product is built around the assumption that a human doctor is in the loop. Companion's job is to help that conversation happen — not replace it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;If you have access to a friend or family member managing diabetes or hypertension, ask them to log a week of readings into Companion and see if the briefing tells them anything they didn't know. That's the test I cared about most.&lt;/p&gt;

&lt;p&gt;Thanks to the DEV team and Google for putting this challenge together — and especially for surfacing the open-weight story. Apache 2.0 on a model this capable is genuinely a big deal for healthcare.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built solo for the Gemma 4 Challenge, May 2026.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>gemmachallenge</category>
      <category>gemma</category>
      <category>devchallenge</category>
    </item>
  </channel>
</rss>
