FitnessCoach

1

Описание

AI-powered fitness coach with multi-provider support (Claude, GPT, Ollama). PWA with 27 MCP tools, workout planning, and progress tracking.

Языки

  • Python69,9%
  • TypeScript24,3%
  • Shell3,3%
  • Makefile0,9%
  • CSS0,9%
  • JavaScript0,6%
  • Остальные0,1%
README.md

🏋️ Fitness Coach — AI Personal Trainer

English | Русский

License: MIT Python 3.11+ Next.js 16

Open-source AI fitness coach with multi-provider support. Build personalized workout plans, track progress, and get intelligent coaching through a conversational interface.

Features

  • Multi-Provider AI: Choose Anthropic Claude, OpenAI GPT, or self-hosted Ollama
  • 27 MCP Tools: Comprehensive workout management with parallel execution
  • Graph Knowledge Base: Exercise relationships, alternatives, and progressions
  • Conversational Coaching: Natural language chat with tool-calling capabilities
  • Smart Plan Creation: Efficient full-plan creation in a single tool call
  • Workout Management: Create, track, and adapt workout plans
  • Progress Tracking: Statistics, streaks, and completion metrics
  • Offline Support: PWA with service worker caching
  • Memory System: Optional RAG for personalized long-term context
  • Docker Ready: Production-grade containerized deployment

Home Screen

More screenshots

AI Chat Training Plans

Quick Start

1. Clone

2. Configure

3. Run

Open http://localhost:8000/docs for API documentation.

Architecture

fitness-coach/ ├── backend/ # FastAPI + SQLAlchemy │ ├── app/ │ │ ├── api/fitness/ # REST endpoints (plans, workouts, chat) │ │ ├── models/ # SQLAlchemy models │ │ ├── providers/ # AI, embedding, RAG, memory providers │ │ └── services/ # Business logic + AI agent │ └── requirements/ # Modular dependencies ├── frontend/ # Next.js 16 PWA │ ├── src/app/ # App Router pages │ ├── src/components/ # React components │ └── src/stores/ # Zustand state management └── docker/ # Docker Compose deployment ├── docker-compose.yml # Production config └── docker-compose.dev.yml # Development overrides
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ Frontend │────▶│ Backend │────▶│ PostgreSQL │ │ (Next.js) │ │ (FastAPI) │ │ + pgvector │ └─────────────┘ └──────┬──────┘ └─────────────┘ │ ┌────────────┼────────────┐ ▼ ▼ ▼ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ Anthropic│ │ OpenAI │ │ Ollama │ │ Claude │ │ GPT │ │ (Local) │ └──────────┘ └──────────┘ └──────────┘

AI Provider Comparison

ProviderStatusBest ForCostPrivacyQuality
Anthropic Claude✅ DefaultProduction use$3-15/1M tokensCloudExcellent
OpenAI GPT-4o✅ TestedBroad compatibility$2.50-10/1M tokensCloudVery Good
Ollama✅ SupportedPrivacy, offlineFree (self-hosted)FullGood

See backend/README.md for detailed provider configuration and available models.

Core Capabilities

27 MCP Tools organized by category:

  • Basic (7): Plans, workouts, stats, history
  • CRUD (8): Create/edit plans, weeks, days, exercises
  • Batch (2):
    create_full_plan
    ,
    create_full_week
    for efficient creation
  • Graph (4): Exercise alternatives, progressions, muscle-exercise mapping
  • RAG (2): Search workout memory, store insights
  • Status (3): Complete, skip, add notes
  • Other (1): Training programs

Performance: Parallel tool execution via asyncio.gather for multi-tool operations.

Knowledge Base: NetworkX or Neo4j graph for exercise relationships and progressions.

Documentation

DocumentDescription
Backend READMEAPI setup, provider configuration, 27 tools reference
Frontend READMEPWA setup, components, state management
Docker GuideContainer deployment, production config
ContributingHow to contribute to the project

Development

Backend

Frontend

Contributing

We welcome contributions. See CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.