Andre KnuchelSummer 25 – Winter 26Fitness platform
Fictional figures

Every result number on this page is fake: the real values were scaled in proportion so the client’s data stays private. The conclusions are unchanged.

Project overview · 20 November 2026

Fitness platform

Training plans that bend without breaking.

The fitness platform offers private coaching for adventure training: obstacle races, mountain objectives, long-distance running. A coach writes the plan. On any day the client can ask for something different, and the engine adjusts that one session while the plan stays exactly as the coach wrote it.

Make it easier

Each exercise gets two options: the same movement with fewer reps and longer rest, or a similar movement one step easier. Harder works the same way.

exercise level · two-option card
Not this workout

The engine offers a replacement from the same pillar of the plan, so a grip day stays a grip day and the week stays balanced.

workout level · same-pillar swap
Not today

The session moves later, never disappears, and the rest of the block is re-ordered so the same kind of session doesn't land twice in a row.

schedule level · re-sequencing

Every option has already passed the client's safety filters (injuries, equipment, level, and exercises they never want to see) before it is offered.

Fictional figures, scaled from the real results.

The idea behind the engine

A request only has an answer if the system knows what each exercise costs

The platform describes every exercise with the same ten numbers. Workouts, sessions and program weeks are summed from their exercises, so they use the same ten numbers. A swap on one exercise can then be checked against the shape of the whole week.

One exercise, ten numbers:

Draft profile from the coach's sheet export ·

Shape: five axes that always add up to 1. They say what the exercise looks like, not how hard it is.

Hardness: one intensity number from 0 to 1, kept separate from the shape.

Stimulus: strength, muscle growth and endurance. These come from the prescription, because 5×4 and 3×18 of the same lift train different things. The exercise itself doesn't carry them.

Mental demand: grit, monotony, discomfort. This is the number to lower when someone is mentally flat rather than physically tired.

Shape and hardness stay apart

"Easier" lowers intensity and holds the shape. A leg session made easier is still a leg session.

Effort is weighed, not timed

Each set has a fixed cost for setup and focus, and hard seconds count more than easy ones. Counting raw seconds makes a plank look bigger than a heavy squat.

The plan is never edited

Every session is a copy of the coach's workout that records what was actually served. Planned and delivered can be compared afterwards.

Two options, never a list

One option keeps the movement and changes the dose. The other keeps the dose and changes the movement. Both are scaled to the same effort.

Safety runs first

Injuries, level, equipment and the client's never-show list filter every option. A blocked exercise is replaced with the closest safe one. If none exists, the session is refused rather than served half-made.

Pillars keep the week balanced

Clients can turn down a workout, never a whole pillar. Simulations showed this keeps weekly balance with no pillar missed.

Why the weighing matters, on a session from the plan

Workout 2 (pillar: Uphill) of the plan , recomputed for this page

Counted in raw seconds, the uphill session reads as a core day, because the progressive plank holds are long. Counted in effort units, it reads as the cardio session the coach wrote. Every "how much of this was cardio" question in the engine is answered in effort units.

Where it stands

Live on the web, free, with draft coaching data

The machinery is built and live. What limits it now is the coaching content, which only the coach can supply.

