Vitality · Patreon Design Lab

The Lab, every brick

Commands that grow every video. See every feature, its code, and its backend. Then pull it into your build.

EP 3 · Finance · the arsenal grows every day

This is what /finance installs · starts clean, you make it yours · play with it

open full screen

Every feature, shown for real: the visual, the code, and an Add button to pull just that file into your VS Code.

Rest timer
/addclock
Episode 4 · arms itself
kg × 6
2:12
Close grip bench press

It is real. Tap hit it and rest.

// real app code · logger.html @episode:rest-timer function restCoachStart(lift, set){ if (!rcEl) return; const restSec = lift.rest ?? 150; // each lift remembers its own rest if (restSec <= 0){ rcDismiss(); return; } rcLift = lift; rcSet = set; rcOver = false; rcTotal = restSec; rcRemain = rcTotal; document.body.classList.add('rc-open'); rcEl.hidden = false; requestAnimationFrame(() => rcEl.classList.add('on')); rcPaint(); rcInt = setInterval(rcTick, 1000); // 2:12 → 2:11 … }
Overload chart
/addchart
Episode 1 · proof
top set over time · session to beat
// real app code · logger.html @episode:chart function beatsPrevBest(lift, set){ const best = prevBestOf(lift); if (!best || best.weight <= 0) return false; if (set.weight > best.weight) return true; // same weight, more reps still wins return set.weight === best.weight && set.reps > best.reps; }
Grading logger
/logger
Episode 2 · the spine
80kg × 8A · beat it
82.5kg × 8PR
// real app code · logger.html @episode:logger function gradeSet(lift, set){ if (set.failed) return 'failed'; if (!set.done) return 'empty'; const beatWeight = set.weight > lift.weight; const beatReps = set.reps > lift.targetReps; const metWeight = set.weight >= lift.weight; const metReps = set.reps >= lift.targetReps; if (metWeight && metReps) return (beatWeight || beatReps) ? 'over' : 'clean'; return 'partial'; // never shamed, never red }
Exercise library
/addlibrary
Episode 3 · teaches
Bench PressChest+
// real app code · logger.html @episode:library function addFromLibrary(e){ const existing = LIFTS.find(l => l.libKey === e.key || l.name === e.name); if (existing){ // unhide, never duplicate if (existing.hidden){ existing.hidden = false; saveLog(); render(); } return; } const d = tierDefaults(e.tier); addLift({ name:e.name, tier:e.tier, muscle:e.group, libKey:e.key, targetSets:d.targetSets, targetReps:d.targetReps, weight:d.weight, history:[], sets:blankSets(d.targetSets) }); render(); }
Dashboard tile
/addtile
Next · the board
72This week
report({ key:'workout', label:'Sessions', value: weekCount, kind:'count' }); // lands on your dashboard, feeds the score
Streaks
/addstreak
Next · the habit
12day streak
// a streak on top of any brick const streak = daysInARow(log);

One table the whole app grows on. Additive, safe to re-run. Row-level security means each person only sees their own data.

How saving works, in plain words

1Your data lives in your own Supabase (free), not ours. You own it, forever.
2You never write SQL. When you run /logger, Claude sets it up for you: it takes the backend file below and applies it to your Supabase. If yours is connected it runs it directly; if not, it hands you one paste for the Supabase SQL editor and waits.
3The file is additive and safe to re-run. Every episode only ever adds. Nothing you saved is touched.
4Row-level security is built in: every row is stamped with your account, and only your account can read it.
5No Supabase? Everything still works on your device. Add the cloud whenever you want, nothing is lost.

workout_log · the one store

-- Ep 2 lays the one table everything rides on
create table if not exists workout_log (
  id         uuid primary key default gen_random_uuid(),
  user_id    uuid not null default auth.uid(),
  lift       text not null,
  weight     numeric not null default 0,   -- kg
  sets       jsonb   not null default '[]', -- [{weight,reps,done}]
  hidden     boolean not null default false,
  updated_at timestamptz not null default now()
);
alter table workout_log enable row level security;
create policy "own" on workout_log using (auth.uid() = user_id);

