A comprehensive web application that generates personalized strength training (musculation) programs based on user preferences and goals. Built with Python Flask and integrated with the ExerciseDB API.
- Training Objectives: Muscle gain (hypertrophy) or weight loss (fat burning)
- Flexible Frequency: 1-7 training days per week with appropriate splits
- Equipment Options: Gym equipment or bodyweight-only workouts
- Training Splits: Automatically selects optimal splits based on frequency
- 1-2 days: Full body workouts
- 3-4 days: Upper/lower or push/pull/legs splits
- 5+ days: Body part splits
- Exercise Selection: Prioritizes compound movements and balances muscle groups
- Progressive Parameters: Sets, reps, and rest periods tailored to objectives
- Access to thousands of exercises with detailed instructions
- Exercise filtering by muscle groups and equipment
- GIF demonstrations when available
- Comprehensive exercise database
- Responsive Design: Works perfectly on desktop, tablet, and mobile
- Interactive Interface: Clean, modern UI with Bootstrap 5
- Export Functionality: Print or download programs as text files
- Exercise Demos: Modal popups with instructions and animations
- Python 3.8 or higher
- pip (Python package manager)
- Internet connection (for ExerciseDB API)
-
Clone or download the project
cd /path/to/your/workspace -
Install dependencies
pip install -r requirements.txt
-
Run the application
python app.py
-
Open your browser Navigate to
http://localhost:5000
-
Create virtual environment (recommended)
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set environment variables (optional)
export FLASK_ENV=development export SECRET_KEY=your-secret-key-here
-
Run with debug mode
python app.py
musculation-app/
├── app.py # Main Flask application
├── api_service.py # ExerciseDB API integration
├── program_generator.py # Workout program generation logic
├── requirements.txt # Python dependencies
├── README.md # This file
├── static/
│ ├── css/
│ │ └── style.css # Custom styles
│ └── js/
│ └── main.js # Frontend JavaScript
└── templates/
├── base.html # Base template
├── index.html # Main form page
└── program.html # Generated program display
-
Select Your Objective
- Muscle Gain: Focus on hypertrophy with 6-12 reps, longer rest periods
- Weight Loss: Higher reps (12-20), shorter rest, circuit-style training
-
Choose Training Frequency
- Consider your schedule and experience level
- 3-4 days per week is optimal for most people
-
Equipment Availability
- Gym Equipment: Access to weights, machines, cables
- Bodyweight Only: No equipment needed, perfect for home workouts
-
Generate Program
- Click "Generate My Program" and wait a few seconds
- Your personalized program will be displayed
- Exercise Instructions: Click the demo/info buttons for detailed guidance
- Print Program: Use the print button for offline access
- Export Program: Download as text file for your phone or notes
- Progressive Overload: Follow the progression guidelines provided
The application also provides REST API endpoints:
GET /api/exercises/search?q=exercise_name- Search exercisesGET /api/exercises/muscle/<muscle_name>- Get exercises by muscleGET /health- Health check and API status
-
Frequency Distribution
- Lower frequencies focus on full-body compound movements
- Higher frequencies allow for specialized muscle group targeting
-
Exercise Selection
- Prioritizes compound movements (squats, deadlifts, presses)
- Balances primary and secondary muscle groups
- Considers equipment limitations
-
Volume and Intensity
- Muscle Gain: 3-4 sets, 6-12 reps, 2-3 min rest
- Weight Loss: 2-3 sets, 12-20 reps, 30-60 sec rest
- Full Body: All major muscle groups each session
- Upper/Lower: Upper body and lower body alternating
- Push/Pull/Legs: Movement pattern based split
- Body Part Split: Individual muscle groups per session
Program not generating?
- Check internet connection (requires ExerciseDB API access)
- Try refreshing the page and generating again
- Check browser console for errors
No exercises showing?
- API might be temporarily unavailable
- The app will show a basic fallback program
- Try again in a few minutes
Exercises not loading?
- Some exercises may not have complete data
- Instructions are still provided for proper form
- Recommended: Chrome, Firefox, Safari, Edge (latest versions)
- Mobile: iOS Safari, Chrome Mobile
- Requirements: JavaScript enabled
app.py: Flask routes and application logicapi_service.py: ExerciseDB API wrapper with caching and rate limitingprogram_generator.py: Core workout generation algorithmstemplates/: Jinja2 HTML templatesstatic/: CSS and JavaScript assets
- New Exercise Filters: Extend
api_service.py - Training Splits: Modify
program_generator.py - UI Components: Update templates and static files
This project is open source and available under the MIT License.
- ExerciseDB API: Provides comprehensive exercise database
- Bootstrap 5: Modern, responsive UI framework
- Font Awesome: Beautiful icons throughout the interface
- Flask: Lightweight and powerful Python web framework
For issues, questions, or contributions:
- Check existing documentation
- Review the troubleshooting section
- Open an issue with detailed information
Built with ❤️ for the fitness community
Transform your fitness journey with personalized, science-based workout programs.