# martizval/wizelineacademy architecture

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

- Interactive diagram: https://gitdiagram.com/martizval/wizelineacademy
- Repository: https://github.com/martizval/wizelineacademy

## Overview

Fitness Planner is a Flask app that collects health and location details, requests a personalized seven-day workout and diet plan from OpenAI, and displays the result. The main flow is visible in back.py; README also describes saving the plan to a text file, but that behavior is not present in the excerpted implementation, so it is shown as a documented output rather than a verified runtime call.

Main entry points: [`back.py`](https://github.com/martizval/wizelineacademy/blob/main/back.py) (Flask routes), [`templates/index.html`](https://github.com/martizval/wizelineacademy/blob/main/templates/index.html) (Health form), [`templates/result.html`](https://github.com/martizval/wizelineacademy/blob/main/templates/result.html) (Plan page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interaction"]
  node_form["Health form<br/>[index.html]"]
  node_app["Flask routes<br/>[back.py]"]
end

subgraph group_planning["Plan generation"]
  node_planner["Plan builder<br/>[back.py]"]
  node_openai{{"OpenAI API"}}
end

subgraph group_outputs["Plan output"]
  node_result["Plan page<br/>[result.html]"]
  node_planfile["Saved plan"]
end

node_user(("User"))

node_user -->|"enters details"| node_form
node_form -->|"submits form"| node_app
node_app -->|"renders page"| node_form
node_app -->|"calls builder"| node_planner
node_planner -->|"requests plan"| node_openai
node_app -->|"renders plan"| node_result
node_user -->|"views plan"| node_result
node_app -.->|"saves plan"| node_planfile

click node_form "https://github.com/martizval/wizelineacademy/blob/main/templates/index.html"
click node_app "https://github.com/martizval/wizelineacademy/blob/main/back.py"
click node_planner "https://github.com/martizval/wizelineacademy/blob/main/back.py"
click node_result "https://github.com/martizval/wizelineacademy/blob/main/templates/result.html"

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_form,node_app,node_user toneBlue
class node_planner,node_openai toneAmber
class node_result,node_planfile toneMint
```

## Components

### Web interaction

- [Health form](https://github.com/martizval/wizelineacademy/blob/main/templates/index.html): `templates/index.html`
- [Flask routes](https://github.com/martizval/wizelineacademy/blob/main/back.py): `back.py`

### Plan generation

- [Plan builder](https://github.com/martizval/wizelineacademy/blob/main/back.py): `back.py`
- **OpenAI API**

### Plan output

- [Plan page](https://github.com/martizval/wizelineacademy/blob/main/templates/result.html): `templates/result.html`
- **Saved plan**

### Other components

- **User**

## Connections

- User → Health form: enters details (evidence: `README.md`)
- Health form → Flask routes: submits form (evidence: `README.md`)
- Flask routes → Health form: renders page (evidence: `back.py`)
- Flask routes → Plan builder: calls builder (evidence: `back.py`)
- Plan builder → OpenAI API: requests plan (evidence: `back.py`)
- Flask routes → Plan page: renders plan (evidence: `back.py`)
- User → Plan page: views plan (evidence: `README.md`)
- Flask routes → Saved plan: saves plan (evidence: `README.md`)
