Skip to content

shivpatel0812/AIGymtracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WellnessAI πŸ‹οΈβ€β™‚οΈπŸ€–

A truly agentic AI fitness coach - A comprehensive fitness tracking application with advanced AI agent capabilities, React Native frontend, Spring Boot API, Python AI backend, and Firebase integration.

πŸ“‹ Summary

WellnessAI is not just another fitness tracker - it's your intelligent AI fitness companion that actively monitors, learns, and adapts to help you achieve your goals. Unlike traditional reactive apps that just respond to queries, WellnessAI features a fully agentic AI system that proactively identifies opportunities, takes initiative, and continuously optimizes your fitness journey.

🧠 Agentic AI Capabilities

Memory & Context: Your AI coach remembers everything - every conversation, preference, goal, and insight. It builds a comprehensive understanding of your unique fitness journey over time.

Goal-Oriented Behavior: The AI doesn't just track data; it actively works toward your specific goals, providing proactive suggestions and adaptive planning that evolves with your progress.

Autonomous Actions: Your coach automatically optimizes routines, detects plateaus, and triggers interventions without you needing to ask. It's always working behind the scenes for your success.

Learning & Adaptation: The system continuously learns from your responses, outcomes, and patterns, becoming more personalized and effective over time.

Tool Integration: Seamlessly integrates external data like weather (for outdoor workout suggestions), nutrition APIs, and calendar information for intelligent scheduling.

Planning & Reasoning: Breaks down complex fitness goals into actionable steps, creates contingency plans, and reasons through cause-and-effect relationships in your data.

🎯 What Makes WellnessAI Different

WellnessAI stands apart from traditional fitness apps through its agentic approach. Instead of just answering "how do I improve my bench press?", your AI coach:

  • Remembers you mentioned dips work exceptionally well for your triceps
  • Analyzes your plateau patterns and injury history
  • Proactively suggests a periodization plan before you even ask
  • Adapts recommendations based on your unique response patterns
  • Integrates your schedule, stress levels, and preferences automatically

Unlike reactive fitness apps that simply respond to queries, WellnessAI features an intelligent agent that actively monitors your progress, learns your patterns, and continuously works toward your success - transforming from a simple Q&A tool into a personalized fitness partner that knows you intimately.

πŸ†š Traditional Fitness Apps vs WellnessAI

Feature Traditional Apps WellnessAI Agent
Interaction Style Reactive Q&A Proactive coaching
Memory Session-based only Persistent across all sessions
Personalization Basic preferences Deep psychological + physiological profile
Recommendations Generic templates Personalized based on your unique responses
Learning Static algorithms Continuously adapts to your patterns
Goal Management User-driven tracking AI-driven planning with contingencies
Context Awareness Current session only Comprehensive life context integration
Problem Solving Rule-based responses Sophisticated reasoning and planning

πŸ—οΈ Architecture

  • Frontend: React Native with Expo
  • Agentic AI System: Advanced multi-capability AI orchestrator
  • API Layer: Spring Boot REST API
  • AI Backend: Python-based workout analysis + OpenAI integration
  • Database: Firebase Firestore with intelligent data persistence
  • Authentication: Firebase Auth
  • External Integrations: Weather APIs, Nutrition databases, Calendar sync

✨ Features

πŸ‹οΈ Core Fitness Tracking

  • Intelligent Workout Logging: Track exercises with AI-suggested progressions
  • Adaptive Split Management: AI-optimized workout splits that evolve with your progress
  • Comprehensive Progress History: Deep analytics and pattern recognition
  • Smart Nutrition Tracking: Food logging with AI-powered macro optimization
  • Holistic Health Monitoring: Hydration, stress, sleep, and recovery tracking

πŸ€– Agentic AI Coach Features

  • Proactive Recommendations: AI suggests workouts, nutrition, and recovery before you ask
  • Contextual Conversations: Remembers every interaction and builds on previous conversations
  • Goal-Oriented Planning: Multi-step goal breakdown with contingency strategies
  • Autonomous Optimization: Automatic routine adjustments based on performance data
  • Intelligent Interventions: Plateau detection and breakthrough strategies
  • Personalized Communication: Adapts coaching style to your preferences (motivational, analytical, casual)

