Workout Planner
"Moonshot" is a workout planner with a magical-girl theme. You schedule lifting and cycling sessions on a calendar, tick off exercises as you go, write a short diary entry about how it felt, and earn XP that moves you up a rank ladder. The interface comes from a Claude Design prototype, and everything is saved in Supabase.
Features
- Calendar: day, week and month views, with the current day highlighted and past sessions marked done or missed. A day can hold more than one workout: Day and Week views list each one, and a day counts as done (for its marker, the streak and its quest) once all of them are.
- Workouts: lifting sessions (exercises with sets, reps, weight and rest) and cycling sessions (distance, elevation, duration, target effort). Both can repeat weekly for 12 weeks. Workout names are unique (ignoring case): a name that's already taken can't be saved, and when adding to the calendar the editor offers to schedule the saved workout of that name instead. A workout left unnamed is saved as "Untitled workout", "Untitled workout 2" and so on. Editing a session from the calendar changes only that session's date, the ride you entered and repeat without asking; a change to the workout itself (name, icon, notes, ride plan, exercises) asks Only this session (the default: the session gets its own copy, and the saved workout and its other sessions stay as they are) or This session and the saved workout (upcoming sessions follow too). Past and completed sessions never change.
- Progress tracking: tick exercises off, mark rides complete, and enter what you actually rode against the plan.
- Chronicle: a diary entry per session with mood, effort (1–5) and notes.
- Spellbook (formerly the Spellbook): two views, switched with a toggle. Workouts lists every saved workout with its exercises and target areas; Exercises is your exercise library, grouped by workout, plus exercises not yet assigned to one. Open either to read it without any date, and use Edit to change it. A saved workout's page has Add to calendar: pick a day this year, and optionally repeat it weekly for 12 more weeks; the page then says where it went, with a View day link. Editing a workout lists its exercises; each has an Edit button that opens the exercise editor and returns to the workout editor afterwards, with your unsaved workout changes kept. Saving a workout that has upcoming sessions asks how to save it. Update edits the workout, with an "Also update upcoming sessions" checkbox: ticked, upcoming sessions follow the edit, unticked they stay on the old version. Save as new leaves the original and all its sessions alone and saves your changes as a copy of the workout. Saving an exercise always asks. Update changes the exercise (in its workout, with the same checkbox for the workout's upcoming sessions); Save as a new exercise leaves the original and its workout exactly as they are and adds a separate exercise to the Spellbook's Unassigned group (a taken name becomes "… (copy)"). Exercises are identified by id, never by name, so two with the same name stay two exercises. Either way, past and completed sessions never change.
- Plans from Claude or ChatGPT: with Moonshot added to the assistant as a connector (see "Assistant connector" below), the assistant reads the person's Spellbook and calendar, asks what it needs, and sends a plan back. It shows on the Calendar as a card, saying which assistant sent it, and opens as a draft to look over: Add N workouts puts it on the calendar, Ask Claude for changes (or ChatGPT) opens that assistant to change it (the new version arrives as a new card), Let it fade discards it. Nothing is added without that step.
- Progress and Profile: streaks, weekly counts, mood split, personal records, and XP with a 200-step rank ladder, walking every brand color before Eternal sovereign (10 XP per exercise, 50 XP per finished workout). Reaching a new rank plays a short transformation sequence the first time you see it, wherever you are in the app (usually right as you tick the exercise that earns it); with reduced motion it shows the finished card. The highest rank already celebrated is kept per account in the browser, so a first visit on a new device records your rank quietly, and a rank that drops and is earned back doesn't replay.
Addresses
Each nav item has its own address: /calendar (opens on today's Day view), /chronicle, /spellbook, /progress and /profile. / goes to /calendar, and so does signing in. The nav items are real links, so they open in a new tab, and Back and Forward move between the places you have been. The planner stays loaded as you move between them. Screens inside a flow (an entry form, a workout editor) do not have addresses of their own yet; they keep the address of the nav item they were opened from. /arsenal, the Spellbook's old address, redirects to /spellbook. /welcome is the sign-in page and /design-system is the design-system site.
Getting started
You need Node 20+ and a Supabase project.
npm install
cp .env.local.example .env.local # then fill in the values
npm run dev
Open http://localhost:3000. The design-system site is a separate app: run npm run dev:design-system alongside, and
http://localhost:3000/design-system shows it (or open http://localhost:3001/design-system directly).
Environment
.env.local needs two values, both from Supabase → Project Settings → API:
| Variable | Value |
|---|
NEXT_PUBLIC_SUPABASE_URL | Your project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | The publishable (anon) key |
Vendor features
Some features rely on another company's service: signing in with Google or Apple, and plans from Claude or ChatGPT. Each has an on/off switch in vendors.config.ts (true to offer it, false to turn it off); change it and redeploy.
以上為 README 的開頭部分。其餘內容請閱讀原文。 檢視完整 README ↗