Skip to content

Repository files navigation

Lift - Adaptive Recomposition Companion

Lift is a local-first PWA and Android WebView app built around Lem's hypertrophy and body-recomposition goal. It preserves the original May 12-September 27, 2026 program, then adds adaptive next-session targets, honest history recovery, weekly muscle-volume review, 1 km cardio tracking, Filipino-friendly protein logging, body/waist trends, a rolling four-week continuation block, and layered backups.

Coaching Model

  • Adaptive targets use verified reps, load, RIR, form/pain flags, recent recovery spacing, phase, and deload context. Suggestions are deterministic, explain their reasoning, and can be changed by the athlete.
  • Exercise metadata makes load semantics explicit: machine/total, dumbbell total, per hand, per side, bodyweight, and assisted load where less assistance is progress.
  • Unknown historical dates stay unknown. A workout is only completed from verified set data; reconstructed dates record that training happened without fabricating sets, volume, calories, or PRs.
  • Weekly review combines honest adherence, direct/fractional hard-set volume, protein consistency, sustainable cardio, body-weight/waist direction, and verified key-lift retention. It is descriptive coaching, not a medical or body-fat diagnosis.

Local Serve

Serve the repo from its root so relative manifest and service worker URLs resolve correctly:

cd D:\lift-pwa
python -m http.server 8080

Then open http://localhost:8080/. Service workers require localhost or HTTPS, so opening index.html directly from disk will not test install or offline behavior.

PWA Assets

  • manifest.webmanifest uses relative URLs for GitHub Pages, Netlify, and other static hosts.
  • The manifest includes fullscreen launch metadata, shortcuts for key app surfaces, and narrow/wide screenshots for richer install and store packaging.
  • sw.js precaches the app shell and icons, uses network-first navigation requests with a cached index.html fallback, uses cache-first same-origin static assets, and passes cross-origin requests through to the browser.
  • icons/icon.svg is the source glyph. PNG icons are generated by tools/make_icons.py.

app.js registers sw.js only on http://localhost or HTTPS. Opening index.html directly still runs the tracker, but install/offline caching is intentionally skipped for file://.

The app does not depend on server time. "Today" is computed from the device clock and formatted in the plan timezone (Asia/Manila, GMT+8), so GitHub Pages, Netlify, and localhost all select the same plan day when the device clock is correct.

Regenerate icons with:

python tools\make_icons.py

The script uses Pillow if available and falls back to a built-in PNG writer when Pillow is not installed.

Deploy

GitHub Pages:

  1. Commit the static app files.
  2. In the GitHub repo settings, enable Pages for the selected branch and folder.
  3. Visit the Pages HTTPS URL and install from the browser prompt or app menu.

Netlify:

  1. Create a new site from the Git repository, or drag the built static folder into Netlify.
  2. Leave the build command empty unless a future build step is added.
  3. Set the publish directory to the repo root for the current static app shape.

Do not push from this workspace unless that is explicitly requested. Review the diff, commit locally if needed, and push only from the approved branch or release flow.

Data And Backups

The v4 schema remains stored under the compatible lift.v3.state browser key. Older v2/v3 states are migrated in place; empty legacy day shells become unknown, never automatic misses. Each save is mirrored to IndexedDB with up to eight valid generations and to three localStorage rollback slots. The Android wrapper also keeps an atomically written app-private JSON mirror that is included in Android Auto Backup when the device, account, and OS permit it.

  • Lift has no server account and performs no silent cloud upload.
  • Browser data can still be lost by clearing site data, private browsing cleanup, profile resets, origin changes, quota reclamation, or device loss.
  • Android Auto Backup is platform-managed and is not guaranteed on every device.
  • A downloaded/shared JSON file is the portable recovery path and should be kept outside the device.

The Backup sheet reports local/external backup health, app/schema version, rolling generations, and the last external backup time. Restore validates and migrates JSON before changing live state, creates a pre-restore snapshot, and supports replace or merge. Merge resolves logged sets by timestamp while retaining notes and deduplicating sessions/custom exercises.

Step Counter Caveat

The step counter uses browser motion APIs when available. It only counts while the PWA is open and the phone is moving; background step counting is unreliable for web apps. Manual step entry is the reliable fallback and still feeds the Move ring.

Android Workout Notifications

On Android Chrome, the installed PWA can keep one live workout notification while a workout is running. Start a workout, allow the in-app rationale, then accept the browser permission prompt. The notification updates through the service worker with the current exercise, next set, rest countdown, and quick actions such as -15s, +15s, skip rest, log the next set, or finish the workout.

If permission is denied, the app still works silently. Re-enable it from Chrome site settings for the installed app, then turn Workout notifications back on in Settings. The notification is local only: if Android fully closes the PWA and suspends the service worker, the visible notification may freeze at its last text. The rest timer itself is timestamp-based, so reopening Lift syncs the workout state back to the correct time.

Offline Caveat

The app is offline-first after a successful online load has installed the service worker and cached the app shell. The first visit still needs the network, and changed files may require a refresh after the new service worker activates.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages