A Context-Aware Health & Fitness AI Coach
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.
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:
- 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
- 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
- Develop RESTful APIs for coaching, health data, workouts, and user profiles
- Implement validation, authentication, and response formatting
- Enable health data analysis and personalized recommendations
- 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
- 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
- Integrate with health platforms (Apple HealthKit, Google Fit, Fitbit, etc.)
- Connect to workout/nutrition apps and APIs
- Enable calendar, sleep, and wellness tracking integrations
- Create comprehensive test suites for backend and mobile
- Test AI response quality, vector search accuracy, and performance
- Ensure privacy, security, and data protection
- Optimize backend and mobile app performance
- Implement caching, compression, and efficient state management
- Enhance AI pipeline efficiency and cost-effectiveness
- Enforce data encryption, input validation, and API security
- Provide user privacy controls, consent management, and data deletion
- 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.
- 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)
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.
- π€ 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
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
| 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 |
- Node.js (v18 or higher)
- Flutter SDK (v3.10 or higher)
- MongoDB Atlas account
- OpenAI API key
- Git
-
Navigate to backend directory:
cd backend -
Install dependencies:
npm install
-
Configure environment variables:
cp .env.example .env
Edit
.envwith 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
-
Start the development server:
npm run dev
-
Navigate to mobile directory:
cd mobile -
Install Flutter dependencies:
flutter pub get
-
Configure API endpoint: Edit
lib/config/api_config.dartwith your backend URL. -
Run the app:
flutter run
- π¬ 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
- πββοΈ 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
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/refresh- Token refresh
POST /api/coaching/message- Send fitness question, get AI responseGET /api/coaching/sessions- Retrieve coaching historyPOST /api/coaching/session- Create new coaching sessionPUT /api/coaching/session/:id- Update session metadataDELETE /api/coaching/session/:id- Archive coaching session
POST /api/workouts/create- Create personalized workout planGET /api/workouts/history- Retrieve workout historyPUT /api/workouts/:id- Update workout progressDELETE /api/workouts/:id- Delete workout plan
POST /api/health/update- Store health and fitness dataGET /api/health/retrieve- Get relevant health context for AIPOST /api/health/embedding- Generate embeddings for health dataGET /api/health/search- Vector similarity search for fitness insights
GET /api/user/profile- Get user fitness profilePUT /api/user/profile- Update user fitness profileGET /api/user/goals- Get fitness goalsPUT /api/user/goals- Update fitness goals
- 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
- 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
- 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
- Encryption: AES-256 encryption at rest and in transit
- Authentication: JWT-based secure authentication
- Authorization: Role-based access control
- Input Validation: Comprehensive sanitization
- 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
cd backend
npm run test # Unit tests
npm run test:integration # Integration tests
npm run test:coverage # Coverage reportcd mobile
flutter test # Unit and widget tests
flutter test integration_test/ # Integration tests- API Response Time: < 200ms
- Mobile App Startup: < 2 seconds
- AI Fitness Advice Accuracy: > 90%
- System Uptime: > 99.5%
- User Workout Completion Rate: > 75%
- 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
cd backend
npm run build
npm run startcd mobile
flutter build apk --release # Android
flutter build ios --release # iOSπ We're excited to have you contribute to AI-Coach! This is an open-source project that thrives on community collaboration.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- π§ 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
- Follow TypeScript best practices
- Write comprehensive tests
- Maintain code documentation
- Use conventional commit messages
- Follow Flutter style guidelines
- API Documentation - Complete API reference
- Architecture Guide - System design overview
- Deployment Guide - Production deployment instructions
This project is licensed under the MIT License - see the LICENSE file for details.
- 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
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@ai-coach.com
Built with β€οΈ for the fitness community using modern AI and health technology