WebsiteLive on the company's domainFree for version 1. Hosted on Infomaniak, deployed from branch IOS.
Workout engineLiveSwap card, workout swap, skip-a-day, safety filters and body check, all in the database.
Database11 of 12 migrations liveBilling (#8) is held back on purpose until payments go on.
Coaching contentDrafts awaiting review exercise profiles are drafts. 1 of 16 programs has a plan.
PaymentsBuilt, switched offStripe, web only. Tested on a copy of the database.
iOS appNot startedNeeds macOS 15.6+ and Xcode 26 on the dev Mac, and an Apple Developer account.
AI requestsNot builtThe /start guide is a scripted questionnaire. The boundary for a model is designed (see below).
Risk ratingsWaiting on the coach default ratings ready to review; the import has not been run.
Working treeUncommitted changes19 modified and 2 new files: legal and FAQ copy, password hints, program pages, deploy script.
Method

How the engine works, from one exercise up to the schedule

Each level below builds on the one before it. Samples follow the structure of the coach's data export of 3 November 2026, with identifiers replaced and values changed.

Reading the samples. Values like ex·1a2b3c4d stand in for the real identifier or coach-written note: 8 random hex characters, generated once and never saved, so a value tells rows apart but cannot be traced back. Exercise names are shown in the clear because they are the method. The numbers keep the export's structure and the engine's arithmetic, but the values are changed. No user data appears anywhere; rows marked illustrative show the shape of a record, not a person. Details are in About the samples.

Exercise level · profile

Describing an exercise

Every exercise has exactly one primary movement function, such as hip_hinge, vertical_pull or loaded_carry. A database index enforces the "exactly one". Substitution stays within a function, so a pull-up can become a lat pulldown but never a squat. On top of the function sit the shape axes, intensity and mental demand.

Sample profiles, one per kind of shape

exercises sheet · exercises · all drafts
The profiles are scaffolding, not coaching judgement

All profiles were filled by rule so the engine could run: intensity from difficulty (), mental demand at × intensity, and the shape copied from a default for each movement function. That is why a Pull-Up and a Barbell Row have identical shapes. have been reviewed. The engine's output is only as good as these numbers, so the coach's review is the step that makes it real.

Slot level · prescription

The stimulus comes from the sets and reps

The same Back Squat trains different qualities depending on how it is prescribed. The platform reads the rep count against a small rules table, so retuning the system is an edit to that table, with no code change and no deploy.

Barbell Back Squat, three prescriptions

training_modes sheet

The rules table

stimulus_rules, seed values

Known limit: timed work is converted to rep-equivalents, so a 30-second all-out sprint scores as endurance. Splitting out power would need a fourth weight, which is best left until there are real training logs.

Slot level · effort currency

Weighing a slot in effort units

To sum exercises into a workout, each slot needs a weight. Raw time under tension fails: four sets of five heavy squats take about a minute, three 45-second planks take over two, and the squat day reads as a core day. Effort units fix this with a fixed cost per set and a multiplier that grows with intensity. Both numbers sit in a config table and can be tuned once real logs exist.

effort = (sets × 20 s + working seconds) × (0.35 + 0.65 × intensity)
Working seconds, first match wins: per-set progression→duration→distance→reps→fallback 30 s

Distance is essential here. Much of the obstacle-race content is prescribed in metres ("120m uphill sprint", "3km run"). Without a pace per 100 m, every one of those would score as a 30-second default.

Slots from the plan, one per resolution path

workout_slots sheet, plan · effort recomputed with the engine's formula

The plan's six workouts, weighted by effort

recomputed from the sheet export; the live view may differ in detail
Timed progressions counted as reps

Chair Pose and Calf Jumps are prescribed as holds of 20 s, 40 s and 60 s. Their exercises aren't marked as timed, so the engine reads 20 / 40 / 60 as reps at 3 seconds each: 360 working seconds instead of 120. Workout 4 is overstated as a result. The fix is a data change: mark both exercises as timed.

AMRAP workouts are stored as one round

Workouts 1 and 3 are "as many rounds as possible" formats, but their slots describe a single round. Workout 1 scores units, less than the 8-minute warm-up run on its own (). Their real load depends on the rounds completed, which the plan doesn't record yet. Two slots (Leg Swings, Monkey Bars) also have no measurable quantity and fall back to 30 s per set.

Exercise level · muscles

Three numbers per muscle, each with one job

Raw %MVIC is muscle activation as a percentage of a maximal voluntary contraction. It is stored uncapped, because published values pass 100 (a hip thrust reaches about 170% on the glutes), and clamping would erase the differences the research exists to show. Share divides it so each exercise's muscles add up to 1, which is what fatigue tracking uses. Relative load compares each muscle with the exercise's top muscle. A muscle at 60% or more of the top is primary. Injury risk also uses relative load, because shares shrink as more muscles are entered.

Romanian Deadlift vs Hip Thrust

exercise_muscles sheet · values marked "estimated", carried over from the pre-MVIC coefficients
primarysecondaryprimary threshold, 0.60 of the top muscle

This is why the safety check uses relative load. The erectors are only 25% of a Romanian Deadlift by share, which looks harmless. Against the top muscle they are at 0.58, and that is enough to block the lift for a client with a flexion-intolerant back (see Safety below).

Slot level · the two-option card

Easier or harder, always as two choices

Option A keeps the exercise and changes the dose: sets, reps and rest move by multipliers chosen from how the client feels. Option B keeps the dose and moves one rung along the same movement function. If copying the dose would make no sense, B takes its own reference prescription, scaled to match A's effort. Examples are a rep-based substitute for a timed hold ("Dead Bug for 40 seconds") or metres on a rep exercise ("Wall Ball, 3000 m").

Where "easier" lands: the hip-hinge ladder

exercises sheet · exercises share the function hip_hinge

From Romanian Deadlift (advanced, 0.70), "easier" looks one rung down. Candidates are then ranked by the score below and filtered for safety and equipment. If every exercise had the same difficulty, every intensity would be equal and "easier" would find nothing. The test suite checks for exactly that failure.

How far to move

adjustment_rules, seed values
DirectionClient capacityRuleSetsRepsRestΔ intensity
easier0.00–0.40Deep deload×0.75×0.60×1.50−0.25
easier0.40–0.70Standard deload×1.00×0.75×1.30−0.15
easier0.70–1.00Light trim×1.00×0.85×1.15−0.08
harder0.00–0.85Step up×1.00×1.10×0.90+0.10
harder0.85–1.00Push on×1.00×1.20×0.80+0.18

There is no "how do you feel" input yet, so capacity is fixed at 0.65 and the middle rule of each direction applies.

How option B is chosen

engine_config, coach-approved 3 Nov 2026
score = 0.30 × shape kept (1 − axis distance) + 0.40 × muscle overlap + 0.30 × hardness moved right (1 − |Δintensity − target|) + (client preference − 0.5) thumbs move it ±0.1 − 0.50 × (1 − risk index for this client)

Same function first. Only when no legal candidate is left does the engine widen to the same family (push, pull, legs, core, cardio), and it labels the result "closest movement in the same family". A candidate must also share a primary muscle with the original.

A full card, as the engine produces it

modelled on engine output on a database copy, August 2026, for the demo workout "Full Body A" at capacity 0.35, with values changed. Scoring weights have been retuned since.
Planned
Option A · same movement
Option B · alternative
Back Squat 5×5 / 180 s
Back Squat 4×3 / 270 s
Goblet Squat 5×5 / 180 s
Barbell Bench 4×10 / 120 s
Barbell Bench 3×6 / 180 s
Push-Up 4×10 / 120 s
Barbell Row 3×12 / 90 s
Barbell Row 2×7 / 135 s
Inverted Row 3×12 / 90 s
Plank 3×40 s
Plank 2×24 s / 60 s rest
Dead Bug 1×10 (own prescription)
Bike Sprints 8×20 s
Bike Sprints 6×12 s / 90 s
Tempo Run 1×205 s (wider match)
All five slots on option BIntensityMentalLegsCardioEffort
Planned0.5970.5740.2360.244859
Delivered0.4120.4160.2330.267531

Hardness down 31%, mental load down 28%, and the leg emphasis barely moved. That is the point of keeping shape and hardness apart.

Client level · safety

Every option passes four filters first

1 · Never-show listThe client's own exclusions. Cleared only by the client.
→
2 · LevelEach exercise has a minimum level. A beginner won't get a muscle-up.
→
3 · EquipmentOnly what the client has where they train today.
→
4 · Risk index0 = too risky, 1 = no risk, lowest across the client's active injuries.

The risk index takes the coach's reviewed rating when one exists. Without one, it falls back to a formula over the muscles the injury touches. Only muscles at 50% or more of the exercise's top muscle count:

risk index = 1 − relative load × intensity × severity don't < 0.35 ≤ careful < 0.70 ≤ do

Flexion-intolerant low back, at each severity

risk review sheet · condition · default values, none reviewed yet

This is the case the first version of the engine got wrong. It only excluded primary muscles, so it offered Romanian Deadlift to a client with a bad back, because the erectors are secondary on that lift. Hip Thrust is promoted instead.

The body check keeps no answers

app_save_body_check
AnswersWhere it hurts, what kind, how bad, a diagnosis if any
→
Do / careful / don'tOne verdict and index per exercise, stored

The answers are turned into a per-exercise list and discarded. No table or column can hold them. An uncleared red flag pauses training. The check is asked again after 28 days, or after the coach imports new ratings.

Conditions the check knows

conditions sheet

A blocked slot is replaced, never dropped: the closest legal exercise not already in the session takes the slot at the original's effort, and the reason is recorded. If no legal exercise exists in the family, the session is refused. Stopping mid-workout for pain stores no reason. The client can download a report for a clinician, and their description of the pain is added in the browser without ever reaching the database.

Workout level · same-pillar swap

Turning down a workout, never a pillar

A plan is built from pillars, such as Endurance, Uphill, Grip Strength and Agility & Climb. When a client rejects a workout, the replacement comes from the same pillar. It is scored on closeness in intensity, shape and mental load, plus current muscle fatigue, recency and the number of safety swaps it would need. "Not a grip day today" becomes "here is the easiest grip session".

Choosing the replacement

workout_swap_sim.py · 250 synthetic clients × 12 weeks
StrategyIntensity errorRepeats
Intensity ladder, one rung0.1724.2%
Nearest intensity0.1744.9%
Nearest profile0.1602.1%
Weighted (chosen)0.1682.2%

Weighted is close to the best on both measures, and it is the only strategy that also accounts for fatigue, recency and safety.

Why pillars can't be skipped

same simulation
Pillar swap allowedRedirected in-pillar
Weekly shape drift0.0280.021
Pillars missed per week0.140.00

Carrying a missed pillar over as debt was also simulated. It did nothing, because the owed pillar is always already on the schedule.

Schedule level · re-sequencing

Skipping a day without breaking the block

The remaining sessions are a pool of pillars still owed. The engine repeatedly takes the pillar with the most sessions left. If that pillar was the last one trained, it takes the runner-up and puts the leader back. A skipped session goes back into the pool and is never dropped. The next session is never the pillar just skipped, unless nothing else is left.

Try it on the plan's sessions

the 6 workouts of plan (warm-ups ride along with their workout)
Done
Coming up

Seven sequencing methods compared

schedule_engine_sim.py, rhythm_test.py
MethodBack-to-back repeatsMin gapChurnms
Keep order11.731.0039.71.0
Bubble repair4.551.0238.01.1
Max-remaining heap (used)0.002.000.01.4
Local search0.711.4638.676.4
Simulated annealing0.051.9538.7257.1

The heap wins on every measure at once. It is also provably optimal: at 57% of sessions in one pillar, where 11 repeats are mathematically unavoidable, it produced exactly 11. Churn is zero because the result depends only on what is still owed, so skipping one day barely moves the rest of the calendar. It works at 2 to 6 sessions a week with no special cases.

System level · boundaries

The plan stays fixed, and an AI would only fill in a form

Coach's planworkouts and slots, never edited
→
Session copymade each time a workout is started; swaps are recorded here
→
Logattached to the session, so planned vs delivered can be compared

A session copy is refused if any of its exercises lacks a profile. Without that guard, a workout where one exercise has no profile returns a confident average of the others: plausible, and wrong.

The AI boundary (designed, not built). A future language model would turn "legs are dead, go easy" into one validated row of structured intent, and do nothing else. It never writes SQL and never touches a session. Everything after that row is the deterministic engine above.

  • A bad parse lands as invalid, and the session is left alone.
  • Capacities are clamped on the server. Confidence below about 0.6 asks the client to confirm instead of acting.
  • The raw words sit next to the parsed fields, so "it made my session weird" can be traced.
  • The coach's direction: use it first to sort clients at onboarding.

An intent row

illustrative · no real user

        
Platform

A website, one database, and the engine inside it

There is no separate backend. The engine is written as database functions, and the website calls a small set of entry points.

Architecture

Browserweb today, iOS later via Capacitor
⇄
Next.js 15 siteThe company's domain, on Infomaniak. Pages, 17 thin API routes using the visitor's own session, Stripe (dormant)
⇄
SupabasePostgres 17 in eu-west-1. Sign-in, row-level security, and the engine as SQL functions. The app can call only the app_* entry points.

What visitors and clients see

  • Public: home page, program catalogue, five program pages, exercise library with muscle map, FAQ, legal.
  • Free trial, no account: a guided questionnaire, a quiz that picks a trial program, a trial session and a trial dashboard.
  • Account: email-confirmed sign-up (16+), password reset, account deletion as Apple requires.
  • Members: dashboard, training-day setup, the week-by-week overview, and the session player. The player runs body check → where you train and what you have → your call for the day (step down, as planned, step up) → two-option cards → stop for pain → save.

Stack

  • Next.js 15.5, React 18, TypeScript, Tailwind
  • Supabase: Auth with cookie sessions, Postgres 17, row-level security, generated types
  • Stripe for the web, behind a switch that is off
  • Leaflet for the events map; optional Cloudflare Turnstile captcha
  • Vitest for the app; SQL test files run on a restored copy of the live database
  • GitHub Actions on every push: typecheck, tests, build, plus every migration applied to an empty database

Database history

supabase/migrations is the source of truth; the old root schema.sql is stale
#MigrationWhat it doesLive
120261007171400Baseline: the schema as foundreference
220261007180000Engine fixes, enrolment plan, security lockdownyes
320261007180100Drop legacy password hashesyes
420261007200000Overview page, sign-up rate limityes
520261007210000Program cover pathsyes
620261008090000Profile access, account deletionyes
720261008120000Trial funnel contentyes
820261102120000Billing entitlementsheld back
920261102130000Safety filters, body checkyes · 11 Nov
1020261102140000Risk rating import function (sheet not imported)yes · 11 Nov
1120261103100000Schedule heap, workout swap, fatigueyes · 11 Nov
1220261103110000Before-workout flow, stop for painyes · 11 Nov

Every change follows the same path: back up live → apply and test on a throwaway copy → apply to live in one transaction, with the owner's explicit OK each time → regenerate types. The last rehearsal gave 102 passing checks. The only failure was the billing test, which is expected while billing isn't live.

Payments, built and off

All Access at CHF 40 a month and Single Program at CHF 80 one-time, with a 7-day refund guarantee. The database decides access, because the public key lets anyone query it directly. Turning payments on means applying migration 8 and flipping the switch together. Applying the migration alone would lock everyone out of the obstacle-race program. The iOS build keeps payments off, because Apple requires in-app purchase.

Hosting

An Infomaniak Node.js site on the company's domain, built from branch IOS, which is never merged into main. Deploys go by upload: a script packs the committed app into a folder, which is uploaded, rebuilt and restarted. Secrets live in an env file on the server. Public contact is a contact@ address on the company's domain.

From the marketing deck

How clients would find it

The company's marketing deck draws the path a client takes, from first noticing the brand to sharing an adventure with someone else.

Campaign poster: a hiker seen from inside a sea cave, looking out at cliffs and the ocean, with the line Take yourself somewhere new.
PosterFrom the deck's marketing slide.
  1. NoticeStage 1
  2. ExploreStage 2
  3. Sign inStage 3
  4. ExperienceStage 4
  5. ShareStage 5
  • Notice. Social-media storytelling, race wins, programmes inside gyms and word of mouth, then e-mail, a landing page and the website.
  • Explore. Ambassadors relaying each other, the website, flyers and advice from gym staff.
  • Sign in. A package bought on a landing page, coached gym sessions, community events, a form and a waiver.
  • Experience. A first trial of an adventure, such as a half-day bike ride rather than a full workout.
  • Share. A programme to do as a pair.
Open work

What's left, and who it waits on

The full ordered list is in docs/SESSION_HANDOFF.md. Coaching judgement (difficulty, muscle values, contraindications, profiles) belongs to the coach. Software can draft it, but drafts stay marked as drafts.

Coaching content

coach
  • Review the 166 draft exercise profiles
  • Check and import the risk ratings
  • Mark Chair Pose and Calf Jumps as timed; decide how AMRAP rounds are recorded
  • Plans for the 15 programs without one, or hide them
  • Contraindications and equipment

Before launch

owner
  • Fill the placeholders on the legal page
  • Switch on and test email sending
  • Decide where backups with user data live
  • Confirm daily database backups; decide on staging
  • Trademark check on the race-brand names used in program titles

Product

can start now
  • "Skip a day" button and today's session on the dashboard
  • Static export of the site for the app
  • One data-driven program page in place of the hand-built ones
  • A "how do you feel" input, so capacity isn't fixed at 0.65

iOS

blocked on the dev Mac
  • macOS 15.6+ and Xcode 26; Apple Developer account
  • Capacitor project, app name and bundle id
  • Email links that open the app; notifications, rest timer
  • Privacy manifest, crash reporting, demo account, TestFlight, listing
About the samples

Where every number on this page comes from

Rows. Modelled on the coach's sheet export in data-csvs/sheets/, dated 3 November 2026, and the risk review sheet exercise_risk_index_review.csv: same columns and structure, changed values. No live database was queried, and no user table was read.

Hashing. Exercise, slot, workout, plan and condition ids, and the coach's written notes and workout descriptions, are shown as kind· plus 8 random hex characters. The mapping was used once and never saved, so even small integer ids cannot be recovered. The same id gets the same value everywhere on the page, so rows can still be joined by eye.

In the clear. Exercise names, movement functions and pillar names, because they are the method being explained. Numeric values are changed from the export but keep its structure and the engine's arithmetic; the originals are drafts, not reviewed coaching values.

Recomputed for this page. Effort units and workout roll-ups use the engine's own formula (f_effort_units) with the seed config: 20 s per set, 0.35 + 0.65 × intensity, 30 s fallback. The live views may weight things slightly differently.

Quoted from earlier runs. The two-option card and the planned-vs-delivered table are modelled on engine output on a database copy in August 2026, run on demo data, with values changed. Simulation tables come from the reference scripts in the repo root (workout_swap_sim.py, schedule_engine_sim.py, rhythm_test.py), as recorded in ENGINE_SPEC.md.

Illustrative. The intent row has random placeholder ids and describes no real person.

Further reading in the repo. PROJECT_OVERVIEW.md, ENGINE_SPEC.md, DATA_DICTIONARY.md, PAYMENTS_RUNBOOK.md, how_to_run.txt, docs/SESSION_HANDOFF.md.

Personal notes

In my own words

What I wrote about this project for my portfolio, arranged around the questions it answers.

Why fitness, for adventure?

We believe that adventure is something we all need throughout our lives.

We think that the first step towards one day walking into the unknown with confidence, vitality and excitement is to be fit. Fit enough not to have to worry about injury or physical hardship while appreciating the view.

How did one coach become a platform?

I started coaching in high school. The school paid me by the hour to give fitness lessons in the school gym on lunch breaks. Then I created a profile on a website that hosts private teachers for languages, maths, music and sport, and started coaching individuals at home or at free public outdoor gyms. I was paid by the hour and dealt with everything personally.

When I was away travelling or studying for exams, my absence left a hole in my clients' routine. So I decided to create an app and go online. I started learning Next.js, React and SQL during spring break in my first year of uni.

Who is building it with me?

While registering for a startup competition in July, a hackathon organised by my university for starting a company, I teamed up with the people who are now my co-founders. The winners received funding for no equity. We came second.

Together we are building an app that revolutionises the sports app. It brings in elements directly from my education in data science and business, and from my experience in the military, solo travelling, nursing and coaching. The others bring strategic, financial and operational business understanding, AI and technical development, and brand building and marketing.

The app is in development.

Where has it taken my clients?

Most of my clients have been satisfied and come back.

One of them works at a trading company, building a good career while holding on to a balance between work and a healthy life. He is now in Thailand, learning Muay Thai. One young lady ran her first obstacle race; another turned a situation around and became fit for life. My youngest, just 12 and playing professional golf at international level, would like to challenge himself to bike up the local mountain.

Fit enough to appreciate the view.