# pso25/softwaredelivery_bp_ca1 architecture

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

- Interactive diagram: https://gitdiagram.com/pso25/softwaredelivery_bp_ca1
- Repository: https://github.com/pso25/softwaredelivery_bp_ca1

## Overview

This repository contains a blood-pressure calculator in ASP.NET Core and a Python/Flask port. In each, a browser submits readings to the page handler, which validates input and presents a result; the Python implementation explicitly calculates a category and provides advice, while the sampled .NET domain model leaves category calculation unimplemented. The graph includes both runtime paths and Python’s optional Application Insights telemetry. Source excerpts show wiring for the Python app and .NET startup, but not the page templates or the full .NET result-rendering path.

Main entry points: [`BPCalculator_Python/app.py`](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/app.py) (Flask App), [`BPCalculator_Python/pages.py`](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/pages.py) (Page Routes), [`BPCalculator/Program.cs`](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/Program.cs) (Web Host), [`BPCalculator/Startup.cs`](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/Startup.cs) (Razor Pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dotnet["ASP.NET Core"]
  node_dotnet_host["Web Host<br/>[Program.cs]"]
  node_dotnet_pipeline["Razor Pipeline<br/>[Startup.cs]"]
  node_dotnet_page["Calculator Page Handler<br/>[Index.cshtml.cs]"]
end

subgraph group_python["Flask Port"]
  node_python_app["Flask App<br/>[app.py]"]
  node_python_pages["Page Routes<br/>[pages.py]"]
  node_python_form["Input Form<br/>[forms.py]"]
  node_python_template["Calculator View<br/>[index.html]"]
end

subgraph group_domain["Blood Pressure Domain"]
  node_dotnet_model["Blood Pressure Model<br/>[BloodPressure.cs]"]
  node_python_model["Category and Advice<br/>[bloodpressure.py]"]
end

subgraph group_platform["Runtime Services"]
  node_python_config["App Configuration<br/>[config.py]"]
  node_telemetry(("Azure Application Insights"))
end

node_browser(("Browser User"))

node_browser -->|"requests"| node_dotnet_host
node_dotnet_host -->|"uses startup"| node_dotnet_pipeline
node_dotnet_pipeline -->|"maps Razor pages"| node_dotnet_page
node_browser -->|"HTTP requests"| node_python_app
node_python_app -->|"loads configuration"| node_python_config
node_python_app -->|"registers routes"| node_python_pages
node_python_app -.->|"configures optionally"| node_telemetry
node_python_pages -->|"validates submissions"| node_python_form
node_python_form -->|"builds model"| node_python_model
node_python_pages -->|"reads category"| node_python_model
node_python_pages -->|"renders view"| node_python_template
node_dotnet_page -->|"binds readings"| node_dotnet_model

click node_dotnet_host "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/Program.cs"
click node_dotnet_pipeline "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/Startup.cs"
click node_dotnet_page "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/Pages/Index.cshtml.cs"
click node_dotnet_model "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/BloodPressure.cs"
click node_python_app "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/app.py"
click node_python_config "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/config.py"
click node_python_pages "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/pages.py"
click node_python_form "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/forms.py"
click node_python_model "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/bloodpressure.py"
click node_python_template "https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/templates/index.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_dotnet_host,node_dotnet_pipeline,node_dotnet_page,node_browser toneBlue
class node_python_app,node_python_pages,node_python_form,node_python_template toneAmber
class node_dotnet_model,node_python_model toneMint
class node_python_config,node_telemetry toneRose
```

## Components

### ASP.NET Core

- [Web Host](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/Program.cs): `BPCalculator/Program.cs`
- [Razor Pipeline](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/Startup.cs): `BPCalculator/Startup.cs`
- [Calculator Page Handler](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/Pages/Index.cshtml.cs): `BPCalculator/Pages/Index.cshtml.cs`

### Flask Port

- [Flask App](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/app.py): `BPCalculator_Python/app.py`
- [Page Routes](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/pages.py): `BPCalculator_Python/pages.py`
- [Input Form](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/forms.py): `BPCalculator_Python/forms.py`
- [Calculator View](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/templates/index.html): `BPCalculator_Python/templates/index.html`

### Blood Pressure Domain

- [Blood Pressure Model](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator/BloodPressure.cs): `BPCalculator/BloodPressure.cs`
- [Category and Advice](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/bloodpressure.py): `BPCalculator_Python/bloodpressure.py`

### Runtime Services

- [App Configuration](https://github.com/pso25/softwaredelivery_bp_ca1/blob/master/BPCalculator_Python/config.py): `BPCalculator_Python/config.py`
- **Azure Application Insights**

### Other components

- **Browser User**

## Connections

- Browser User → Web Host: requests
- Web Host → Razor Pipeline: uses startup (evidence: `BPCalculator/Program.cs`)
- Razor Pipeline → Calculator Page Handler: maps Razor pages (evidence: `BPCalculator/Startup.cs`)
- Browser User → Flask App: HTTP requests
- Flask App → App Configuration: loads configuration (evidence: `BPCalculator_Python/app.py`)
- Flask App → Page Routes: registers routes (evidence: `BPCalculator_Python/app.py`)
- Flask App → Azure Application Insights: configures optionally (evidence: `BPCalculator_Python/app.py`)
- Page Routes → Input Form: validates submissions (evidence: `BPCalculator_Python/pages.py`)
- Input Form → Category and Advice: builds model (evidence: `BPCalculator_Python/forms.py`)
- Page Routes → Category and Advice: reads category (evidence: `BPCalculator_Python/pages.py`)
- Page Routes → Calculator View: renders view (evidence: `BPCalculator_Python/pages.py`)
- Calculator Page Handler → Blood Pressure Model: binds readings (evidence: `BPCalculator/Pages/Index.cshtml.cs`)
