Skip to content

healthai-workout

Service de recommandation d'activité physique personnalisée.

  • Image : ghcr.io/healthai-corpo/healthai-workout
  • Port : 8002
  • Swagger : http://localhost:8002/docs

Rôle

Génère un programme d'entraînement hebdomadaire personnalisé selon le profil utilisateur (objectif, niveau, équipements disponibles) via un modèle Scikit-learn.

Stack IA

ComposantTechnologie
ModèleScikit-learn (.joblib)
Base NoSQLMongoDB via Motor (async)
Base relationnellePostgreSQL — table exercice (lecture)

Flux principal

POST /recommend/workout
  (objectif, niveau, équipements)
  → feature vector
  → modèle Scikit-learn
  → programme hebdomadaire
  → stockage MongoDB
  → JSON

Structure MongoDB

json
{
  "utilisateur_id": "uuid",
  "objectif": "perte_poids",
  "niveau": "intermediaire",
  "programme": {
    "semaine": 1,
    "seances": [
      { "jour": "lundi", "exercices": ["..."] }
    ]
  },
  "metrics": {
    "model_version": "1.0.0",
    "confidence_score": 0.87
  }
}

Structure

src/
├── api/             # Endpoint POST /recommend/workout
├── core/            # Config (chemin modèle .joblib)
├── infrastructure/  # Connexion MongoDB (historique NoSQL)
├── services/        # Logique IA (Scikit-learn fine-tuning)
└── main.py          # Serveur (port 8002)
models/              # Modèles entraînés (.joblib)

Lancement isolé

bash
cd healthai-workout
uv sync
docker compose up --build healthai-workout

Migrations BDD à prévoir

FichierContenu
000006_analyse_repas.up.sqlCache + historique analyses photos
000007_historique_recommandations.up.sqlTrace recommandations (ref ObjectId MongoDB)