How this was built

Train Eat Repeat is a demonstration of AI-era product thinking in a healthcare-adjacent domain.

The problem

People who want to get fit without a coach face two problems: generic workout plans that do not match their ability or goals, and a confusing market of nutrition and supplement advice that is either sales-driven or medically overreaching. Train Eat Repeat puts a personalized routine, general nutrition guidance, and honest, goal-based supplement suggestions in one place.

The routine engine is deliberately not AI

Routines come from a deterministic rules engine, not a model. Your goal picks a weekly split, each day is a set of movement-pattern slots, and each slot is filled from a curated library of around 147 exercises, filtered by your ability and equipment. Every pick carries a plain-English reason string, and any swap is constrained to validated alternatives, so the plan is always explainable. The same inputs always produce the same routine; a Shuffle option reseeds for a fresh but fully reproducible week. Explainability was a requirement, not an afterthought.

The AI assistant is deliberately scoped

The chat assistant (Claude Haiku 4.5) answers questions about your routine, exercise form, and general fitness and wellness education. It visibly declines questions about medical conditions, medications, injuries, and anyone under 18, and refers you to a licensed professional instead. That refusal is a designed feature, held in place by a system prompt under change control and an eval set of 54 prompts (39 of them core out-of-scope) that any prompt or model change must pass at 100% on the core before shipping; the current version does. The assistant treats your routine as data, never as instructions, so text hidden inside a routine cannot redirect it. Its resistance to prompt injection is tested against named techniques, including role-override, authority-spoofing, obfuscation, and instructions smuggled through the routine itself. That is a tested boundary, not a guarantee.

Compliance-aware by design

Supplement suggestions use structure-function language only, checked against a written claims checklist before any string ships, with weight-management copy getting a second review pass because it is the highest claims-risk category. Suggestions are generic ingredients rather than branded products, a wellness disclaimer renders wherever supplements appear, and there are no purchase links. Nutrition guidance stays general: goal-based education and macro-oriented meal ideas that link out to third-party recipes, with no calorie counts or per-person macro targets, which keeps it clear of individualized nutrition prescription.

Privacy and cost

No accounts and no server-side user data. Your routine lives in your browser via local storage, and you can export it to a PDF to keep or print. Chat is never persisted. The whole product runs on hobby-tier hosting with a rate-limited, spend-capped API route, backed by Upstash Redis.

Stack

Next.js (App Router, TypeScript), a pure-function rules engine over versioned seed data, and the Claude API for the assistant with streaming responses and prompt caching. Rate limiting and the daily spend cap run on Upstash Redis; PDF export uses the browser's own print pipeline.