# rishikaran21/sport-coach-app architecture

> Architecture diagram of the GitHub repository rishikaran21/sport-coach-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rishikaran21/sport-coach-app
- Repository: https://github.com/rishikaran21/sport-coach-app

## Overview

Coach Sportif is a Streamlit app that takes a user’s profile and fitness goal, then presents personalized health metrics, four-week training and nutrition plans, macro guidance, and a weight forecast. The interface orchestrates calls into the calculation module and displays or offers the results for download. The README documents the capabilities; source excerpts show the main interface calls. The notebook is presentation material, not part of the runtime workflow.

Main entry points: [`interface2.py`](https://github.com/rishikaran21/sport-coach-app/blob/main/interface2.py) (Streamlit interface), [`calculs2.py`](https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py) (BMI and calories)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["User interface"]
  node_streamlit_ui["Streamlit interface<br/>[interface2.py]"]
end

subgraph group_personalization["Personalized metrics"]
  node_health_metrics["BMI and calories<br/>[calculs2.py]"]
end

subgraph group_plans["Four-week plans"]
  node_training_plan["Training plan<br/>[calculs2.py]"]
  node_training_pdf["Training PDF<br/>[calculs2.py]"]
  node_nutrition_plan["Nutrition plan<br/>[calculs2.py]"]
  node_nutrition_pdf["Nutrition PDF<br/>[calculs2.py]"]
end

subgraph group_guidance["Nutrition and forecasting"]
  node_macro_guidance["Macro guidance<br/>[calculs2.py]"]
  node_weight_forecast["Weight forecast<br/>[calculs2.py]"]
end

node_user(("User"))

node_user -->|"enters profile"| node_streamlit_ui
node_streamlit_ui -->|"calls calculations"| node_health_metrics
node_health_metrics -->|"returns metrics"| node_streamlit_ui
node_streamlit_ui -->|"generates plan"| node_training_plan
node_training_plan -->|"returns table"| node_streamlit_ui
node_streamlit_ui -->|"exports plan"| node_training_pdf
node_training_pdf -->|"returns PDF"| node_streamlit_ui
node_streamlit_ui -->|"generates plan"| node_nutrition_plan
node_nutrition_plan -->|"returns table"| node_streamlit_ui
node_streamlit_ui -->|"exports plan"| node_nutrition_pdf
node_nutrition_pdf -->|"returns PDF"| node_streamlit_ui
node_streamlit_ui -->|"gets guidance"| node_macro_guidance
node_macro_guidance -->|"returns guidance"| node_streamlit_ui
node_streamlit_ui -->|"creates forecast"| node_weight_forecast
node_weight_forecast -->|"returns chart"| node_streamlit_ui

click node_streamlit_ui "https://github.com/rishikaran21/sport-coach-app/blob/main/interface2.py"
click node_health_metrics "https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py"
click node_training_plan "https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py"
click node_training_pdf "https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py"
click node_nutrition_plan "https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py"
click node_nutrition_pdf "https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py"
click node_macro_guidance "https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py"
click node_weight_forecast "https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit_ui,node_user toneBlue
class node_health_metrics toneAmber
class node_training_plan,node_training_pdf,node_nutrition_plan,node_nutrition_pdf toneMint
class node_macro_guidance,node_weight_forecast toneRose
```

## Components

### User interface

- [Streamlit interface](https://github.com/rishikaran21/sport-coach-app/blob/main/interface2.py): `interface2.py`

### Personalized metrics

- [BMI and calories](https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py): `calculs2.py`

### Four-week plans

- [Training plan](https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py): `calculs2.py`
- [Training PDF](https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py): `calculs2.py`
- [Nutrition plan](https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py): `calculs2.py`
- [Nutrition PDF](https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py): `calculs2.py`

### Nutrition and forecasting

- [Macro guidance](https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py): `calculs2.py`
- [Weight forecast](https://github.com/rishikaran21/sport-coach-app/blob/main/calculs2.py): `calculs2.py`

### Other components

- **User**

## Connections

- User → Streamlit interface: enters profile (evidence: `readme.md`)
- Streamlit interface → BMI and calories: calls calculations (evidence: `interface2.py`)
- BMI and calories → Streamlit interface: returns metrics (evidence: `interface2.py`)
- Streamlit interface → Training plan: generates plan (evidence: `interface2.py`)
- Training plan → Streamlit interface: returns table (evidence: `interface2.py`)
- Streamlit interface → Training PDF: exports plan (evidence: `interface2.py`)
- Training PDF → Streamlit interface: returns PDF (evidence: `interface2.py`)
- Streamlit interface → Nutrition plan: generates plan (evidence: `interface2.py`)
- Nutrition plan → Streamlit interface: returns table (evidence: `interface2.py`)
- Streamlit interface → Nutrition PDF: exports plan (evidence: `interface2.py`)
- Nutrition PDF → Streamlit interface: returns PDF (evidence: `interface2.py`)
- Streamlit interface → Macro guidance: gets guidance (evidence: `interface2.py`)
- Macro guidance → Streamlit interface: returns guidance (evidence: `interface2.py`)
- Streamlit interface → Weight forecast: creates forecast (evidence: `interface2.py`)
- Weight forecast → Streamlit interface: returns chart (evidence: `interface2.py`)
