BodyBoost is a Flask web application that helps users build personalized workout routines based on their fitness goal, experience level, weekly schedule, and body metrics. It combines a local exercise database with routine-generation logic, progress tracking, exercise search, and a user dashboard.
bodyboost.mp4
- User registration and login with password hashing
- Personalized workout routine generation
- Support for full-body, upper/lower, and body-part split routines
- Fitness goals for hypertrophy, power, and endurance
- Beginner, intermediate, and expert exercise levels
- Weekly schedule management
- Daily workout view with exercise details
- Exercise search powered by a local database
- Workout history and progress tracking
- BMI, BMR, TDEE, and one-rep max related user metrics
- Responsive interface built with Flask templates, Bootstrap, and custom CSS
- Python
- Flask
- Flask-Session
- SQLite
- CS50 SQL library
- Jinja templates
- Bootstrap
- Chart.js
- JavaScript
BodyBoost-main/
|-- app/
| |-- app.py # Main Flask application and routes
| |-- Routine.py # Routine generation logic
| |-- create_db.py # SQLite database setup and exercise import
| |-- helpers.py # Authentication and health metric helpers
| |-- config.py # Environment-based configuration
| |-- data/
| | `-- exercises.json # Local exercise dataset
| |-- static/
| | |-- css/
| | |-- images/
| | `-- js/
| `-- templates/ # Jinja HTML templates
|-- db/ # SQLite database location
|-- requirements.txt
|-- run.py
`-- README.md
Make sure you have Python 3 installed.
Clone the repository and enter the project folder:
git clone <repository-url>
cd BodyBoost-mainCreate and activate a virtual environment:
python -m venv .venvOn Windows:
.venv\Scripts\activateOn macOS or Linux:
source .venv/bin/activateInstall the dependencies:
pip install -r requirements.txtBodyBoost can run with its default configuration, but creating a .env file is recommended:
SECRET_KEY=replace-with-a-secure-random-secret
DB_PATH=db/bodyboost.db
DATA_PATH=app/data/exercises.json
FLASK_DEBUG=0SECRET_KEY is used by Flask sessions. DB_PATH controls where the SQLite database is stored, and DATA_PATH points to the local exercise dataset.
Start the development server:
python run.pyThen open:
http://127.0.0.1:5000
The SQLite database is created automatically on first run if it does not already exist.
BodyBoost stores user profiles, schedules, workout history, progress data, and exercises in SQLite. The exercise data comes from a local JSON file, which is imported into the database during setup.
The routine generator in app/Routine.py builds workouts from three user choices:
- Routine type:
full_body,upper_lower, orbody_part - Goal:
hypertrophy,power, orendurance - Level:
beginner,intermediate, orexpert
The app filters exercises by level, muscle group, category, equipment, force, and mechanics, then selects matching exercises for the user's routine. If an exact match is not available, fallback filtering helps keep routine generation flexible.
- Dashboard: shows weekly progress, total progress, and user training status
- Daily routine: displays the current day's workout
- Exercise search: lets users find exercises from the local database
- Exercise details: shows muscles, equipment, level, instructions, and images
- History: tracks completed exercises
- Settings: lets users update profile and fitness information
- Help: provides guidance about the app and fitness-related inputs
The exercise dataset is based on the open-source Free Exercise Database by yuhonas, released under the Unlicense. The data is stored locally in app/data/exercises.json so the application can work without relying on an external API.
This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.
If you need to use this project under different terms (for example, a more permissive license), please contact me to discuss alternative licensing options.