πŸ“Š Comprehensive User Profiling

  • Brain Dump System: Detailed personal insights capture (exercise responses, food sensitivities, growth patterns)
  • Exercise Response Tracking: "Dips make my triceps grow more than other exercises" level of detail
  • Injury History Integration: AI considers past injuries in all recommendations
  • Lifestyle Context Awareness: Work schedule, family commitments, travel frequency considerations
  • Personal Theory Documentation: Capture and validate your own fitness hypotheses

πŸ”— Smart Integrations

  • Weather-Aware Planning: Outdoor workout alternatives based on conditions
  • Calendar Synchronization: Workout scheduling around your commitments
  • Nutrition API Integration: Enhanced food database and macro calculations
  • Progress Photo Analysis: AI-powered body composition insights

πŸš€ Quick Start

Frontend Setup

  1. Clone the repository
  2. Install dependencies: npm install
  3. Copy env.example to .env and fill in your Firebase configuration
  4. Start the development server: npm start

Backend Setup

  1. Spring Boot API:

    cd spring-api
    ./mvnw spring-boot:run
  2. Python AI Backend:

    cd backend
    export OPENAI_API_KEY="your-key"
    python main.py

Test Data Setup

  1. Update TEST_USER_ID in test-data-uploader.js
  2. Add your Firebase service account key
  3. Run: ./upload-test-data.sh

πŸ”§ Configuration

Firebase

  • Enable Authentication with Email/Password
  • Set up Firestore database
  • Configure service account for backend access

Environment Variables

  • OPENAI_API_KEY: Required for AI analysis
  • Firebase config in frontend .env

πŸ“ Project Structure

gymapp/
β”œβ”€β”€ src/                          # React Native frontend
β”‚   β”œβ”€β”€ components/               # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ AgentInterface.tsx    # AI coach chat interface
β”‚   β”‚   └── ...                   # Other UI components
β”‚   β”œβ”€β”€ config/                   # Environment and configuration
β”‚   β”œβ”€β”€ contexts/                 # React contexts (Auth, etc.)
β”‚   β”œβ”€β”€ screens/                  # App screens
β”‚   β”‚   β”œβ”€β”€ ComprehensiveProfileScreen.tsx  # Detailed user profiling
β”‚   β”‚   β”œβ”€β”€ DashboardScreen.tsx   # Main hub with AI integration
β”‚   β”‚   └── ...                   # Other screens
β”‚   β”œβ”€β”€ services/                 # Core AI and Firebase services
β”‚   β”‚   β”œβ”€β”€ agentOrchestrator.ts  # Main AI agent coordinator
β”‚   β”‚   β”œβ”€β”€ agentMemory.ts        # Conversation & preference memory
β”‚   β”‚   β”œβ”€β”€ goalOriented.ts       # Goal-driven behavior system
β”‚   β”‚   β”œβ”€β”€ learningAdaptation.ts # Learning and pattern recognition
β”‚   β”‚   β”œβ”€β”€ autonomousActions.ts  # Proactive automation
β”‚   β”‚   β”œβ”€β”€ planningReasoning.ts  # Multi-step goal planning
β”‚   β”‚   β”œβ”€β”€ toolUsage.ts          # External API integrations
β”‚   β”‚   β”œβ”€β”€ comprehensiveProfile.ts # Advanced user profiling
β”‚   β”‚   └── goalAwareAnalysis.ts  # Context-aware analytics
β”‚   β”œβ”€β”€ hooks/                    # React hooks
β”‚   β”‚   β”œβ”€β”€ useAgent.ts           # AI agent integration hook
β”‚   β”‚   └── ...                   # Other hooks
β”‚   β”œβ”€β”€ types/                    # TypeScript type definitions
β”‚   β”‚   β”œβ”€β”€ index.ts              # Core types + comprehensive profiling
β”‚   β”‚   └── navigation.ts         # Navigation type safety
β”‚   └── utils/                    # Utility functions
β”œβ”€β”€ spring-api/                   # Spring Boot REST API
β”œβ”€β”€ backend/                      # Python AI backend
β”œβ”€β”€ test-data-uploader.js        # Firebase test data uploader
└── README-test-data.md          # Test data documentation

πŸ”Œ AI Agent System

🧠 Core Agent Capabilities

