A Flask Web Application for personalized home workouts.
Languages: HTML, CSS, JavaScript, SQL, Python
FitCode is a workout generation application that helps you create personalized workouts based on your fitness level and time availability. With gyms closed in many parts of the world due to COVID-19, FitCode provides a solution for maintaining fitness at home without equipment.
- Register: Create an account with username, password, and fitness level (beginner/intermediate/advanced)
- Login: Access your personalized workouts
- Timer: Track your workout intervals
- Stopwatch: Time your exercises
- History: View your past workouts
- Change Level: Adjust your fitness level as you progress
- Workout Generator: Generate customized workouts based on your preferences and time constraints
- Log in to access the home page
- Click "Let's Start Working Out" to begin
- Enter how long you want your workout to be
- Select which body areas you want to work on (arms, legs, abs, cardio)
- Get a personalized workout based on your selections and fitness level
- Use the built-in timer and stopwatch tools to track your workout
-
Clone this repository:
git clone <repository-url> cd fitcode -
Create a virtual environment and activate it:
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate -
Install the required packages:
pip install -r requirements.txt -
Initialize the database:
python init_db.pyThis step is crucial as it creates all the necessary tables and populates them with initial exercise data.
-
Run the application:
python application.py -
Open your browser and navigate to:
http://localhost:5000 -
Register a new account and start working out!
- users: Stores user information including username, password hash, and fitness level
- arms, legs, abs, cardio: Tables containing exercise options for each category
- workouts: Stores user workout history with timestamps
- Built with Flask web framework
- Uses SQLAlchemy for database management
- Styled with Bootstrap and custom CSS
- Uses JavaScript for timer and stopwatch functionality
If you encounter database-related errors:
- Delete the project.db file (if it exists)
- Run
python init_db.pyto recreate the database - Restart the application