# flower2ree/health_diet architecture

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

- Interactive diagram: https://gitdiagram.com/flower2ree/health_diet
- Repository: https://github.com/flower2ree/health_diet

## Overview

This Django application serves a small health-and-diet website. A visitor requests one of four pages; URL patterns dispatch to views, which render the corresponding login, main, health, or diet template. The client-side scripts implement calendar-based meal planning and calorie/BMI calculations. Their template wiring is not shown in the sampled files, so that relationship is omitted; no application data-storage behavior is established by the sampled models.

Main entry points: [`Health_Diet/Health/views.py`](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/Health/views.py) (Page views), [`Health_Diet/Health_Diet/urls.py`](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/Health_Diet/urls.py) (URL routes), [`Health_Diet/templates/Health/login.html`](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/login.html) (Login page), [`Health_Diet/templates/Health/Main.html`](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/Main.html) (Main page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web pages"]
  node_routes["URL routes<br/>[urls.py]"]
  node_views["Page views<br/>[views.py]"]
  node_login["Login page<br/>[login.html]"]
  node_main["Main page<br/>[Main.html]"]
  node_health["Health page<br/>[Health.html]"]
  node_diet["Diet page<br/>[diet.html]"]
end

subgraph group_tools["Health and diet tools"]
  node_calendar["Calendar planner<br/>[cal.js]"]
  node_dietcalc["Diet calculations<br/>[diet.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_routes
node_routes -->|"dispatches pages"| node_views
node_views -->|"renders login"| node_login
node_views -->|"renders main"| node_main
node_views -->|"renders health"| node_health
node_views -->|"renders diet"| node_diet

click node_routes "https://github.com/flower2ree/health_diet/blob/main/Health_Diet/Health_Diet/urls.py"
click node_views "https://github.com/flower2ree/health_diet/blob/main/Health_Diet/Health/views.py"
click node_login "https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/login.html"
click node_main "https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/Main.html"
click node_health "https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/Health.html"
click node_diet "https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/diet.html"
click node_calendar "https://github.com/flower2ree/health_diet/blob/main/Health_Diet/static/js/cal.js"
click node_dietcalc "https://github.com/flower2ree/health_diet/blob/main/Health_Diet/static/js/diet.js"

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_routes,node_views,node_login,node_main,node_health,node_diet toneBlue
class node_calendar,node_dietcalc toneAmber
class node_visitor toneIndigo
```

## Components

### Web pages

- [URL routes](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/Health_Diet/urls.py): `Health_Diet/Health_Diet/urls.py`
- [Page views](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/Health/views.py): `Health_Diet/Health/views.py`
- [Login page](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/login.html): `Health_Diet/templates/Health/login.html`
- [Main page](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/Main.html): `Health_Diet/templates/Health/Main.html`
- [Health page](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/Health.html): `Health_Diet/templates/Health/Health.html`
- [Diet page](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/templates/Health/diet.html): `Health_Diet/templates/Health/diet.html`

### Health and diet tools

- [Calendar planner](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/static/js/cal.js): `Health_Diet/static/js/cal.js`
- [Diet calculations](https://github.com/flower2ree/health_diet/blob/main/Health_Diet/static/js/diet.js): `Health_Diet/static/js/diet.js`

### Other components

- **Visitor**

## Connections

- Visitor → URL routes: requests pages (evidence: `Health_Diet/Health_Diet/urls.py`)
- URL routes → Page views: dispatches pages (evidence: `Health_Diet/Health_Diet/urls.py`)
- Page views → Login page: renders login (evidence: `Health_Diet/Health/views.py`)
- Page views → Main page: renders main (evidence: `Health_Diet/Health/views.py`)
- Page views → Health page: renders health (evidence: `Health_Diet/Health/views.py`)
- Page views → Diet page: renders diet (evidence: `Health_Diet/Health/views.py`)
