# jgoodloe/ocsp-monitor architecture

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

- Interactive diagram: https://gitdiagram.com/jgoodloe/ocsp-monitor
- Repository: https://github.com/jgoodloe/ocsp-monitor

## Overview

OCSP Monitor is a single-process Flask application for configuring certificate responders, running scheduled or on-demand OCSP checks, and viewing current status and history. Its main workflow is operator configuration through the web UI/API, scheduled or manual verification, persistence of results and status changes in SQLite, and optional Uptime Kuma notification. The sampled source is a partial excerpt of one large application module; finer internal call relationships and several documented features are therefore represented at the subsystem level, with README evidence where appropriate.

Main entry points: [`app/app.py`](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py) (Flask app and API), [`app/templates/index.html`](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/templates/index.html) (Web UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Operator interface"]
  node_webui["Web UI<br/>[index.html]"]
  node_flask["Flask app and API<br/>[app.py]"]
end

subgraph group_monitoring["Checks and scheduling"]
  node_scheduler["Due-check scheduler<br/>[app.py]"]
  node_ocsp_check["OCSP verification<br/>[app.py]"]
  node_test_groups["Verification tests<br/>[app.py]"]
  node_status["Result and timing<br/>[app.py]"]
  node_kuma["Uptime Kuma push<br/>[app.py]"]
end

subgraph group_state["Configuration and records"]
  node_responder_mgmt["Responder management<br/>[app.py]"]
  node_settings["Test settings<br/>[app.py]"]
  node_sqlite[("SQLite state<br/>[app.py]")]
  node_history[("Status history<br/>[app.py]")]
end

subgraph group_security["Request safeguards"]
  node_request_guard["CSRF and rate limits<br/>[app.py]"]
end

node_operator(("Operator"))
node_ocsp_service{{"OCSP responder"}}
node_uptime_kuma{{"Uptime Kuma"}}

node_operator -->|"uses"| node_webui
node_webui -->|"requests API"| node_flask
node_flask -->|"routes requests"| node_responder_mgmt
node_flask -->|"routes settings"| node_settings
node_responder_mgmt -->|"stores configuration"| node_sqlite
node_settings -.->|"stores defaults"| node_sqlite
node_scheduler -->|"runs due checks"| node_ocsp_check
node_flask -->|"runs on-demand checks"| node_ocsp_check
node_ocsp_check -->|"evaluates tests"| node_test_groups
node_ocsp_check -->|"sends OCSP request"| node_ocsp_service
node_ocsp_check -->|"produces result"| node_status
node_status -->|"updates responder"| node_sqlite
node_status -->|"records status changes"| node_history
node_ocsp_check -.->|"pushes results"| node_kuma
node_kuma -.->|"sends status"| node_uptime_kuma
node_flask -->|"guards mutations"| node_request_guard
node_webui -.->|"requests history"| node_flask

click node_webui "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/templates/index.html"
click node_flask "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_responder_mgmt "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_settings "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_scheduler "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_ocsp_check "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_test_groups "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_status "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_sqlite "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_history "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_kuma "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py"
click node_request_guard "https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.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_webui,node_flask toneBlue
class node_scheduler,node_ocsp_check,node_test_groups,node_status,node_kuma toneAmber
class node_responder_mgmt,node_settings,node_sqlite,node_history toneMint
class node_request_guard toneRose
class node_operator,node_ocsp_service,node_uptime_kuma toneIndigo
```

## Components

### Operator interface

- [Web UI](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/templates/index.html): `app/templates/index.html`
- [Flask app and API](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`

### Checks and scheduling

- [Due-check scheduler](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`
- [OCSP verification](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`
- [Verification tests](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`
- [Result and timing](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`
- [Uptime Kuma push](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`

### Configuration and records

- [Responder management](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`
- [Test settings](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`
- [SQLite state](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`
- [Status history](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`

### Request safeguards

- [CSRF and rate limits](https://github.com/jgoodloe/ocsp-monitor/blob/main/app/app.py): `app/app.py`

### Other components

- **Operator**
- **OCSP responder**
- **Uptime Kuma**

## Connections

- Operator → Web UI: uses (evidence: `README.md`)
- Web UI → Flask app and API: requests API (evidence: `README.md`)
- Flask app and API → Responder management: routes requests (evidence: `app/app.py`)
- Flask app and API → Test settings: routes settings (evidence: `README.md`)
- Responder management → SQLite state: stores configuration (evidence: `app/app.py`)
- Test settings → SQLite state: stores defaults (evidence: `README.md`)
- Due-check scheduler → OCSP verification: runs due checks (evidence: `README.md`)
- Flask app and API → OCSP verification: runs on-demand checks (evidence: `README.md`)
- OCSP verification → Verification tests: evaluates tests (evidence: `README.md`)
- OCSP verification → OCSP responder: sends OCSP request (evidence: `README.md`)
- OCSP verification → Result and timing: produces result (evidence: `app/app.py`)
- Result and timing → SQLite state: updates responder (evidence: `app/app.py`)
- Result and timing → Status history: records status changes (evidence: `app/app.py`)
- OCSP verification → Uptime Kuma push: pushes results (evidence: `README.md`)
- Uptime Kuma push → Uptime Kuma: sends status (evidence: `README.md`)
- Flask app and API → CSRF and rate limits: guards mutations (evidence: `app/app.py`)
- Web UI → Flask app and API: requests history (evidence: `README.md`)