-- Ep 3 adds ONE column (no new table)
alter table workout_log add column if not exists lib_key text;
-- Ep 4 adds ONE more
alter table workout_log add column if not exists rest_sec int not null default 150;

How every function ties in · one doorway

// straight from logger.html: ONE store, never one-per-feature.
// Five functions are the only doorway to disk: getLift, addLift,
// updateLift, saveLog, loadLog. Everything goes through them.
// Point saveLog/loadLog at Supabase instead of localStorage and
// EVERY feature syncs across devices, untouched (backend.sql).

gradeSet()        reads  weight, target_reps      -- the grade
beatsPrevBest()   reads  sets jsonb (history)     -- the chart's win
addFromLibrary()  writes lib_key                  -- the library link
restCoachStart()  reads  rest_sec                 -- the 2:12 timer
finishSession()   writes sets jsonb, updated_at   -- the day, saved

Every command ever shipped, in one place. It only grows. Every piece below starts as its real control. Tap it and it opens into the real thing.

Get the whole arsenal

One zip. Unzip it at the root of your repo: every command lands in .claude/commands/, the backend rides along. Then run /logger once. That is the whole install.

download zipunzip in your repo/logger
EP 1 · The workout logger
Overload chart/addchartEP 1
The history pill that sits under every lift. Tap it and the full record opens: the climb, the stats, every session.
this is the real button · tap it
history
Incline DB press
453525 Jun 3Jul 4 Jul 3
+2.5 kg · all time
Jul 388824 REPS
Sessions
8
Last 30 days
+2.5 kg
Best
32.5 kg
DateSetsRepsWeightProgress
Jul 33832.5 kg+0
Jun 272832.5 kg+0
Jun 203932.5 kg+0
Grading logger/loggerEP 1
The spine. Tap a set the moment you finish it: it logs, grades against last time, and flips. Tap again to undo.
i32.5 kg/ea × 8hit it → missdone
ii32.5 kg/ea × 8hit it → missdone
iii32.5 kg/ea × 8hit it → missdone
tap a set · it logs and grades
Exercise library/addlibraryEP 1
Every lift carries the little i. Tap it and the form card opens: what it hits, how to do it, the cues that matter.
Incline DB press
this is the real button · tap the i
Form
Incline DB press
Chest · Front delts · TricepsTier 2
Dumbbell
Incline dumbbell upper-chest press.
form photo
form photo
iDumbbells at shoulder width, palms forward
iiPress up with your chest
iiiLower slow
Lower slower than you pressStay in full control
Rest timer/addclockEP 1
Arms itself the moment you log a set, to that lift's own rest. This one is live: it is ticking right now.
−15
2:12
Close grip bench press
+15×
live · −15 and +15 work · × resets
Dashboard tile/addtileNext
Every brick becomes a Vitality tile that reports to your board and feeds your score. Tap it: a session lands.
72This week
tap it · a session lands
Streaks/addstreakNext
A streak on top of any brick. Show up, keep the flame. Tap it: another day in a row.
12day streak
tap it · keep the flame
EP 2 · The supplement stack
Check-off list/addchecklistEP 2
Tap-to-take rows with a bar that fills by the exact fraction done. Any list: pills, habits, chores.
0 OF 3 TAKEN
tap a row · the bar fills by fraction
Time blocks/addblocksEP 2
Morning to bed, anything scheduled into parts of the day. Turn a block off and its items flow to Anytime.
magnesium lives in Evening
turn Evening off · watch it move
Library search/addsearchEP 2
Type-ahead over a built-in library, add-your-own when nothing matches. The dropdown is solid on purpose: nothing bleeds through it.
this is the real search · type into it
Timing reader/addloaderEP 2
The cozy reading loader that becomes advice. Deterministic: it reads the data it is given, zero AI cost.
Reading your stack for the best timing For youCaffeine: 30 to 45 minutes before training is the sweet spot.
the real mechanic · it never stops reading
Pairs-well suggester/addsuggestEP 2
Add one thing and it quietly offers its best partner. Works for any catalog: supplements, tools, books.
Pairs wellcaffeine goes with
add one · it offers the partner
EP 3 · The subscription radar
Count-up number/addcountupEP 3
The headline number that climbs to its new value instead of hard-cutting. Any stat: money, reps, pages, followers.
$127.95
tap it · the number climbs, never jumps
Due radar/addradarEP 3
Anything dated gets a dot that heats up as the day closes in. Dates roll themselves forward, you never re-type them.
Netflix
in 2d · Fri, Jul 10
$15.99
Spotify
in 6d · Tue, Jul 14
$11.99
Amazon Prime
in 26d · Mon, Aug 3
$139.00
the closer the date, the hotter the dot
Attention strip/addalertsEP 3
Rows that only appear when something needs you: a trial about to charge, a price that went up. It reads only what you give it: dates you set, prices from your own pastes. Most urgent first.
trial endingFigma free trial ends in 3d · cancel before it charges
example rows · fed only by your own data
Paste importer/addpasteEP 3
Paste any messy list with prices in it and rows extract themselves. Re-paste next month: matched names update in place and a price that quietly went up fires the warning by itself. Deterministic, zero AI, nothing leaves the page.
Netflix $15.99/month Notion - 96 per year YouTube Premium 13.99 monthly
tap read it · three rows extract themselves
Radar ring/addringEP 3
Anything with a date becomes a blip on a ring: closer to the center means sooner. A deadlines radar, a habits radar, a launch radar. Pure math from your own dates.
each blip = a due date · closer = sooner
a live ring · every blip is real, placed by its date
Win pulse/addwinEP 3
The "you did it" moment: a ripple, a spark burst, and a number that lands. Drop it on any win worth feeling, a saved dollar, a finished set, a shipped task.
+$15.99/mo back
that is $191.88 a year in your pocket
tap it · the win lands, ripples, and sparks
Screenshot import/addscanVitality ExclusiveEP 3
Drop a receipt, a bank statement, or any billing screenshot and the rows extract themselves. It reads the image right in the browser, so the picture never leaves the device: no server, no AI cost. Pairs with the paste importer and price watch.
Drop a screenshot
reads in your browser · never leaves your device
tap it · watch a statement resolve into rows See how it reads it

