help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
fitness-coach-bot
/
static
/
js
RSK World
fitness-coach-bot
Fitness Coach Bot - Python + Flask + SQLAlchemy + Workout Plans + Exercise Guidance + Health Tracking + AI Fitness Coach
js
  • analytics_dashboard.js11.7 KB
  • app.js11.7 KB
  • pose_detection.js21.3 KB
  • voice_recognition.js8 KB
RELEASE_NOTES_v1.0.0.mdfitness_coach.dbfitness_models.py
RELEASE_NOTES_v1.0.0.md
Raw Download

RELEASE_NOTES_v1.0.0.md

# Release Notes - Version 1.0.0

**Release Date:** January 2026
**Repository:** https://github.com/rskworld/fitness-coach-bot
**Tag:** v1.0.0

---

## 🎉 Initial Release

This is the first official release of the Fitness Coach Bot - an AI-powered comprehensive fitness coaching chatbot application.

---

## ✨ Features

### Core Features
- **AI-Powered Chatbot**: Intelligent fitness coaching chatbot that provides personalized advice
- **Personalized Workout Generation**: AI-driven workout plans based on user profile and goals
- **Nutrition Analysis**: Food image analysis and meal planning recommendations
- **Progress Tracking**: Comprehensive workout and fitness progress tracking
- **User Profiles**: Detailed user profile management with fitness goals

### Advanced Features
- **Social Features**: Create fitness challenges, join teams, share progress, and connect with workout buddies
- **Gamification System**: Achievements, levels, badges, leaderboards, and rewards
- **Advanced Analytics**: Detailed fitness analytics with trends, predictions, and insights
- **Wearable Integration**: Support for wearable devices (Fitbit, Apple Watch, Garmin, etc.)
- **Voice Coaching**: Voice command processing and workout guidance
- **Pose Detection**: Real-time exercise form analysis and correction
- **Smart Recovery**: Recovery score calculation and activity recommendations
- **Workout Buddy Matching**: Find and connect with compatible workout partners

### Technical Features
- **RESTful API**: Comprehensive REST API with 20+ endpoints
- **Modern UI**: Responsive Bootstrap 5 interface with real-time updates
- **Database**: SQLAlchemy ORM with SQLite database
- **Real-time Chat**: Interactive chat interface with message history
- **Health Tips**: Dynamic health and fitness tips display

---

## 🛠️ Technical Stack

- **Backend**: Flask 2.3.3, Python 3.13
- **Database**: SQLAlchemy 2.0.45, SQLite
- **Frontend**: Bootstrap 5, Vanilla JavaScript, Chart.js
- **AI/ML**: NumPy, OpenAI integration ready
- **Dependencies**: See `requirements.txt`

---

## 📦 Installation

### Prerequisites
- Python 3.13 or higher
- pip package manager

### Setup Steps

1. **Clone the repository**:
```bash
git clone https://github.com/rskworld/fitness-coach-bot.git
cd fitness-coach-bot
```

2. **Install dependencies**:
```bash
pip install -r requirements.txt
```

3. **Initialize database**:
```bash
python init_db.py
```

4. **Run the application**:
```bash
python app.py
```

5. **Access the application**:
- Open your browser and navigate to: `http://localhost:5000`

---

## 📋 API Endpoints

### Chat & Core
- `POST /api/chat` - Chat with fitness coach
- `GET /api/workout-plans` - Get workout plans
- `GET /api/exercises` - Get exercises
- `POST /api/progress` - Save workout progress
- `GET /api/health-tips` - Get health tips
- `GET/POST /api/user/profile` - User profile management