Agent Orchestrator (agentOrchestrator.ts)

  • Coordinates all AI capabilities and user interactions
  • Contextual response generation with conversation memory
  • Real-time adaptation based on user patterns and preferences
  • Emergency scenario handling (injuries, motivation crises, equipment failures)

Memory System (agentMemory.ts)

  • Persistent conversation history with context preservation
  • User preference learning and evolution tracking
  • Progress pattern analysis and behavioral insights
  • Cross-session continuity for personalized coaching

Goal-Oriented Planning (goalOriented.ts)

  • Proactive suggestion generation based on user behavior
  • Adaptive workout plan modifications
  • Milestone tracking and achievement celebration
  • Multi-step goal decomposition with timeline management

πŸ”— External API Integrations

Tool Usage Service (toolUsage.ts)

  • Weather API integration for outdoor workout planning
  • Nutrition database access for enhanced food logging
  • Calendar synchronization for intelligent scheduling
  • Platform-specific adaptations (web vs mobile)

Learning & Adaptation (learningAdaptation.ts)

  • Real-time outcome tracking and feedback loop processing
  • Pattern recognition across workout, nutrition, and recovery data
  • Preference learning from user responses and behaviors
  • Continuous model improvement based on user success metrics

🎯 User Experience Flow

πŸš€ Getting Started with Your AI Coach

  1. Initial Setup: Complete basic profile and goals

  2. Comprehensive Profiling: Use the "Brain Dump" system to share detailed insights

    • Exercise responses: "Dips make my triceps grow more than other exercises"
    • Food sensitivities: "Dairy makes me bloated"
    • Growth patterns: "I respond better to higher volume on legs"
    • Personal theories: "I think stress affects my weight more than diet"
  3. AI Integration: Your coach immediately begins personalizing all recommendations

  4. Continuous Learning: Every interaction teaches the AI more about your preferences

  5. Proactive Coaching: Receive suggestions, interventions, and optimizations automatically

πŸ’¬ AI Coach Interactions

The AI coach provides contextually-aware responses:

  • Exercise Questions: "How do I improve my bench?" β†’ Personalized advice considering your injury history, favorite exercises, and plateau patterns
  • Nutrition Guidance: Recommendations adapted to your food sensitivities and what you've reported works
  • Workout Planning: Suggestions that factor in your schedule, energy patterns, and response to different training styles
  • Progress Tracking: Analysis that considers your unique growth patterns and circumstances

πŸ“Š Test Data & Development

The app includes comprehensive test data for development:

  • Nutrition: 15-day vegetarian meal plan with macro tracking
  • Workouts: 3-week PPL++ schedule with progressive overload
  • Health Metrics: Hydration, stress, and sleep tracking patterns
  • AI Conversations: Sample interactions showing agent capabilities
  • Comprehensive Profiles: Example brain dump data for testing personalization

See README-test-data.md for detailed setup instructions.

πŸ“š For comprehensive AI agent documentation, see README-AI-AGENT.md

πŸ§ͺ Testing

  1. Frontend: Test core functionality with uploaded Firebase data
  2. AI Agent System: Verify all 6 agentic capabilities work correctly
  3. Personalization: Test comprehensive profile system and brain dump features
  4. Integration: Verify data flow between AI services and external APIs
  5. Memory & Context: Test conversation continuity and preference learning

πŸ“š Dependencies

Frontend

  • React Native with Expo - Cross-platform mobile development
  • Firebase (Authentication, Firestore) - Backend services and real-time database
  • React Navigation - Navigation with TypeScript support
  • React Native Paper - Material Design components
  • Zustand - Lightweight state management
  • AI Agent System - Custom agentic capabilities (6 core services)

Backend & AI

  • Spring Boot - REST API layer
  • Python 3.x - AI backend processing
  • OpenAI API - Advanced language model integration
  • Firebase Admin SDK - Server-side Firebase integration
  • Weather APIs - External data for intelligent planning
  • Nutrition APIs - Enhanced food database access

Key AI Libraries & Services

  • Conversation Memory - Persistent context across sessions
  • Pattern Recognition - Learning from user behavior data
  • Goal Planning - Multi-step objective decomposition
  • Autonomous Actions - Proactive optimization and interventions
  • External Tool Integration - Weather, nutrition, calendar APIs

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors