# Hevy Gym Tracker for Fitbit

A workout tracker app ported from Hevy WearOS to Fitbit OS, designed for Fitbit Sense 2.

## Features

- **Exercise Library**: 20+ exercises including bench press, squat, deadlift, and more
- **Set/Rep/Weight Tracking**: Track each set with reps and weight
- **Rest Timer**: Built-in countdown timer between sets
- **Heart Rate Display**: Real-time heart rate during workouts
- **Workout Summary**: Duration, total sets, reps, volume, and calories
- **Workout History**: Saves last 50 workouts on device

## Installation

### Prerequisites

1. Node.js (v16 or later)
2. Fitbit Studio account (https://studio.fitbit.com)
3. Fitbit mobile app installed and paired with your Sense 2
4. Developer mode enabled on your Fitbit device

### Option 1: Build with Fitbit CLI

```bash
# Install Fitbit CLI
npm install -g fitbit-cli

# Login to Fitbit
fitbit login

# Build the app
cd hevy_fitbit
fitbit build

# Install on device
fitbit install
```

### Option 2: Upload via Fitbit Studio

1. Go to https://studio.fitbit.com
2. Click "Import Project"
3. Select the `hevy_fitbit` folder
4. Click "Build & Install"

### Option 3: Upload to Fitbit GAM (Gallery App Manager)

1. Build the app: `fitbit build`
2. This creates a `.fpb` file in the project directory
3. Go to https://gam.fitbit.com
4. Click "Submit App"
5. Upload the `.fpb` file
6. Fill in app details and submit for review

## File Structure

```
hevy_fitbit/
├── package.json              # App metadata
├── README.md                 # This file
├── app/
│   ├── index.js              # Main watch app
│   └── companion/
│       └── index.js          # Phone companion app
├── common/
│   └── settings.js           # Shared settings
├── resources/
│   ├── index.gui             # UI layout
│   ├── device.style.css      # Device styles
│   ├── heart.svg             # Heart icon
│   └── timer.svg             # Timer icon
└── settings/
    └── index.jsx             # Settings page
```

## Usage

### Starting a Workout

1. Open the app on your Fitbit
2. Tap "START WORKOUT"
3. Select an exercise from the list
4. Use +/- buttons to adjust reps and weight
5. Tap "DONE SET" when finished with a set
6. Rest timer starts automatically
7. Tap "NEXT" to move to next exercise
8. Tap "FINISH WORKOUT" when done

### Tracking Sets

- **Reps**: Use +/- buttons to adjust (default: 10)
- **Weight**: Use +/- buttons to adjust (increments of 2.5 kg)
- **Done Set**: Logs the current set and starts rest timer
- **Next Exercise**: Moves to the next exercise in the list

### Rest Timer

- Default duration: 90 seconds (configurable in settings)
- Timer starts automatically after completing a set
- Vibration alert when timer completes
- Can be manually started/stopped

### Workout Summary

After finishing a workout, you'll see:
- Total duration
- Number of sets
- Total reps
- Total volume (weight × reps)
- Estimated calories
- Average heart rate

## Settings

Access settings from the Fitbit mobile app:

- **Rest Timer Duration**: Set default rest time (seconds)
- **Weight Unit**: Kilograms or Pounds
- **Show Heart Rate**: Toggle heart rate display
- **Vibration Alerts**: Toggle vibration on timer completion
- **Auto-start Timer**: Automatically start rest timer after set

## Limitations

This is a basic workout tracker. For full Hevy functionality (social features, cloud sync, advanced analytics), use the official Hevy app on your phone.

## Credits

- Original Hevy app by Hevy (https://hevy.com)
- Fitbit OS SDK documentation
- Ported by Pipo

## License

MIT License

## Support

For issues or questions, please open an issue on the repository.
