<?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: Abhinav dwivedi</title>
    <description>The latest articles on DEV Community by Abhinav dwivedi (@abhinav_dwivedi_0fdba8ac6).</description>
    <link>https://dev.to/abhinav_dwivedi_0fdba8ac6</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3954803%2Fdaac05c7-1181-4500-9ba5-079e650551e0.png</url>
      <title>DEV Community: Abhinav dwivedi</title>
      <link>https://dev.to/abhinav_dwivedi_0fdba8ac6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhinav_dwivedi_0fdba8ac6"/>
    <language>en</language>
    <item>
      <title>My Streak Survived a Bad Day: Building Bahar with Open-Weight AI</title>
      <dc:creator>Abhinav dwivedi</dc:creator>
      <pubDate>Sun, 11 Oct 2026 16:36:02 +0000</pubDate>
      <link>https://dev.to/abhinav_dwivedi_0fdba8ac6/bahar-a-training-app-that-expects-your-bad-days-fh4</link>
      <guid>https://dev.to/abhinav_dwivedi_0fdba8ac6/bahar-a-training-app-that-expects-your-bad-days-fh4</guid>
      <description>&lt;p&gt;This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/p&gt;

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

&lt;p&gt;Most fitness apps treat a missed day as a failure. One bad night’s sleep or one rainy evening, the streak resets, and people quietly quit.&lt;/p&gt;

&lt;p&gt;Bahar is built on the opposite idea: it expects bad days and adjusts your training instead of breaking your streak. It’s an offline-first training app for badminton players, aimed at people who train in short, irregular sessions or are coming back from a break.&lt;/p&gt;

&lt;p&gt;Every day, you do a ten-second check-in on sleep, soreness, and energy. Bahar turns that into an envelope, a hard limit on intensity and minutes. An open-weight model then writes that day’s session inside the limits, using only drills from a vetted library. Good day, full session. Bad day, lighter session, and your streak survives.&lt;/p&gt;

&lt;p&gt;Then the point of the app: put the phone away. Workout mode gives you voice cues and a timer that keeps running with the screen locked. Afterwards, a Screen vs. Court view compares your passive phone time with your active court time, and a Court Spots directory gets you from “where do I play?” to a session in one tap.&lt;/p&gt;

&lt;p&gt;Demo&lt;br&gt;
Video: &lt;a href="https://youtu.be/9bNjvZYJ68c" rel="noopener noreferrer"&gt;https://youtu.be/9bNjvZYJ68c&lt;/a&gt;&lt;br&gt;
Live app: &lt;a href="https://wingigs.vercel.app/" rel="noopener noreferrer"&gt;https://wingigs.vercel.app/&lt;/a&gt;&lt;br&gt;
Code : &lt;a href="https://github.com/learnerabhinavdwivedi-droid/wingigs" rel="noopener noreferrer"&gt;https://github.com/learnerabhinavdwivedi-droid/wingigs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How I Built It&lt;br&gt;
Frontend: Next.js and TypeScript, installable as a PWA&lt;br&gt;
Storage: Dexie / IndexedDB, so training history stays on the device and no account is needed&lt;br&gt;
AI: Gemma 2 2B, an open-weight model, served through an Ollama-compatible OpenAI endpoint and called from a small gateway route&lt;br&gt;
Context: live weather and air quality from Open-Meteo feed the daily envelope&lt;/p&gt;

&lt;p&gt;The most important design decision was not letting the model make safety decisions. A plain rule engine sets the limits. The model only chooses and orders drills inside them. Its JSON output is schema-checked, then validated against the envelope: only real drill IDs, no intensity above the cap, no minutes over budget. If anything fails, a hand-written fallback plan takes over, so the app works even when the model doesn’t.&lt;/p&gt;

&lt;p&gt;The model sees the day’s limits, the drill list, and an optional note the user types. It does not receive sleep, soreness, or health logs.&lt;/p&gt;

&lt;p&gt;Why Does Open Innovation Matter?&lt;/p&gt;

&lt;p&gt;Training data is health data. An open-weight model can run on hardware I control, including a local Ollama instance, so the most personal inputs never need to go to a third-party API.&lt;/p&gt;

&lt;p&gt;Open models also let me swap the model without rewriting the app. The gateway speaks the standard OpenAI-compatible format, so moving between a small local model and a larger hosted one is a configuration change. And because the guardrails are readable code, anyone can check why Bahar told them to rest today. That’s much harder to trust with a closed black box.&lt;br&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9jlcmifyarry6g28c7r.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9jlcmifyarry6g28c7r.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
