Skip to content

Repository files navigation

5/3/1 Program Tracker

A private, mobile-first web app for running Jim Wendler's 5/3/1 strength program. It prescribes each session from your training maxes, tracks the 4-week cycle automatically, logs every set, and lays the week out as a calendar that interleaves lifting with cardio. It also charts estimated 1RM, powerlifting total, body weight, and weekly cardio over time, and includes a macro calculator for nutrition targets.

Built end-to-end with the Claude Code CLI. Screenshots below use generated demo data (pnpm db:seed-demo) over a 3-month window.

Features

Weekly calendar

The home screen is a fixed Mon–Sun template that interleaves the four 5/3/1 lifts with day-of-week cardio (a HIGH-intensity day and a LOW-intensity day). Logged sessions show struck through; the next incomplete session is highlighted. A generic "log a session" dialog lets you record any workout or cardio on any day (defaulting to today).

Home weekly calendar

Set-by-set logging

Each main lift shows its 5/3/1 prescription per set (percentage × reps, AMRAP "+" on the top set) computed from your training max, rounded up to the nearest 5 lb. Bench day runs both Bench Press and Rows as 5/3/1 lifts. Accessories log freely; timed movements (e.g. Back Extensions) log a static hold in seconds instead of reps. A per-exercise Intensity chip and a single Notes field round it out. Logging the last workout of week 4 rolls the cycle over and bumps every training max (+5 upper / +10 lower).

Logging a workout

History, inspection & editing

Every session is saved and browsable. Tap a card to inspect the full per-set breakdown, and reopen any past session prefilled to edit it in place.

History with inspection modal

Progress charts

Per lift, your work-set weight (color-coded by the 5s / 3s / 1s week) overlaid with the Epley estimated 1RM from each AMRAP set, plus a theoretical total (squat + bench + deadlift), a body-weight trend, and weekly cardio minutes (HIGH vs LOW) against dashed weekly targets — all across 1mo / 3mo / 6mo / 1yr windows.

Progress charts

Nutrition & body weight

A macro calculator derives daily protein / fat / carb targets from your TDEE, a weekly weight-loss rate, a protein floor, and a fat percentage. Saving your targets also records the current weight as a weigh-in, which feeds the body-weight chart on Progress.

Nutrition macro calculator

Settings: training maxes + pause

Edit each lift's training max, override the program state, and pause the program when travelling, sick, or injured so logging won't advance the cycle. A 1RM calculator and CSV export round out the app.

Settings

Use it yourself

Heads up — this is built for one person. It intentionally does not have a rich feature set or a library of exercises for customizing plans. Requests for those features will unfortunately be ignored, though contributions are welcome (see Contributing).

The easiest path is to fork this repo to your own GitHub account, then run it locally:

# 1. Fork on GitHub, then clone your fork
git clone https://github.com/<you>/5-3-1-program.git
cd 5-3-1-program

# 2. Install tooling
#    - Node.js 20+  (https://nodejs.org)
#    - pnpm         (https://pnpm.io/installation, e.g. `corepack enable pnpm`)
pnpm install

# 3. Create the local database and seed it
pnpm db:migrate     # creates ./data/app.db
pnpm db:seed        # one user + the default exercise catalog + training-max rows

# 4. Run it
pnpm dev            # http://localhost:3000

Then open Settings and enter your training maxes (90% of your 1RM for each lift) — the app prescribes everything from there. Want to see it full of data first? Point at a throwaway DB and load the demo generator:

rm -f data/demo.db
DATABASE_PATH=data/demo.db pnpm db:migrate
DATABASE_PATH=data/demo.db pnpm db:seed
DATABASE_PATH=data/demo.db pnpm db:seed-demo   # ~3 months of sessions
DATABASE_PATH=data/demo.db pnpm dev

Editing with an AI assistant

This whole app was written with the Claude Code CLI, so sweeping changes are approachable even if you're not deep in the stack — open it in an AI coding assistant and describe what you want. The useful entry points:

  • Exercise catalog / your splitsrc/db/seed.ts
  • 5/3/1 math (week percentages, rounding, 1RM) → src/lib/program.ts
  • Pages & UIsrc/app/* and src/components/*
  • Schemasrc/db/schema.ts (then pnpm db:generate to create a migration)

Hosting

To run it on your own always-on box, see docs/hosting-aws.md — a single small VM behind nginx (TLS + IP allowlist), with the included deploy/ scripts. Any Linux VM works; the scripts assume Amazon Linux 2023.

Contributing

PRs welcome, especially fixes and quality-of-life improvements. For larger changes, open an issue first to discuss. Keep the app's single-user, low-config spirit; please run pnpm lint and pnpm build before submitting.

Stack

  • Next.js 16 (App Router, server actions, standalone output) + React 19
  • SQLite via better-sqlite3 + Drizzle ORM (migrations in drizzle/)
  • Tailwind CSS v4 + @base-ui/react primitives
  • Hand-rolled SVG charts (zero charting dependencies)

Scripts

Script Purpose
pnpm dev / pnpm build / pnpm start Next.js dev / production build (webpack) / serve
pnpm db:generate Generate a migration from src/db/schema.ts
pnpm db:migrate Apply migrations to DATABASE_PATH (default ./data/app.db)
pnpm db:seed Seed the user + exercise catalog (idempotent)
pnpm db:seed-demo Fill a DB with ~3 months of demo sessions (never run on a real DB)
pnpm db:studio Drizzle Studio (browse the DB)

License

MIT

Program reference

5/3/1 details: https://exrx.net/WeightTraining/Powerlifting/531

About

A private, single-user 5/3/1 strength program tracker — Next.js + SQLite. Built with Claude Code.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages