# sahana-652/url-monitor architecture

> Architecture diagram of the GitHub repository sahana-652/url-monitor, 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/sahana-652/url-monitor
- Repository: https://github.com/sahana-652/url-monitor

## Overview

URL Monitoring Dashboard lets users register websites and APIs, manage monitoring, and review availability, response-time analytics, history, and alerts. The main runtime path is scheduled checks of active websites, persistence of current status and check history, then down/recovery/SSL email alerts. Web routes provide authentication, website management, dashboard and reports, exports, and administrator statistics. The README also documents the API, charts, filters, and responsive/dark-mode interface. Edges reflect excerpted calls or README capabilities; unsampled route and presentation wiring is omitted.

Main entry points: [`app/__init__.py`](https://github.com/sahana-652/url-monitor/blob/main/app/__init__.py) (Flask application), [`app/routes/websites.py`](https://github.com/sahana-652/url-monitor/blob/main/app/routes/websites.py) (Website management), [`app/scheduler/jobs.py`](https://github.com/sahana-652/url-monitor/blob/main/app/scheduler/jobs.py) (Scheduled jobs), [`app/routes/admin.py`](https://github.com/sahana-652/url-monitor/blob/main/app/routes/admin.py) (Admin overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_factory["Flask application<br/>[__init__.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_forms["Input forms<br/>[forms.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_website_routes["Website management<br/>[websites.py]"]
  node_dashboard["Dashboard routes<br/>[dashboard.py]"]
  node_api["Chart and report API<br/>[api.py]"]
  node_admin["Admin overview<br/>[admin.py]"]
  node_presentation["Templates and assets"]
end

subgraph group_monitor["Monitoring"]
  node_scheduler["Scheduled jobs<br/>[jobs.py]"]
  node_checker["URL and SSL checks<br/>[checker.py]"]
end

subgraph group_data["Domain records"]
  node_website[("Website records<br/>[website.py]")]
  node_user[("User records<br/>[user.py]")]
  node_logs[("Monitoring history<br/>[monitoring_log.py]")]
  node_alerts[("Alert records<br/>[alert.py]")]
end

subgraph group_support["Analytics and delivery"]
  node_helpers["Analytics helpers<br/>[helpers.py]"]
  node_exports["CSV and PDF export<br/>[export.py]"]
  node_email["Alert email<br/>[email.py]"]
end

node_visitor(("User"))
node_targets(("Monitored websites"))
node_mail_service(("Email service"))

node_visitor -->|"uses"| node_factory
node_factory -->|"loads"| node_config
node_factory -->|"registers"| node_auth
node_factory -->|"registers"| node_dashboard
node_factory -->|"registers"| node_website_routes
node_factory -->|"registers"| node_admin
node_factory -->|"registers"| node_api
node_auth -->|"validates with"| node_forms
node_auth -->|"authenticates"| node_user
node_website_routes -->|"validates with"| node_forms
node_website_routes -->|"manages"| node_website
node_website_routes -->|"queries"| node_logs
node_website_routes -->|"exports via"| node_exports
node_dashboard -->|"gets statistics"| node_helpers
node_api -->|"gets report data"| node_helpers
node_admin -->|"counts"| node_user
node_admin -->|"counts"| node_website
node_admin -->|"counts"| node_logs
node_admin -->|"queries"| node_alerts
node_factory -->|"starts"| node_scheduler
node_scheduler -->|"loads and updates"| node_website
node_scheduler -->|"checks URLs"| node_checker
node_scheduler -->|"persists checks"| node_logs
node_scheduler -->|"records alerts"| node_alerts
node_scheduler -->|"sends alerts"| node_email
node_email -.->|"sends email"| node_mail_service
node_targets -.->|"receives checks"| node_checker
node_helpers -->|"queries"| node_website
node_helpers -->|"calculates from"| node_logs
node_visitor -.->|"views"| node_presentation
node_website_routes -.->|"renders"| node_presentation

click node_factory "https://github.com/sahana-652/url-monitor/blob/main/app/__init__.py"
click node_config "https://github.com/sahana-652/url-monitor/blob/main/app/config.py"
click node_forms "https://github.com/sahana-652/url-monitor/blob/main/app/forms.py"
click node_auth "https://github.com/sahana-652/url-monitor/blob/main/app/routes/auth.py"
click node_website_routes "https://github.com/sahana-652/url-monitor/blob/main/app/routes/websites.py"
click node_dashboard "https://github.com/sahana-652/url-monitor/blob/main/app/routes/dashboard.py"
click node_api "https://github.com/sahana-652/url-monitor/blob/main/app/routes/api.py"
click node_admin "https://github.com/sahana-652/url-monitor/blob/main/app/routes/admin.py"
click node_presentation "https://github.com/sahana-652/url-monitor/tree/main/app/templates"
click node_scheduler "https://github.com/sahana-652/url-monitor/blob/main/app/scheduler/jobs.py"
click node_checker "https://github.com/sahana-652/url-monitor/blob/main/app/monitoring/checker.py"
click node_website "https://github.com/sahana-652/url-monitor/blob/main/app/models/website.py"
click node_user "https://github.com/sahana-652/url-monitor/blob/main/app/models/user.py"
click node_logs "https://github.com/sahana-652/url-monitor/blob/main/app/models/monitoring_log.py"
click node_alerts "https://github.com/sahana-652/url-monitor/blob/main/app/models/alert.py"
click node_helpers "https://github.com/sahana-652/url-monitor/blob/main/app/utils/helpers.py"
click node_exports "https://github.com/sahana-652/url-monitor/blob/main/app/utils/export.py"
click node_email "https://github.com/sahana-652/url-monitor/blob/main/app/utils/email.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_factory,node_config,node_forms,node_auth,node_website_routes,node_dashboard,node_api,node_admin,node_presentation,node_visitor toneBlue
class node_scheduler,node_checker toneAmber
class node_website,node_user,node_logs,node_alerts toneMint
class node_helpers,node_exports,node_email toneRose
class node_targets,node_mail_service toneIndigo
```

## Components

### Web experience

- [Flask application](https://github.com/sahana-652/url-monitor/blob/main/app/__init__.py): `app/__init__.py`
- [Configuration](https://github.com/sahana-652/url-monitor/blob/main/app/config.py): `app/config.py`
- [Input forms](https://github.com/sahana-652/url-monitor/blob/main/app/forms.py): `app/forms.py`
- [Authentication](https://github.com/sahana-652/url-monitor/blob/main/app/routes/auth.py): `app/routes/auth.py`
- [Website management](https://github.com/sahana-652/url-monitor/blob/main/app/routes/websites.py): `app/routes/websites.py`
- [Dashboard routes](https://github.com/sahana-652/url-monitor/blob/main/app/routes/dashboard.py): `app/routes/dashboard.py`
- [Chart and report API](https://github.com/sahana-652/url-monitor/blob/main/app/routes/api.py): `app/routes/api.py`
- [Admin overview](https://github.com/sahana-652/url-monitor/blob/main/app/routes/admin.py): `app/routes/admin.py`
- [Templates and assets](https://github.com/sahana-652/url-monitor/tree/main/app/templates): `app/templates`

### Monitoring

- [Scheduled jobs](https://github.com/sahana-652/url-monitor/blob/main/app/scheduler/jobs.py): `app/scheduler/jobs.py`
- [URL and SSL checks](https://github.com/sahana-652/url-monitor/blob/main/app/monitoring/checker.py): `app/monitoring/checker.py`

### Domain records

- [Website records](https://github.com/sahana-652/url-monitor/blob/main/app/models/website.py): `app/models/website.py`
- [User records](https://github.com/sahana-652/url-monitor/blob/main/app/models/user.py): `app/models/user.py`
- [Monitoring history](https://github.com/sahana-652/url-monitor/blob/main/app/models/monitoring_log.py): `app/models/monitoring_log.py`
- [Alert records](https://github.com/sahana-652/url-monitor/blob/main/app/models/alert.py): `app/models/alert.py`

### Analytics and delivery

- [Analytics helpers](https://github.com/sahana-652/url-monitor/blob/main/app/utils/helpers.py): `app/utils/helpers.py`
- [CSV and PDF export](https://github.com/sahana-652/url-monitor/blob/main/app/utils/export.py): `app/utils/export.py`
- [Alert email](https://github.com/sahana-652/url-monitor/blob/main/app/utils/email.py): `app/utils/email.py`

### Other components

- **User**
- **Monitored websites**
- **Email service**

## Connections

- User → Flask application: uses (evidence: `README.md`)
- Flask application → Configuration: loads (evidence: `app/__init__.py`)
- Flask application → Authentication: registers (evidence: `app/__init__.py`)
- Flask application → Dashboard routes: registers (evidence: `app/__init__.py`)
- Flask application → Website management: registers (evidence: `app/__init__.py`)
- Flask application → Admin overview: registers (evidence: `app/__init__.py`)
- Flask application → Chart and report API: registers (evidence: `app/__init__.py`)
- Authentication → Input forms: validates with (evidence: `app/routes/auth.py`)
- Authentication → User records: authenticates (evidence: `app/routes/auth.py`)
- Website management → Input forms: validates with (evidence: `app/routes/websites.py`)
- Website management → Website records: manages (evidence: `app/routes/websites.py`)
- Website management → Monitoring history: queries (evidence: `app/routes/websites.py`)
- Website management → CSV and PDF export: exports via (evidence: `app/routes/websites.py`)
- Dashboard routes → Analytics helpers: gets statistics (evidence: `app/routes/dashboard.py`)
- Chart and report API → Analytics helpers: gets report data (evidence: `app/routes/api.py`)
- Admin overview → User records: counts (evidence: `app/routes/admin.py`)
- Admin overview → Website records: counts (evidence: `app/routes/admin.py`)
- Admin overview → Monitoring history: counts (evidence: `app/routes/admin.py`)
- Admin overview → Alert records: queries (evidence: `app/routes/admin.py`)
- Flask application → Scheduled jobs: starts (evidence: `app/__init__.py`)
- Scheduled jobs → Website records: loads and updates (evidence: `app/scheduler/jobs.py`)
- Scheduled jobs → URL and SSL checks: checks URLs (evidence: `app/scheduler/jobs.py`)
- Scheduled jobs → Monitoring history: persists checks (evidence: `app/scheduler/jobs.py`)
- Scheduled jobs → Alert records: records alerts (evidence: `app/scheduler/jobs.py`)
- Scheduled jobs → Alert email: sends alerts (evidence: `app/scheduler/jobs.py`)
- Alert email → Email service: sends email
- Monitored websites → URL and SSL checks: receives checks
- Analytics helpers → Website records: queries (evidence: `app/utils/helpers.py`)
- Analytics helpers → Monitoring history: calculates from (evidence: `app/utils/helpers.py`)
- User → Templates and assets: views (evidence: `README.md`)
- Website management → Templates and assets: renders
