DEV Community

Aditya rane
Aditya rane

Posted on

LiftCast: A Local-First AI Workout Forecaster Built for a Friend

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

My friend lifts four days a week at our college gym. He never logs his workouts. Instead, he just texts me quick WhatsApp notes on his walk home: "bench 60 8 8 7, last set died". Because his history lived in unstructured chats, he had no way of knowing whether his strength was actually progressing or stalled.

LiftCast is a local-first tracker and strength forecaster built for his workflow:

  • 10-Second Shorthand Logger: Pastes raw text, typos, or Hinglish notes. A local Gemma model parses them into structured sets via an enforced JSON schema.
  • In-Context Progress Forecaster: Prior Labs' TabPFN runs locally on CPU to forecast his next session's top set with calibrated 95% prediction intervals.
  • Plateau Detection & Barbell Visualizer: Uses a 56-day regression slope to flag genuine stalls (ignoring routine deloads) and renders a color-coded barbell sleeve graphic showing exact plates to load.
  • Hands-Free Audio Briefing: Synthesizes a 10-second voice recap via ElevenLabs (with offline browser speech fallback) straight into his gym earbuds.

Demo

🎬 Watch 20s Product Demo (MP4)

Open in GitHub Codespaces

  PYTHONPATH=src streamlit run app.py
Enter fullscreen mode Exit fullscreen mode
  • Local Demo Data: In the app sidebar, click "Seed Rich 6-Month Demo DB" to populate 26 weeks of authentic training plateaus, forecasts, and plate calculations across 7 compound lifts.

LiftCast Architecture

Code

Live Repository: github.com/Adityarane012/LiftCast

⚡ LiftCast

A local-first AI workout logger and strength progress forecaster, built for a friend.
Entry for the DEV Hacktoberfest Weekend Challenge: "Build for a Friend"

CI Tests: Passing Python: 3.11 | 3.12 | 3.13 License: MIT Privacy: 100% Local

LiftCast Hero Banner


🎯 The Real Problem

My friend lifts 4 days a week at our college gym. He has never logged a single session.

Every existing tracker (Strong, Hevy, Liftoff) demands structured data entry while you are out of breath:

  1. Tap search.
  2. Pick the exact movement variant from a dropdown.
  3. Type weight, type reps.
  4. Tap checkmark for set 1.
  5. Repeat 15 to 20 times per session.

The friction is too high. Instead, he texts me informal notes on WhatsApp while walking home:

"bench 60 8 8 7, last set died"
"aaj lat pulldown 55 pe 10 10 9"

Because he never logs, he cannot answer the central question of strength training:
"Am I actually progressing on this lift over the last 8 weeks, or have I…

Key components:

  • src/liftcast/forecast.py: Local CPU TabPFN forecaster with a 40-point rolling-origin backtest.
  • src/liftcast/parser.py: Schema-constrained Gemma parser via Ollama with heuristic regex fallback.
  • src/liftcast/detect.py: 56-day least-squares linear slope plateau detection.
  • src/liftcast/coach.py: Strict regex numeric guard preventing LLM stat hallucinations.

How I Built It

  • TabPFN (Prior Labs): In-context tabular foundation model running locally on CPU. We normalize lift history as a ratio to personal best, allowing a single prior to forecast across disparate exercises without fine-tuning.
  • Gemma (Google / Ollama): Runs locally (gemma4:e2b / gemma3:1b) with an enforced JSON schema to extract structured exercises, units, and rep arrays.
  • Strict Numeric Guard: Pure mathematical verification layer. Every number in coach summaries is validated against deterministic database stats before speech synthesis.

Why Does Open Innovation Matter?

  • Data Sovereignty: Workout logs, bodyweight, and personal notes stay in a local SQLite database (data/liftcast.db). Zero cloud egress.
  • 100% Offline Gym Floor Reliability: Works in basement gyms with zero cell service—local Ollama, local CPU TabPFN, and native browser speech fallback.
  • Permanent Availability: Open weights and local inference mean no monthly API bills, no rate limits, and zero risk of vendor deprecation.

My Agent Session

Pair-programmed with an AI coding agent to implement the math core, build 59 automated tests, and configure multi-version CI testing (Python 3.11, 3.12, 3.13) on GitHub Actions.

{% agent_session 4326f2b3-2ac2-4dfd-8d9d-9c1622013b1d %}

Prize Categories

Best Use of TabPFN

LiftCast uses TabPFN running locally on CPU to perform in-context strength progression forecasting and uncertainty estimation from historical session logs, evaluated via a 40-point rolling-origin backtest benchmark against traditional linear regression baselines.

Top comments (1)

Collapse
 
launchgatecheck profile image
Launch Gate •

I'd make the audio path's privacy boundary explicit. The local SQLite/Gemma/TabPFN setup and the ElevenLabs recap are different data flows, so "zero cloud egress" needs a narrower label if the recap sends workout-derived text out. A useful fixture is a synthetic note with a distinctive marker: generate the briefing with network access blocked, then with cloud speech enabled, and show exactly what leaves in that mode. Is browser speech the default, with a separate opt-in for sending the recap to ElevenLabs?