DEV Community

Rahul Gupta
Rahul Gupta

Posted on

Gym Plan Drafter: an open-weight AI that drafts safe, budget-aware workout plans for trainers

What I Built

Gym Plan Drafter is a small web app for gym trainers. The trainer enters a client's age, job type, goal, experience, days per week, minutes per session, diet type and food budget. In about 10 seconds the app writes a draft weekly workout plan and simple Indian meal ideas. The trainer checks and edits it before the client sees it.

Writing a plan by hand takes time, so many clients end up with the same copied sheet. That sheet fails when the client is a vegetarian on a small budget or has only 30 minutes.

Who would pay: gym trainers and small gym owners, because it saves time on every new client. I have not asked my first user about pricing yet, so I can't say what they would pay.

Demo

Gym Plan Drafter plan for an adult client, 4 days

Gym Plan Drafter plan for a 16-year-old client with the Trainer must check box

Code

https://github.com/Rahulgupta-63/gym-plan-drafter

How I Built It

  • Model: GPT-OSS 20B (openai/gpt-oss-20b), an open-weight model, through the Groq API.
  • App: Python and Streamlit, deployed on Streamlit Community Cloud.

The hard part was trust, not the model. My first version gave eggs to a vegetarian client, and quinoa, hummus and almonds on a "low budget" plan. A trainer would stop using a tool like that after one bad plan.

So I added two layers:

  1. Rules in the prompt: exact number of days, minutes that add up, food that fits the diet and budget, no calorie numbers.
  2. A checker in code: every plan is tested against these rules. If it fails, the app sends the exact problems back to the model and tries again, up to 2 more times. If it still fails, the plan is shown with a clear warning.

Safety choices:

  • I first thought about asking clients for body photos. I dropped the idea, because it is a privacy risk and a photo cannot reliably tell what a body needs.
  • No calorie targets.
  • Under 14: no plan.
  • Under 18: general fitness only, and the plan must tell the trainer to supervise, keep loads light, and tell a parent or guardian.

Tests: 170 automated checks on 10 client profiles. They test my rules and retry logic with a fake model. They do not test the model itself.

Honest limits: the model runs on Groq's servers through an API, so client details leave the trainer's computer. Don't enter names or medical details. The plans are drafts, not medical advice.

Why Does Open Innovation Matter?

The product is the rules and the checker, not one model. Because the model is open-weight, I can swap it and run the same checks again. This is not just theory for me: last week a Llama model I used on Groq became unavailable, and I moved to GPT-OSS by changing one line.

I did not test a closed model side by side, so I can't claim mine is better. What I can say is that I am not locked to one company's model or price.

Next step (not built yet): run a small open model on the gym's own PC, so a client's health details never leave the gym.

My First User

A gym trainer I know tried the app. They tested a fat-loss profile: an MCA student at KNIT Sultanpur on a 4-day schedule. They told me the plan was "perfect".

That is one friendly person, so I treat it as a start, not proof.

What they asked for next: they asked if the app could also explain how to perform each exercise. That is the first feature I will add. It is not built yet.

AI Disclosure

I used an AI assistant (Claude) to help write the code and draft this post. I tested the app, deployed it, showed it to a real trainer, and edited the post myself.

Thanks for reading!

Top comments (0)