# boyedandtoyed/bmi_calculator architecture

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

- Interactive diagram: https://gitdiagram.com/boyedandtoyed/bmi_calculator
- Repository: https://github.com/boyedandtoyed/bmi_calculator

## Overview

BMI_calculator is a Django web app for entering weight and height, calculating BMI, assigning a configurable BMI range, displaying suggestions, and saving the result to a user profile. Its surrounding workflow includes registration with email verification, login, profile updates, and dashboard access. The graph follows the sampled URL and view code; email verification and suggestion-email sending are documented or referenced, but their implementation details and database configuration were not sampled.

Main entry points: [`useraccount/views.py`](https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/views.py) (Account Views), [`BMIcalcapp/views.py`](https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/views.py) (BMI Views), [`BMIcalculator/urls.py`](https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalculator/urls.py) (Project Routes), [`useraccount/models.py`](https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/models.py) (User Profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Routing"]
  node_root_routes["Project Routes<br/>[urls.py]"]
  node_bmi_routes["BMI Routes<br/>[urls.py]"]
  node_account_routes["Account Routes<br/>[urls.py]"]
end

subgraph group_bmi["BMI Calculation"]
  node_bmi_views["BMI Views<br/>[views.py]"]
  node_suggestion_templates["Suggestion Pages"]
  node_dashboard_template["Dashboard Page<br/>[dashboard.html]"]
end

subgraph group_account["Accounts"]
  node_account_views["Account Views<br/>[views.py]"]
  node_account_forms["Account Forms<br/>[forms.py]"]
  node_verification["Email Verification"]
end

subgraph group_data["Models and Administration"]
  node_state_model["BMI Ranges<br/>[models.py]"]
  node_profile_model["User Profile<br/>[models.py]"]
  node_database[("Application Database")]
  node_admin["BMI Range Admin<br/>[admin.py]"]
end

node_visitor(("Visitor"))
node_mail_service["Email Service"]
node_django_auth["Django Authentication"]

node_visitor -->|"requests pages"| node_root_routes
node_root_routes -->|"routes BMI"| node_bmi_routes
node_root_routes -->|"routes accounts"| node_account_routes
node_root_routes -->|"routes home"| node_account_views
node_bmi_routes -->|"dispatches requests"| node_bmi_views
node_account_routes -->|"dispatches requests"| node_account_views
node_bmi_views -->|"reads ranges"| node_state_model
node_bmi_views -->|"reads and saves"| node_profile_model
node_bmi_views -->|"renders result"| node_suggestion_templates
node_bmi_views -->|"renders dashboard"| node_dashboard_template
node_account_views -->|"uses forms"| node_account_forms
node_account_views -->|"reads and updates"| node_profile_model
node_account_views -->|"calls save and status"| node_bmi_views
node_account_views -->|"requests verification"| node_verification
node_account_views -->|"sends suggestions"| node_mail_service
node_account_views -->|"authenticates user"| node_django_auth
node_profile_model -->|"references range"| node_state_model
node_state_model -->|"persists ranges"| node_database
node_profile_model -->|"persists profiles"| node_database
node_admin -->|"registers ranges"| node_state_model
node_verification -.->|"sends confirmation"| node_mail_service

click node_root_routes "https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalculator/urls.py"
click node_bmi_routes "https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/urls.py"
click node_account_routes "https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/urls.py"
click node_bmi_views "https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/views.py"
click node_suggestion_templates "https://github.com/boyedandtoyed/bmi_calculator/tree/main/BMIcalcapp/templates/suggestions"
click node_dashboard_template "https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/templates/dashboard.html"
click node_account_views "https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/views.py"
click node_account_forms "https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/forms.py"
click node_state_model "https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/models.py"
click node_profile_model "https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/models.py"
click node_admin "https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/admin.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_root_routes,node_bmi_routes,node_account_routes toneBlue
class node_bmi_views,node_suggestion_templates,node_dashboard_template toneAmber
class node_account_views,node_account_forms,node_verification toneMint
class node_state_model,node_profile_model,node_database,node_admin toneRose
class node_visitor,node_mail_service,node_django_auth toneIndigo
```

## Components

### Web Routing

- [Project Routes](https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalculator/urls.py): `BMIcalculator/urls.py`
- [BMI Routes](https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/urls.py): `BMIcalcapp/urls.py`
- [Account Routes](https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/urls.py): `useraccount/urls.py`

### BMI Calculation

- [BMI Views](https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/views.py): `BMIcalcapp/views.py`
- [Suggestion Pages](https://github.com/boyedandtoyed/bmi_calculator/tree/main/BMIcalcapp/templates/suggestions): `BMIcalcapp/templates/suggestions`
- [Dashboard Page](https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/templates/dashboard.html): `BMIcalcapp/templates/dashboard.html`

### Accounts

- [Account Views](https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/views.py): `useraccount/views.py`
- [Account Forms](https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/forms.py): `useraccount/forms.py`
- **Email Verification**

### Models and Administration

- [BMI Ranges](https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/models.py): `BMIcalcapp/models.py`
- [User Profile](https://github.com/boyedandtoyed/bmi_calculator/blob/main/useraccount/models.py): `useraccount/models.py`
- **Application Database**
- [BMI Range Admin](https://github.com/boyedandtoyed/bmi_calculator/blob/main/BMIcalcapp/admin.py): `BMIcalcapp/admin.py`

### Other components

- **Visitor**
- **Email Service**
- **Django Authentication**

## Connections

- Visitor → Project Routes: requests pages (evidence: `BMIcalculator/urls.py`)
- Project Routes → BMI Routes: routes BMI (evidence: `BMIcalculator/urls.py`)
- Project Routes → Account Routes: routes accounts (evidence: `BMIcalculator/urls.py`)
- Project Routes → Account Views: routes home (evidence: `BMIcalculator/urls.py`)
- BMI Routes → BMI Views: dispatches requests (evidence: `BMIcalcapp/urls.py`)
- Account Routes → Account Views: dispatches requests (evidence: `useraccount/urls.py`)
- BMI Views → BMI Ranges: reads ranges (evidence: `BMIcalcapp/views.py`)
- BMI Views → User Profile: reads and saves (evidence: `BMIcalcapp/views.py`)
- BMI Views → Suggestion Pages: renders result (evidence: `BMIcalcapp/views.py`)
- BMI Views → Dashboard Page: renders dashboard (evidence: `BMIcalcapp/views.py`)
- Account Views → Account Forms: uses forms (evidence: `useraccount/views.py`)
- Account Views → User Profile: reads and updates (evidence: `useraccount/views.py`)
- Account Views → BMI Views: calls save and status (evidence: `useraccount/views.py`)
- Account Views → Email Verification: requests verification (evidence: `useraccount/views.py`)
- Account Views → Email Service: sends suggestions (evidence: `useraccount/views.py`)
- Account Views → Django Authentication: authenticates user (evidence: `useraccount/views.py`)
- User Profile → BMI Ranges: references range (evidence: `useraccount/models.py`)
- BMI Ranges → Application Database: persists ranges (evidence: `BMIcalcapp/models.py`)
- User Profile → Application Database: persists profiles (evidence: `useraccount/models.py`)
- BMI Range Admin → BMI Ranges: registers ranges (evidence: `BMIcalcapp/admin.py`)
- Email Verification → Email Service: sends confirmation (evidence: `README.md`)
