Skip to content

About

Gym Tracker — Free Offline Workout & PT Session Log

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

A free offline-first Progressive Web App (PWA) for tracking your monthly gym training progress.

Track PT sessions, self-training days, exercises with sets/reps/weights, and view your monthly stats — no sign-up, no data sent anywhere.

Features

  • Monthly calendar view with color-coded day types
  • Log PT sessions (track 0-12 per month), self training, or rest days
  • Add exercises with multiple sets (weight × reps)
  • Edit and delete workouts
  • Dark mode (auto-detects system preference)
  • Works offline
  • Installable on phone home screen like a native app
  • All data stored locally in your browser (IndexedDB via Dexie.js)

Deploy to Netlify (Free)

Method 1: Drag & Drop (Easiest)

  1. Go to netlify.com and sign up / log in (GitHub or email)
  2. Click "Sites" → "Drag and drop your site folder here"
  3. Drag this entire gym_tracker folder into the drop zone
  4. Wait a few seconds — your site is live at a random URL like random-name.netlify.app
  5. Open that URL on your phone → tap "Add to Home Screen" in Chrome/Safari

To change the URL: Site settings → "Change site name"

Method 2: GitHub + Netlify (Auto-deploy)

  1. Create a GitHub repo and push this folder:
    git init
    git add .
    git commit -m "Initial commit"
    git remote add origin https://github.com/YOUR_USERNAME/gym-tracker.git
    git push -u origin main
  2. On Netlify, click "Add new site" → "Import an existing project"
  3. Connect GitHub, select your repo
  4. Leave settings as-is (no build command needed, publish directory: root)
  5. Click "Deploy site"

Get it on your phone

Once deployed on Netlify:

Android (Chrome) iPhone (Safari)
Open the URL in Chrome Open the URL in Safari
Tap the ⋮ menu (3 dots) Tap the Share button (box with arrow)
Tap "Add to Home Screen" Scroll down → "Add to Home Screen"
Name it "Gym Tracker" → Add Name it "Gym Tracker" → Add

It will now appear as an app icon on your home screen, opens full-screen like a native app, and works offline.

Local Development

To test locally:

# Python 3
python3 -m http.server 8000

# Or with Node
npx serve .

# Or with PHP
php -S localhost:8000

Then open http://localhost:8000 in your browser.

How to use

  1. Navigate months — tap ◀ / ▶ arrows at the top
  2. Add a workout — tap the + button (defaults to today's date)
  3. View a day — tap any date on the calendar
  4. Edit a workout — open a day, tap ✎ pencil icon
  5. Delete a workout — open edit mode, tap 🗑 trash icon
  6. Exercises — add exercise names and sets with weight × reps
  7. PT Sessions — select "PT Session" type, choose session # from dropdown (shows which are already used)

Data Storage

All data is stored in your browser's IndexedDB (database: GymTrackerDB, table: workouts) via Dexie.js. Clearing your browser cache does not remove it — you need to explicitly clear site data in browser settings.

SEO

This app includes structured data (JSON-LD WebApplication schema), Open Graph tags, Twitter Card tags, and a robots.txt/sitemap.xml for search engine discoverability. If you change your Netlify URL, update the canonical URL, OG url, and sitemap URL in:

  • index.html — og:url, canonical, twitter:image
  • robots.txt — Sitemap URL
  • sitemap.xml — <loc> URL
  • manifest.json — start_url (if path changes)

File Structure

gym_tracker/
├── index.html        # Main app shell (SEO meta, OG, JSON-LD)
├── style.css         # Styles (responsive, dark mode)
├── app.js            # App logic (calendar, CRUD, Dexie/IndexedDB)
├── manifest.json     # PWA manifest (enables install)
├── sw.js             # Service worker (offline support)
├── robots.txt        # Crawler instructions
├── sitemap.xml       # XML sitemap for search engines
├── icons/
│   ├── icon-192.png  # PWA icon (192×192)
│   └── icon-512.png  # PWA icon (512×512)
└── README.md         # This file

Note: The project is generated using https://opencode.ai

About

Gym Tracker — Free Offline Workout & PT Session Log

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages