Skip to content

AI-Coach is a context-aware health and fitness assistant that uses AI to deliver personalized workout plans, nutrition tips, and wellness insights. Built with Flutter and Node.js, it integrates with health services for a smarter fitness journey.

Notifications You must be signed in to change notification settings

priyanshusingh-in/AI-Coach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Coach πŸƒβ€β™‚οΈπŸ’ͺ

A Context-Aware Health & Fitness AI Coach

License: MIT TypeScript Flutter Node.js MongoDB Status: Under Development Contributions Welcome

πŸ“‹ Overview

AI-Coach is an intelligent health and fitness assistant that leverages advanced AI capabilities to provide personalized coaching for your wellness journey. Built as a full-stack application with a Flutter mobile app and Node.js backend, it integrates with various health and fitness services to deliver personalized workout plans, nutrition guidance, and wellness insights.

🚧 Development Status

⚠️ This project is currently under active development and is not yet ready for production use. We're following a phased development approach as outlined in our Development Plan.

πŸ—ΊοΈ Development Plan

The AI-Coach project follows a structured, multi-phase development plan to ensure systematic progress and high-quality results. Below is an overview of the main phases:

Phase 1: Project Setup & Architecture

  • Establish monorepo structure for backend, mobile, shared types, docs, and scripts
  • Set up Node.js/Express backend with TypeScript and MongoDB
  • Implement JWT authentication and basic user/session management
  • Design initial database schemas for users, coaching sessions, health data, and workout plans

Phase 2: AI Integration Layer

  • Integrate OpenAI for AI-powered coaching
  • Manage conversation context and token usage
  • Implement vector search in MongoDB Atlas for context retrieval
  • Build a flexible tool integration system for fitness/nutrition APIs

Phase 3: Backend API Development

  • Develop RESTful APIs for coaching, health data, workouts, and user profiles
  • Implement validation, authentication, and response formatting
  • Enable health data analysis and personalized recommendations

Phase 4: Flutter Mobile App

  • Set up Flutter project with organized folder structure and state management
  • Develop core screens: fitness chat, health dashboard, workout/nutrition tracking, settings, and profile
  • Implement real-time features: live coaching, workout tracking, voice commands, and notifications

Phase 5: Advanced AI Features

  • Build advanced fitness intelligence: workout analysis, recommendation ranking, and progress tracking
  • Add multi-modal analysis: exercise form (video/photo), food recognition, and progress photos
  • Implement motivation features: reminders, encouragement, and goal tracking

Phase 6: External Integrations

  • Integrate with health platforms (Apple HealthKit, Google Fit, Fitbit, etc.)
  • Connect to workout/nutrition apps and APIs
  • Enable calendar, sleep, and wellness tracking integrations

Phase 7: Testing & Quality Assurance

  • Create comprehensive test suites for backend and mobile
  • Test AI response quality, vector search accuracy, and performance
  • Ensure privacy, security, and data protection

Phase 8: Performance Optimization

  • Optimize backend and mobile app performance
  • Implement caching, compression, and efficient state management
  • Enhance AI pipeline efficiency and cost-effectiveness

Phase 9: Security & Privacy

  • Enforce data encryption, input validation, and API security
  • Provide user privacy controls, consent management, and data deletion

Phase 10: Deployment & DevOps

  • Set up Docker, CI/CD pipelines, and production infrastructure
  • Prepare mobile app for app store distribution and monitoring

This phased approach ensures the project is built with scalability, security, and user experience in mind, delivering a robust AI-powered health and fitness coaching platform.

Current Phase

  • Phase 1: Project Setup & Architecture βœ…
  • Phase 2: AI Integration Layer πŸ”„ (In Progress)
  • Phase 3: Backend API Development πŸ“‹ (Planned)
  • Phase 4: Flutter Mobile App πŸ“‹ (Planned)
  • Phase 5: Advanced AI Features πŸ“‹ (Planned)

Contributing

We welcome contributions from the community! Whether you're interested in:

  • 🧠 AI/ML development
  • πŸ“± Flutter mobile development
  • πŸ”§ Backend API development
  • 🎨 UI/UX design
  • πŸ“š Documentation
  • πŸ§ͺ Testing

Please see our Contributing Guidelines below.

🎯 Key Features

  • πŸ€– AI-Powered Health Coaching: Natural language interactions with fitness expertise
  • πŸ’ͺ Personalized Workout Plans: Custom training programs based on your goals
  • πŸ₯— Nutrition Guidance: Meal planning and dietary recommendations
  • πŸ“Š Health Analytics: Comprehensive wellness tracking and insights
  • πŸ”— Fitness Integrations: Connect with your favorite health apps and devices
  • πŸ“± Cross-Platform Mobile App: Flutter-based iOS and Android support
  • 🧠 Smart Recommendations: AI-driven insights based on your health data
  • πŸ”’ Privacy-First: Secure health data handling and encryption
  • ⚑ Real-time Updates: Live tracking and instant feedback

πŸ—οΈ Architecture

AI-Coach/
β”œβ”€β”€ backend/           # Node.js/Express API server
β”œβ”€β”€ mobile/           # Flutter mobile application
β”œβ”€β”€ shared/           # TypeScript types and interfaces
β”œβ”€β”€ docs/             # API documentation
β”œβ”€β”€ scripts/          # Deployment and utility scripts
└── README.md         # This file

Tech Stack

Component Technology Purpose
Backend Node.js, Express, TypeScript API server and fitness logic
Database MongoDB Atlas with Vector Search Health data storage and workout recommendations
AI Integration OpenAI GPT-4, Embeddings Fitness coaching and nutrition advice
Mobile App Flutter, Dart Cross-platform fitness interface
Authentication JWT Secure user authentication
Real-time WebSocket Live workout tracking and coaching

πŸš€ Quick Start

Prerequisites

  • Node.js (v18 or higher)
  • Flutter SDK (v3.10 or higher)
  • MongoDB Atlas account
  • OpenAI API key
  • Git

Backend Setup

  1. Navigate to backend directory:

    cd backend
  2. Install dependencies:

    npm install
  3. Configure environment variables:

    cp .env.example .env

    Edit .env with your configuration:

    MONGODB_URI=your_mongodb_atlas_connection_string
    OPENAI_API_KEY=your_openai_api_key
    JWT_SECRET=your_jwt_secret
    PORT=3000
    NODE_ENV=development
  4. Start the development server:

    npm run dev

Mobile App Setup

  1. Navigate to mobile directory:

    cd mobile
  2. Install Flutter dependencies:

    flutter pub get
  3. Configure API endpoint: Edit lib/config/api_config.dart with your backend URL.

  4. Run the app:

    flutter run

πŸ“± Mobile App Features

Core Screens

  • πŸ’¬ Fitness Chat: AI-powered workout and nutrition conversations
  • 🎀 Voice Commands: Hands-free workout tracking and coaching
  • πŸ“Š Health Dashboard: Comprehensive fitness metrics and progress
  • πŸ’ͺ Workout Tracker: Real-time exercise logging and form guidance
  • πŸ₯— Nutrition Log: Meal tracking and dietary recommendations
  • βš™οΈ Settings: Fitness preferences and device integrations
  • πŸ‘€ Profile: Health goals and personal fitness data

Integrations

  • πŸƒβ€β™‚οΈ Health & Fitness: Apple HealthKit, Google Fit, Fitbit, Garmin
  • πŸ’ͺ Workout Apps: Strava, MyFitnessPal, Nike Run Club
  • πŸ₯— Nutrition Apps: Cronometer, Lose It!, MyPlate
  • πŸ“± Wearables: Apple Watch, Fitbit, Garmin devices
  • πŸ‹οΈβ€β™‚οΈ Gym Equipment: Smart equipment integration

πŸ”§ API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • POST /api/auth/refresh - Token refresh

Fitness Coaching

  • POST /api/coaching/message - Send fitness question, get AI response
  • GET /api/coaching/sessions - Retrieve coaching history
  • POST /api/coaching/session - Create new coaching session
  • PUT /api/coaching/session/:id - Update session metadata
  • DELETE /api/coaching/session/:id - Archive coaching session

Workout Management

  • POST /api/workouts/create - Create personalized workout plan
  • GET /api/workouts/history - Retrieve workout history
  • PUT /api/workouts/:id - Update workout progress
  • DELETE /api/workouts/:id - Delete workout plan

Health Data Management

  • POST /api/health/update - Store health and fitness data
  • GET /api/health/retrieve - Get relevant health context for AI
  • POST /api/health/embedding - Generate embeddings for health data
  • GET /api/health/search - Vector similarity search for fitness insights

User Profile & Goals

  • GET /api/user/profile - Get user fitness profile
  • PUT /api/user/profile - Update user fitness profile
  • GET /api/user/goals - Get fitness goals
  • PUT /api/user/goals - Update fitness goals

🧠 AI Features

Fitness Intelligence Pipeline

  • Workout Analysis: Exercise form and performance evaluation
  • Nutrition Optimization: Personalized meal planning and recommendations
  • Progress Tracking: AI-driven fitness goal monitoring
  • Smart Coaching: Context-aware fitness advice and motivation

Health Data Integration

  • Fitness Tracker Sync: Real-time health data from wearables
  • Workout Recommendations: Personalized exercise suggestions
  • Nutrition Guidance: Dietary advice based on health metrics
  • Recovery Monitoring: Rest and recovery optimization

Multi-modal Fitness Analysis

  • Exercise Form Analysis: Video-based movement assessment
  • Food Recognition: Photo-based nutrition logging
  • Voice Commands: Hands-free workout tracking
  • Progress Photos: Visual fitness transformation tracking

πŸ”’ Security & Privacy

Data Protection

  • Encryption: AES-256 encryption at rest and in transit
  • Authentication: JWT-based secure authentication
  • Authorization: Role-based access control
  • Input Validation: Comprehensive sanitization

Privacy Controls

  • Health Data Protection: HIPAA-compliant health information handling
  • Consent Management: Granular fitness data permission controls
  • Data Deletion: Complete health and fitness data removal
  • Privacy Dashboard: Transparent health data usage

πŸ§ͺ Testing

Backend Testing

cd backend
npm run test          # Unit tests
npm run test:integration  # Integration tests
npm run test:coverage # Coverage report

Mobile Testing

cd mobile
flutter test          # Unit and widget tests
flutter test integration_test/  # Integration tests

πŸ“Š Performance Metrics

Technical Targets

  • API Response Time: < 200ms
  • Mobile App Startup: < 2 seconds
  • AI Fitness Advice Accuracy: > 90%
  • System Uptime: > 99.5%
  • User Workout Completion Rate: > 75%

Monitoring

  • Fitness Performance: Real-time workout metrics tracking
  • Health Data Analytics: Comprehensive fitness insights
  • User Progress: Workout completion and goal achievement
  • AI Coaching Quality: Fitness advice accuracy monitoring

πŸš€ Deployment

Backend Deployment

cd backend
npm run build
npm run start

Mobile App Distribution

cd mobile
flutter build apk --release    # Android
flutter build ios --release    # iOS

🀝 Contributing

πŸŽ‰ We're excited to have you contribute to AI-Coach! This is an open-source project that thrives on community collaboration.

How to Contribute

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Areas We Need Help With

  • 🧠 AI Fitness Coaching: OpenAI API integration, workout recommendation algorithms
  • πŸ“± Mobile Development: Flutter fitness UI components, workout tracking
  • πŸ”§ Backend APIs: Express.js fitness endpoints, health data management
  • 🎨 UI/UX Design: Fitness app interface, workout flow design
  • πŸ§ͺ Testing: Fitness feature testing, health data validation
  • πŸ“š Documentation: Fitness API docs, workout guides, nutrition resources
  • πŸ”’ Security: Health data protection, HIPAA compliance features

Development Guidelines

  • Follow TypeScript best practices
  • Write comprehensive tests
  • Maintain code documentation
  • Use conventional commit messages
  • Follow Flutter style guidelines

πŸ“š Documentation

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenAI for GPT-4 and fitness coaching capabilities
  • MongoDB Atlas for health data storage and workout recommendations
  • Flutter for cross-platform fitness app development
  • Cursor AI for development acceleration
  • Fitness Community for inspiration and feedback

πŸ“ž Support


Built with ❀️ for the fitness community using modern AI and health technology

About

AI-Coach is a context-aware health and fitness assistant that uses AI to deliver personalized workout plans, nutrition tips, and wellness insights. Built with Flutter and Node.js, it integrates with health services for a smarter fitness journey.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published