# londheshubham153/pulsecheck architecture

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

- Interactive diagram: https://gitdiagram.com/londheshubham153/pulsecheck
- Repository: https://github.com/londheshubham153/pulsecheck

## Overview

PulseCheck is a FastAPI uptime monitor with a browser dashboard and an optional Kubernetes operations view. Users browse and periodically refresh service checks, or submit a URL for a one-off check; they can inspect latency, TLS and official status details. In Kubernetes, the dashboard shows pods and events and can request pod deletion or a crash. The graph preserves documented health and Prometheus capabilities. Several backend routes and frontend modules are unsampled, so their internal call links are omitted or marked unverified.

Main entry points: [`app/static/js/app.js`](https://github.com/londheshubham153/pulsecheck/blob/main/app/static/js/app.js) (Dashboard app), [`app/routes/api.py`](https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/api.py) (API routes), [`app/services/checks/probe.py`](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/probe.py) (URL probe), [`app/routes/pods.py`](https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/pods.py) (Pods API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_dashboard_app["Dashboard app<br/>[app.js]"]
  node_service_detail["Service details<br/>[drawer.js]"]
  node_pods_panel["Pods and events panel<br/>[panel.js]"]
  node_serving_status["Serving pod status<br/>[serving.js]"]
end

subgraph group_service_api["Service API"]
  node_api_routes["API routes<br/>[api.py]"]
  node_catalog["Service catalog<br/>[catalog.py]"]
  node_cache["Check cache<br/>[cache.py]"]
end

subgraph group_checking["Uptime checks"]
  node_probe["URL probe<br/>[probe.py]"]
  node_ssrf_guard["SSRF guard<br/>[guard.py]"]
  node_http_client["HTTP client<br/>[client.py]"]
  node_check_state["Check state<br/>[state.py]"]
  node_status_feed["Official status feeds<br/>[statuspage.py]"]
end

subgraph group_kubernetes["Kubernetes view"]
  node_pods_route["Pods API<br/>[pods.py]"]
  node_pod_service["Pod snapshot and deletion<br/>[pods.py]"]
  node_kube_client["Kubernetes client<br/>[kube.py]"]
end

subgraph group_operations["Operations"]
  node_chaos_route["Chaos endpoint<br/>[chaos.py]"]
  node_identity["Pod identity<br/>[identity.py]"]
  node_rate_limit["Deletion rate limit<br/>[ratelimit.py]"]
  node_health_route["Health endpoint<br/>[health.py]"]
  node_metrics_route["Metrics endpoint<br/>[metrics.py]"]
  node_telemetry["Prometheus telemetry<br/>[telemetry.py]"]
end

node_browser(("Browser user"))
node_kubernetes_api{{"Kubernetes API"}}
node_deployment{{"Kubernetes Deployment"}}
node_websites{{"Checked websites"}}

node_browser -->|"uses"| node_dashboard_app
node_dashboard_app -->|"opens details"| node_service_detail
node_dashboard_app -->|"requests checks"| node_api_routes
node_dashboard_app -->|"opens and polls"| node_pods_panel
node_dashboard_app -->|"polls status"| node_serving_status
node_api_routes -.->|"lists services"| node_catalog
node_api_routes -.->|"requests probes"| node_probe
node_probe -->|"validates URLs"| node_ssrf_guard
node_probe -->|"sends requests"| node_http_client
node_api_routes -.->|"uses cache"| node_cache
node_api_routes -.->|"returns official status"| node_status_feed
node_probe -->|"checks availability"| node_websites
node_pods_panel -->|"polls and deletes"| node_pods_route
node_serving_status -->|"requests pod status"| node_pods_route
node_pods_route -->|"lists or deletes"| node_pod_service
node_pods_route -->|"limits deletions"| node_rate_limit
node_pod_service -->|"calls Kubernetes"| node_kube_client
node_kube_client -->|"sends API requests"| node_kubernetes_api
node_deployment -->|"maintains pods"| node_kubernetes_api
node_browser -->|"requests crash"| node_chaos_route
node_chaos_route -.->|"identifies pod"| node_identity
node_browser -.->|"checks health"| node_health_route
node_browser -.->|"scrapes metrics"| node_metrics_route
node_metrics_route -->|"reads metrics"| node_telemetry

click node_dashboard_app "https://github.com/londheshubham153/pulsecheck/blob/main/app/static/js/app.js"
click node_service_detail "https://github.com/londheshubham153/pulsecheck/blob/main/app/static/js/drawer.js"
click node_pods_panel "https://github.com/londheshubham153/pulsecheck/blob/main/app/static/js/pods/panel.js"
click node_serving_status "https://github.com/londheshubham153/pulsecheck/blob/main/app/static/js/pods/serving.js"
click node_api_routes "https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/api.py"
click node_catalog "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/catalog.py"
click node_cache "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/cache.py"
click node_probe "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/probe.py"
click node_ssrf_guard "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/guard.py"
click node_http_client "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/client.py"
click node_check_state "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/state.py"
click node_status_feed "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/statuspage.py"
click node_pods_route "https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/pods.py"
click node_pod_service "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/cluster/pods.py"
click node_kube_client "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/cluster/kube.py"
click node_chaos_route "https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/chaos.py"
click node_identity "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/identity.py"
click node_rate_limit "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/ratelimit.py"
click node_health_route "https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/health.py"
click node_metrics_route "https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/metrics.py"
click node_telemetry "https://github.com/londheshubham153/pulsecheck/blob/main/app/services/telemetry.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_dashboard_app,node_service_detail,node_pods_panel,node_serving_status,node_browser toneBlue
class node_api_routes,node_catalog,node_cache toneAmber
class node_probe,node_ssrf_guard,node_http_client,node_check_state,node_status_feed,node_kubernetes_api toneMint
class node_pods_route,node_pod_service,node_kube_client toneRose
class node_chaos_route,node_identity,node_rate_limit,node_health_route,node_metrics_route,node_telemetry,node_deployment,node_websites toneIndigo
```

## Components

### Dashboard

- [Dashboard app](https://github.com/londheshubham153/pulsecheck/blob/main/app/static/js/app.js): `app/static/js/app.js`
- [Service details](https://github.com/londheshubham153/pulsecheck/blob/main/app/static/js/drawer.js): `app/static/js/drawer.js`
- [Pods and events panel](https://github.com/londheshubham153/pulsecheck/blob/main/app/static/js/pods/panel.js): `app/static/js/pods/panel.js`
- [Serving pod status](https://github.com/londheshubham153/pulsecheck/blob/main/app/static/js/pods/serving.js): `app/static/js/pods/serving.js`

### Service API

- [API routes](https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/api.py): `app/routes/api.py`
- [Service catalog](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/catalog.py): `app/services/catalog.py`
- [Check cache](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/cache.py): `app/services/cache.py`

### Uptime checks

- [URL probe](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/probe.py): `app/services/checks/probe.py`
- [SSRF guard](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/guard.py): `app/services/checks/guard.py`
- [HTTP client](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/client.py): `app/services/checks/client.py`
- [Check state](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/state.py): `app/services/checks/state.py`
- [Official status feeds](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/checks/statuspage.py): `app/services/checks/statuspage.py`

### Kubernetes view

- [Pods API](https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/pods.py): `app/routes/pods.py`
- [Pod snapshot and deletion](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/cluster/pods.py): `app/services/cluster/pods.py`
- [Kubernetes client](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/cluster/kube.py): `app/services/cluster/kube.py`

### Operations

- [Chaos endpoint](https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/chaos.py): `app/routes/chaos.py`
- [Pod identity](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/identity.py): `app/services/identity.py`
- [Deletion rate limit](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/ratelimit.py): `app/services/ratelimit.py`
- [Health endpoint](https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/health.py): `app/routes/health.py`
- [Metrics endpoint](https://github.com/londheshubham153/pulsecheck/blob/main/app/routes/metrics.py): `app/routes/metrics.py`
- [Prometheus telemetry](https://github.com/londheshubham153/pulsecheck/blob/main/app/services/telemetry.py): `app/services/telemetry.py`

### Other components

- **Browser user**
- **Kubernetes API**
- **Kubernetes Deployment**
- **Checked websites**

## Connections

- Browser user → Dashboard app: uses (evidence: `README.md`)
- Dashboard app → Service details: opens details (evidence: `app/static/js/app.js`)
- Dashboard app → API routes: requests checks (evidence: `app/static/js/app.js`)
- Dashboard app → Pods and events panel: opens and polls (evidence: `app/static/js/app.js`)
- Dashboard app → Serving pod status: polls status (evidence: `app/static/js/app.js`)
- API routes → Service catalog: lists services
- API routes → URL probe: requests probes
- URL probe → SSRF guard: validates URLs (evidence: `app/services/checks/probe.py`)
- URL probe → HTTP client: sends requests (evidence: `app/services/checks/probe.py`)
- API routes → Check cache: uses cache
- API routes → Official status feeds: returns official status
- URL probe → Checked websites: checks availability (evidence: `README.md`)
- Pods and events panel → Pods API: polls and deletes (evidence: `app/static/js/pods/panel.js`)
- Serving pod status → Pods API: requests pod status (evidence: `app/static/js/pods/serving.js`)
- Pods API → Pod snapshot and deletion: lists or deletes (evidence: `app/routes/pods.py`)
- Pods API → Deletion rate limit: limits deletions (evidence: `app/routes/pods.py`)
- Pod snapshot and deletion → Kubernetes client: calls Kubernetes (evidence: `app/services/cluster/pods.py`)
- Kubernetes client → Kubernetes API: sends API requests (evidence: `README.md`)
- Kubernetes Deployment → Kubernetes API: maintains pods (evidence: `README.md`)
- Browser user → Chaos endpoint: requests crash (evidence: `README.md`)
- Chaos endpoint → Pod identity: identifies pod (evidence: `app/routes/chaos.py`)
- Browser user → Health endpoint: checks health
- Browser user → Metrics endpoint: scrapes metrics
- Metrics endpoint → Prometheus telemetry: reads metrics (evidence: `app/routes/metrics.py`)
