# roodmann/python-project-83 architecture

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

- Interactive diagram: https://gitdiagram.com/roodmann/python-project-83
- Repository: https://github.com/roodmann/python-project-83

## Overview

Page Analyzer is a Flask web application for registering URLs and inspecting their pages. The main workflow validates and normalizes a submitted URL, stores it, fetches it on request, parses its HTML metadata, and persists the check for later display. Listing and detail views read stored URL/check data. The README also describes HTML structure, metadata, and time-limited loading analysis; the shown parser extracts only H1, title, and description, so broader documented analysis is not represented as implemented. Relationships follow the sampled app and database code.

Main entry points: [`page_analyzer/app.py`](https://github.com/roodmann/python-project-83/blob/main/page_analyzer/app.py) (Flask routes), [`page_analyzer/database.py`](https://github.com/roodmann/python-project-83/blob/main/page_analyzer/database.py) (Database access), [`page_analyzer/templates`](https://github.com/roodmann/python-project-83/tree/main/page_analyzer/templates) (HTML views), [`page_analyzer/url_validator.py`](https://github.com/roodmann/python-project-83/blob/main/page_analyzer/url_validator.py) (URL validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_app["Flask routes<br/>[app.py]"]
  node_templates["HTML views"]
end

subgraph group_analysis["URL analysis"]
  node_validator["URL validation<br/>[url_validator.py]"]
  node_fetch["Page fetch<br/>[app.py]"]
  node_parser["Metadata parser<br/>[parser.py]"]
end

subgraph group_persistence["Persistence"]
  node_database_api["Database access<br/>[database.py]"]
  node_postgres[("PostgreSQL<br/>[database.sql]")]
end

node_visitor(("User"))
node_target(("Target website"))

node_visitor -->|"submits requests"| node_app
node_app -->|"renders views"| node_templates
node_app -->|"validates URLs"| node_validator
node_app -->|"reads and writes"| node_database_api
node_app -->|"fetches page"| node_target
node_app -->|"parses response"| node_parser
node_database_api -->|"queries"| node_postgres

click node_app "https://github.com/roodmann/python-project-83/blob/main/page_analyzer/app.py"
click node_templates "https://github.com/roodmann/python-project-83/tree/main/page_analyzer/templates"
click node_validator "https://github.com/roodmann/python-project-83/blob/main/page_analyzer/url_validator.py"
click node_fetch "https://github.com/roodmann/python-project-83/blob/main/page_analyzer/app.py"
click node_parser "https://github.com/roodmann/python-project-83/blob/main/page_analyzer/parser.py"
click node_database_api "https://github.com/roodmann/python-project-83/blob/main/page_analyzer/database.py"
click node_postgres "https://github.com/roodmann/python-project-83/blob/main/database.sql"

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_app,node_templates,node_visitor toneBlue
class node_validator,node_fetch,node_parser toneAmber
class node_database_api,node_postgres toneMint
class node_target toneIndigo
```

## Components

### Web interface

- [Flask routes](https://github.com/roodmann/python-project-83/blob/main/page_analyzer/app.py): `page_analyzer/app.py`
- [HTML views](https://github.com/roodmann/python-project-83/tree/main/page_analyzer/templates): `page_analyzer/templates`

### URL analysis

- [URL validation](https://github.com/roodmann/python-project-83/blob/main/page_analyzer/url_validator.py): `page_analyzer/url_validator.py`
- [Page fetch](https://github.com/roodmann/python-project-83/blob/main/page_analyzer/app.py): `page_analyzer/app.py`
- [Metadata parser](https://github.com/roodmann/python-project-83/blob/main/page_analyzer/parser.py): `page_analyzer/parser.py`

### Persistence

- [Database access](https://github.com/roodmann/python-project-83/blob/main/page_analyzer/database.py): `page_analyzer/database.py`
- [PostgreSQL](https://github.com/roodmann/python-project-83/blob/main/database.sql): `database.sql`

### Other components

- **User**
- **Target website**

## Connections

- User → Flask routes: submits requests (evidence: `page_analyzer/app.py`)
- Flask routes → HTML views: renders views (evidence: `page_analyzer/app.py`)
- Flask routes → URL validation: validates URLs (evidence: `page_analyzer/app.py`)
- Flask routes → Database access: reads and writes (evidence: `page_analyzer/app.py`)
- Flask routes → Target website: fetches page (evidence: `page_analyzer/app.py`)
- Flask routes → Metadata parser: parses response (evidence: `page_analyzer/app.py`)
- Database access → PostgreSQL: queries (evidence: `page_analyzer/database.py`)