The backend rides along

One table per season. Additive, safe to re-run, row-level security so each person only ever sees their own rows. You never write SQL: /logger and /fuel apply it for you.

Point it at anything

This is where the arsenal earns its name. One sentence retargets every brick. Water, savings, reading, anything.

The whole arsenal retargets with one sentence. Type the command, name your thing, and every brick translates: same shape, same rules that make it good, your data.

/fuel for my meds
the supplement stack becomes a medication tracker
/fuelevery dose checked off, the day bar fills by exact fraction
/addblocksmorning and evening blocks, anything unscheduled flows to Anytime
/addloaderthe timing reader tells you when each one works best
/addsearchyour own med list with doses, solid dropdown, add-your-own
/logger for my water
the workout logger becomes a hydration tracker
/loggerevery glass logged, graded against your daily target the moment you tap it
/addclockthe rest timer becomes a next-glass clock, paced so you finish by evening
/addchartyour daily intake climbing, best day marked
/addstreakdays in a row on target
/logger for my reading
and now it is a reading habit
/loggerpages per session, graded against last time
/addlibrarythe exercise library becomes your bookshelf, an info card per book
/addclocka reading timer that arms itself when you open a book
/addchartpages over time, the line that proves the habit
/finance for my client retainers
the subscription radar flips: money coming IN, on schedule
/financeevery retainer tracked, the monthly total counts itself up
/addradarwhich invoice lands next, dots heat up as the date closes
/addalertsa contract ending soon warns you before it lapses
/addpastepaste your client list, every retainer extracts itself

The rule

Keep the shape, swap the target. The command reads your sentence and translates every brick: the units, the labels, the goal. Sleep, miles, meals, practice hours. Anything worth beating last time.

/logger for my ______the whole arsenal, retargeted