Forge
AI-driven workout planning that treats your training programme as a state machine — generate, log, analyse, adapt.
Every personal trainer eventually says the same thing: "we'll adjust as we go." Forge takes that promise literally and builds it out of FastAPI, Postgres, and a Claude pipeline that never tires of your excuses.
The premise is simple — tell it your goals, equipment, and fitness level, and it designs a programme. The interesting part is what happens after. You log a session; a background task quietly asks Claude what your numbers mean and nudges the next workout accordingly. Every Monday at 06:00 UTC an APScheduler cron synthesises the week and rewrites the plan. Your training programme isn't a PDF you ignore by Wednesday — it's a state machine that adapts whether you like it or not.
Architecturally, Forge is a study in restraint. Programme generation is a long job, so the API does the honest thing: returns 202 Accepted with a job id and lets you poll, rather than holding a connection open while a language model thinks. Pipeline state lives in MongoDB; the systems of record — programmes, sessions, health metrics — live in Postgres. The split is deliberate: ephemeral job churn doesn't get to pollute the relational core.
Then there's data isolation between members of a household, which is where this kind of app usually leaks. Forge partitions every table by owner and means it. Every SELECT carries its .where(Model.owner_id == user.id); recommendations.py joins back through the programme's owner before it will mutate a single set, so a creative request can't apply someone else's deadlift PR to your workout. BOLA — the "just change the ID in the URL" attack — is defended at the query layer, not the comment layer.
The details betray a developer who has been burned before. UUID columns use SQLAlchemy's generic Uuid(as_uuid=False) so they render as CHAR(32) in SQLite and native UUIDs in Postgres — the test suite runs against SQLite without a single production-only surprise. INTERNAL_SECRET being unset returns 503, not 401, because a misconfigured deployment should fail loudly, not pretend to be unauthorised. A nightly job hard-deletes departed users' data in FK-safe order once the retention window ends — GDPR-by-cron, no manual scripts at 2am.
It's Next.js 16 on the front, server components and Auth.js v5 carrying the session, deployed to Cloudflare Workers via OpenNext. Every Claude call uses prompt caching, because paying full price to re-send the same system prompt is the kind of thing you only do once.
Forge is, underneath the fitness veneer, a well-behaved distributed system that happens to care about your squat depth. The AI is the headline; the engineering is the reason it works.