### Advanced Features
- `POST /api/ai-workout` - Generate AI workout
- `POST /api/nutrition-analyze` - Analyze nutrition
- `POST /api/social-challenge` - Create challenge
- `GET /api/analytics` - Get analytics
- `GET /api/gamification/profile` - Gamification stats
- `POST /api/wearable/connect` - Connect wearable
- `POST /api/wearable/sync/<device_id>` - Sync wearable
- `POST /api/voice/command` - Process voice command
- `POST /api/voice/workout-guidance` - Get workout guidance
- `GET/POST /api/buddy/profile` - Workout buddy profile
- `GET /api/buddy/find-matches` - Find workout buddies
- `POST /api/buddy/request` - Send buddy request
- `POST /api/recovery/calculate` - Calculate recovery
- `GET /api/recovery/activities` - Get recovery activities
- `POST /api/pose-workout` - Save pose workout data

---

## 🐛 Bug Fixes & Improvements

### Fixed Issues
- ✅ Fixed SQLAlchemy compatibility issue with Python 3.13
- ✅ Updated all dependencies to compatible versions
- ✅ Fixed datetime timezone issues in models
- ✅ Verified all imports and syntax
- ✅ Added proper `.gitignore` file
- ✅ Created comprehensive documentation

### Improvements
- ✅ Optimized database models
- ✅ Enhanced error handling
- ✅ Improved code organization
- ✅ Added comprehensive docstrings
- ✅ Created release notes and documentation

---

## 📁 Project Structure

```
fitness-coach-bot/
├── app.py # Main Flask application
├── config.py # Configuration settings
├── init_db.py # Database initialization
├── demo_data.py # Demo data generator
├── requirements.txt # Python dependencies
├── models/ # Database models
│ ├── __init__.py
│ └── fitness_models.py
├── utils/ # Utility modules
│ ├── __init__.py
│ ├── fitness_coach.py
│ ├── ai_workout_generator.py
│ ├── nutrition_ai.py
│ ├── social_features.py
│ ├── analytics_engine.py
│ ├── gamification_system.py
│ ├── wearable_integration.py
│ ├── voice_coach.py
│ ├── workout_buddy_matcher.py
│ └── smart_recovery.py
├── templates/ # HTML templates
│ └── index.html
├── static/ # Static files
│ ├── css/
│ │ ├── style.css
│ │ └── advanced-features.css
│ └── js/
│ ├── app.js
│ ├── voice_recognition.js
│ ├── pose_detection.js
│ └── analytics_dashboard.js
├── README.md # Main documentation
├── ADVANCED_FEATURES.md # Advanced features documentation
└── LICENSE # License file
```

---

## 👥 Credits

**Author:** RSK World
**Website:** https://rskworld.in
**Founder:** Molla Samser
**Designer & Tester:** Rima Khatun
**Contact:** help@rskworld.in, +91 93305 39277
**Year:** 2026

---

## 📄 License

This project is part of RSK World's free programming resources. Content used for educational purposes only.

---

## 🔗 Links

- **Repository:** https://github.com/rskworld/fitness-coach-bot
- **Website:** https://rskworld.in
- **Issues:** https://github.com/rskworld/fitness-coach-bot/issues

---

## 🚀 Next Steps

- Set up environment variables for production
- Configure database for production use
- Add OpenAI API key for enhanced AI features
- Deploy to production server
- Set up CI/CD pipeline

---

## 📝 Changelog

### v1.0.0 (2026-01-10)
- Initial release
- Complete fitness coaching application
- All core and advanced features implemented
- Python 3.13 compatibility verified
- All dependencies updated and tested

---

**Thank you for using Fitness Coach Bot!** 💪
fitness_coach.db

This file cannot be displayed in the browser.

Download File
models/fitness_models.py
Raw Download
Find: Go to:
"""
Fitness Coach Bot - Database Models
Author: RSK World (https://rskworld.in)
Founded by: Molla Samser
Designer & Tester: Rima Khatun
Contact: help@rskworld.in, +91 93305 39277
Year: 2026
"""

from flask_sqlalchemy import SQLAlchemy
from datetime import datetime, timezone

# db instance will be initialized in app.py and imported here
db = SQLAlchemy()

