A streamlined AI-powered workout program generation system that creates personalized training plans and exports them as easy-to-use workout files.
- AI-Powered Program Generation: Create personalized multi-week training programs using advanced periodization strategies
- Workout File Export: Generate detailed workout files in markdown format for easy use
- Profile Management: Create and manage user profiles with goals, experience, and equipment
- AI Coaching: Get personalized advice and recommendations from GPT-4 powered AI coach
- Smart Exercise Selection: Intelligent exercise selection from 228+ exercises based on equipment and preferences
- Modern Web Architecture: FastAPI backend with responsive HTML/CSS/JavaScript frontend
- RESTful API: Clean API design for easy integration and extensibility
- Persistent Data Storage: JSON-based user data storage with automatic backup
- Real-Time Updates: Async functionality for smooth user experience
- Mobile Responsive: Works seamlessly across desktop, tablet, and mobile devices
- FastAPI: High-performance Python web framework
- Pydantic: Data validation and serialization
- Async Support: Non-blocking operations for better performance
- CORS Enabled: Cross-origin resource sharing support
- Vanilla JavaScript: No framework dependencies, fast loading
- Responsive CSS: Mobile-first design with modern CSS Grid and Flexbox
- Progressive Enhancement: Core functionality works without JavaScript
- Accessible Design: WCAG compliant interface elements
- Kenny Workout Engine: Advanced workout programming algorithms
- OpenAI Integration: GPT-4 powered coaching and explanations
- ML Exercise Selection: Machine learning enhanced exercise recommendation
- Outcome Prediction: AI-powered training outcome forecasting
- Python 3.8+
- pip package manager
-
Clone and setup:
cd "Kenny Workout Plans" pip install -r requirements.txt
-
Configure environment (optional):
# Create .env file for OpenAI API key echo "OPENAI_API_KEY=your_api_key_here" > .env
-
Run the application:
python app.py
-
Open in browser: Navigate to
http://localhost:8000
- Create Profile: Set up your personal training profile with goals, experience, and equipment
- Generate Program: Use AI to create a personalized multi-week training program
- Export Workout Files: Download detailed workout files for each training session
- Follow Your Program: Use the exported files to guide your training
- Get AI Coaching: Ask questions and get personalized advice
GET /api/users- List all usersPOST /api/users- Create new user profileGET /api/users/{user_id}- Get user profile and status
POST /api/users/{user_id}/programs- Generate new training programGET /api/users/{user_id}/programs/current- Get current program
GET /api/users/{user_id}/programs/{program_id}/export- Export program as workout filesGET /api/users/{user_id}/programs/{program_id}/download/{week}/{filename}- Download specific workout file
POST /api/users/{user_id}/ai-advice- Get AI coaching advice
- Duration: 1-16 weeks
- Periodization: Linear, Undulating, Block, Conjugate
- Progression: Linear, Double Progression, Wave Loading, Percentage-based, Auto-regulation
- Deload Weeks: Automatic recovery periods
- Exercise Explanations: Detailed reasoning for exercise selection
- Program Recommendations: AI-suggested optimal program parameters
- Outcome Predictions: Forecasted training results and adaptations
- Real-time Coaching: Personalized advice during workouts
Kenny Workout Plans/
โโโ app.py # Main FastAPI application
โโโ run.py # Application runner script
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
โโโ templates/
โ โโโ index.html # Main web interface
โโโ src/kenny_workout/ # Core workout engine
โ โโโ models.py # Data models (Profile, Program, Session, etc.)
โ โโโ allocation.py # Training volume allocation
โ โโโ scheduler.py # Session scheduling algorithms
โ โโโ outcomes_log.py # Training outcome logging
โ โโโ programming/ # Program generation algorithms
โ โ โโโ program_builder.py # Multi-week program generation
โ โ โโโ periodization.py # Periodization strategies
โ โ โโโ progression.py # Load progression algorithms
โ โ โโโ deload.py # Deload week planning
โ โโโ ai/ # AI components
โ โ โโโ explanations.py # Exercise explanations
โ โ โโโ recommendations.py # Program recommendations
โ โ โโโ predictions.py # Outcome predictions
โ โ โโโ openai_explainer.py # OpenAI integration
โ โโโ exercises/ # Exercise database and selection
โ โ โโโ database.py # Exercise database
โ โ โโโ selector.py # Exercise selection logic
โ โ โโโ progressions.py # Exercise progressions
โ โ โโโ mega_dataset_importer.py # MegaGym dataset integration
โ โโโ ml/ # Machine learning components
โ โ โโโ exercise_selection.py # ML exercise selection
โ โ โโโ features.py # Feature engineering
โ โ โโโ load_progression.py # Load progression models
โ โโโ rules/ # Training rules and configuration
โ โโโ config.yaml # Training rules configuration
โโโ data/ # External datasets
โ โโโ external/ # Raw datasets (MegaGym, MET values, etc.)
โ โโโ README.md # Data documentation
โโโ models/ # Trained ML models
โ โโโ slot_regressor.joblib # Pre-trained slot regression model
โโโ user_data/ # User profiles and generated programs
โโโ rules/ # Additional rules documentation
โโโ rules.md # Training rules reference
- Backend: Add new endpoints to
app.py - Frontend: Extend JavaScript functions in
templates/index.html - Core Logic: Modify components in
src/kenny_workout/ - Styling: Update CSS in
templates/index.html
When running, visit http://localhost:8000/docs for interactive API documentation.
Run the application and test core functionality:
- Create a user profile
- Generate a multi-week program
- Complete a workout session
- View progress analytics
- Ask the AI coach questions
- Local Storage: All user data stored locally in JSON files
- No External Dependencies: Core functionality works offline
- Privacy First: No data sent to external services except OpenAI (optional)
- User Control: Users own their data completely
This is a personal project, but suggestions and improvements are welcome:
- Issues: Report bugs or suggest features
- Code Review: Review implementation and suggest optimizations
- Testing: Help test edge cases and user scenarios
- Documentation: Improve documentation and examples
- Fast Startup: Typically loads in <2 seconds
- Responsive UI: Sub-100ms response times for most operations
- Efficient Memory: Minimal memory footprint
- Scalable: Handles multiple users concurrently
- Advanced Analytics: More detailed progress tracking and predictions
- Social Features: Share programs and compete with friends
- Mobile App: Native mobile applications
- Advanced AI: More sophisticated coaching and program adaptation
- Integration: Connect with fitness trackers and apps
This project is for personal use and educational purposes. The core Kenny Workout engine contains proprietary algorithms for workout programming and AI integration.
Built with โค๏ธ for serious fitness enthusiasts who want AI-powered, science-based training programs.