This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
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.
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.
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.
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.
Demo
Video: https://youtu.be/9bNjvZYJ68c
Live app: https://wingigs.vercel.app/
Code : https://github.com/learnerabhinavdwivedi-droid/wingigs
How I Built It
Frontend: Next.js and TypeScript, installable as a PWA
Storage: Dexie / IndexedDB, so training history stays on the device and no account is needed
AI: Gemma 2 2B, an open-weight model, served through an Ollama-compatible OpenAI endpoint and called from a small gateway route
Context: live weather and air quality from Open-Meteo feed the daily envelope
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.
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.
Why Does Open Innovation Matter?
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.
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.

Top comments (0)