class User(db.Model):
    """User model for storing user information and fitness goals"""
    __tablename__ = 'users'
    
    id = db.Column(db.String(50), primary_key=True)
    name = db.Column(db.String(100))
    email = db.Column(db.String(120))
    age = db.Column(db.Integer)
    weight = db.Column(db.Float)  # in kg
    height = db.Column(db.Float)  # in cm
    fitness_goal = db.Column(db.String(100))  # weight_loss, muscle_gain, endurance, etc.
    activity_level = db.Column(db.String(50))  # sedentary, light, moderate, active, very_active
    medical_conditions = db.Column(db.Text)
    created_at = db.Column(db.DateTime, default=lambda: datetime.now(timezone.utc))
    updated_at = db.Column(db.DateTime, default=lambda: datetime.now(timezone.utc), onupdate=lambda: datetime.now(timezone.utc))
    
    # Relationships
    progress = db.relationship('Progress', backref='user', lazy=True)
    
    def to_dict(self):
        return {
            'id': self.id,
            'name': self.name,
            'email': self.email,
            'age': self.age,
            'weight': self.weight,
            'height': self.height,
            'fitness_goal': self.fitness_goal,
            'activity_level': self.activity_level,
            'medical_conditions': self.medical_conditions,
            'created_at': self.created_at.isoformat() if self.created_at else None,
            'updated_at': self.updated_at.isoformat() if self.updated_at else None
        }

class WorkoutPlan(db.Model):
    """Workout plan model for storing predefined workout routines"""
    __tablename__ = 'workout_plans'
    
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(100), nullable=False)
    description = db.Column(db.Text)
    difficulty = db.Column(db.String(20))  # beginner, intermediate, advanced
    duration_weeks = db.Column(db.Integer)
    target_goal = db.Column(db.String(50))  # weight_loss, muscle_gain, strength, etc.
    equipment_needed = db.Column(db.Text)
    category = db.Column(db.String(50))  # full_body, upper_body, lower_body, cardio, etc.
    created_at = db.Column(db.DateTime, default=lambda: datetime.now(timezone.utc))
    
    # Relationships
    exercises = db.relationship('WorkoutExercise', backref='workout_plan', lazy=True)
    
    def to_dict(self):
        return {
            'id': self.id,
            'name': self.name,
            'description': self.description,
            'difficulty': self.difficulty,
            'duration_weeks': self.duration_weeks,
            'target_goal': self.target_goal,
            'equipment_needed': self.equipment_needed,
            'category': self.category,
            'created_at': self.created_at.isoformat() if self.created_at else None,
            'exercises': [we.exercise.to_dict() for we in self.exercises]
        }

class Exercise(db.Model):
    """Exercise model for storing individual exercise information"""
    __tablename__ = 'exercises'
    
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(100), nullable=False)
    description = db.Column(db.Text)
    category = db.Column(db.String(50))  # strength, cardio, flexibility, balance
    muscle_group = db.Column(db.String(50))  # chest, back, legs, shoulders, arms, core
    equipment = db.Column(db.String(100))
    difficulty = db.Column(db.String(20))  # beginner, intermediate, advanced
    instructions = db.Column(db.Text)
    tips = db.Column(db.Text)
    calories_per_minute = db.Column(db.Float)
    video_url = db.Column(db.String(255))
    image_url = db.Column(db.String(255))
    created_at = db.Column(db.DateTime, default=lambda: datetime.now(timezone.utc))
    
    # Relationships
    workout_exercises = db.relationship('WorkoutExercise', backref='exercise', lazy=True)
    progress = db.relationship('Progress', backref='exercise', lazy=True)
    
    def to_dict(self):
        return {
            'id': self.id,
            'name': self.name,
            'description': self.description,
            'category': self.category,
            'muscle_group': self.muscle_group,
            'equipment': self.equipment,
            'difficulty': self.difficulty,
            'instructions': self.instructions,
            'tips': self.tips,
            'calories_per_minute': self.calories_per_minute,
            'video_url': self.video_url,
            'image_url': self.image_url,
            'created_at': self.created_at.isoformat() if self.created_at else None
        }

class WorkoutExercise(db.Model):
    """Junction table for workout plans and exercises"""
    __tablename__ = 'workout_exercises'
    
    id = db.Column(db.Integer, primary_key=True)
    workout_plan_id = db.Column(db.Integer, db.ForeignKey('workout_plans.id'), nullable=False)
    exercise_id = db.Column(db.Integer, db.ForeignKey('exercises.id'), nullable=False)
    day_of_week = db.Column(db.Integer)  # 1-7 for Monday-Sunday
    sets = db.Column(db.Integer)
    reps = db.Column(db.Integer)
    duration_seconds = db.Column(db.Integer)
    rest_seconds = db.Column(db.Integer)
    order = db.Column(db.Integer)
    
    def to_dict(self):
        return {
            'id': self.id,
            'workout_plan_id': self.workout_plan_id,
            'exercise_id': self.exercise_id,
            'day_of_week': self.day_of_week,
            'sets': self.sets,
            'reps': self.reps,
            'duration_seconds': self.duration_seconds,
            'rest_seconds': self.rest_seconds,
            'order': self.order,
            'exercise': self.exercise.to_dict() if self.exercise else None
        }

class Progress(db.Model):
    """Progress model for tracking user workout progress"""
    __tablename__ = 'progress'
    
    id = db.Column(db.Integer, primary_key=True)
    user_id = db.Column(db.String(50), db.ForeignKey('users.id'), nullable=False)
    exercise_id = db.Column(db.Integer, db.ForeignKey('exercises.id'), nullable=False)
    sets_completed = db.Column(db.Integer)
    reps_completed = db.Column(db.Integer)
    weight_used = db.Column(db.Float)  # weight lifted in kg
    duration_seconds = db.Column(db.Integer)
    calories_burned = db.Column(db.Float)
    notes = db.Column(db.Text)
    date = db.Column(db.DateTime, default=lambda: datetime.now(timezone.utc))
    
    def to_dict(self):
        return {
            'id': self.id,
            'user_id': self.user_id,
            'exercise_id': self.exercise_id,
            'sets_completed': self.sets_completed,
            'reps_completed': self.reps_completed,
            'weight_used': self.weight_used,
            'duration_seconds': self.duration_seconds,
            'calories_burned': self.calories_burned,
            'notes': self.notes,
            'date': self.date.isoformat() if self.date else None,
            'exercise': self.exercise.to_dict() if self.exercise else None
        }

class HealthTip(db.Model):
    """Health tips model for storing fitness and nutrition advice"""
    __tablename__ = 'health_tips'
    
    id = db.Column(db.Integer, primary_key=True)
    title = db.Column(db.String(200), nullable=False)
    content = db.Column(db.Text, nullable=False)
    category = db.Column(db.String(50))  # nutrition, exercise, recovery, motivation, safety
    author = db.Column(db.String(100))
    source_url = db.Column(db.String(255))
    is_featured = db.Column(db.Boolean, default=False)
    created_at = db.Column(db.DateTime, default=lambda: datetime.now(timezone.utc))
    updated_at = db.Column(db.DateTime, default=lambda: datetime.now(timezone.utc), onupdate=lambda: datetime.now(timezone.utc))
    
    def to_dict(self):
        return {
            'id': self.id,
            'title': self.title,
            'content': self.content,
            'category': self.category,
            'author': self.author,
            'source_url': self.source_url,
            'is_featured': self.is_featured,
            'created_at': self.created_at.isoformat() if self.created_at else None,
            'updated_at': self.updated_at.isoformat() if self.updated_at else None
        }
204 lines•8.5 KB
python
🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer