# ravindulakmina/linux-monitor-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/ravindulakmina/linux-monitor-dashboard
- Repository: https://github.com/ravindulakmina/linux-monitor-dashboard

## Overview

Linux Monitor Dashboard serves system statistics from a Flask API and presents them in a browser dashboard. The browser fetches `/api/stats`, renders host and OS details, and charts CPU, memory, and disk usage. The API gathers these values from Linux and system libraries; temperature is reported when available. The README describes local and remote deployment, but deployment files are excluded from this runtime architecture. Edges are supported by the sampled source and README; no separate polling loop or storage layer is shown.

Main entry points: [`frontend/index.html`](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/index.html) (Dashboard page), [`frontend/script.js`](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/script.js) (Fetch and render), [`backend/app.py`](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/backend/app.py) (System info collector), [`frontend/style.css`](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/style.css) (Dashboard styles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard UI"]
  node_dashboard["Dashboard page<br/>[index.html]"]
  node_dashboard_logic["Fetch and render<br/>[script.js]"]
  node_dashboard_styles["Dashboard styles<br/>[style.css]"]
  node_charts["Charts and info display<br/>[script.js]"]
end

subgraph group_api["Monitoring API"]
  node_stats_api["Stats endpoint<br/>[app.py]"]
end

subgraph group_metrics["System metrics"]
  node_system_info["System info collector<br/>[app.py]"]
end

node_browser_user(("Dashboard user"))
node_linux_system["Linux system"]
node_psutil["psutil metrics"]
node_platform["OS and host info"]
node_chartjs["Chart.js"]

node_browser_user -->|"opens"| node_dashboard
node_dashboard -->|"loads script"| node_dashboard_logic
node_dashboard_logic -->|"fetches stats"| node_stats_api
node_stats_api -->|"calls collector"| node_system_info
node_system_info -->|"reads metrics"| node_psutil
node_system_info -->|"reads host details"| node_platform
node_psutil -.->|"samples resources"| node_linux_system
node_dashboard_logic -->|"renders data"| node_charts
node_charts -->|"creates charts"| node_chartjs
node_dashboard -.->|"uses styles"| node_dashboard_styles

click node_dashboard "https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/index.html"
click node_dashboard_logic "https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/script.js"
click node_dashboard_styles "https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/style.css"
click node_stats_api "https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/backend/app.py"
click node_system_info "https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/backend/app.py"
click node_charts "https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/script.js"

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,node_dashboard_logic,node_dashboard_styles,node_charts,node_browser_user toneBlue
class node_stats_api toneAmber
class node_system_info toneMint
class node_linux_system,node_psutil,node_platform,node_chartjs toneIndigo
```

## Components

### Dashboard UI

- [Dashboard page](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/index.html): `frontend/index.html`
- [Fetch and render](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/script.js): `frontend/script.js`
- [Dashboard styles](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/style.css): `frontend/style.css`
- [Charts and info display](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/frontend/script.js): `frontend/script.js`

### Monitoring API

- [Stats endpoint](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/backend/app.py): `backend/app.py`

### System metrics

- [System info collector](https://github.com/ravindulakmina/linux-monitor-dashboard/blob/main/backend/app.py): `backend/app.py`

### Other components

- **Dashboard user**
- **Linux system**
- **psutil metrics**
- **OS and host info**
- **Chart.js**

## Connections

- Dashboard user → Dashboard page: opens (evidence: `README.md`)
- Dashboard page → Fetch and render: loads script (evidence: `README.md`)
- Fetch and render → Stats endpoint: fetches stats (evidence: `frontend/script.js`)
- Stats endpoint → System info collector: calls collector (evidence: `backend/app.py`)
- System info collector → psutil metrics: reads metrics (evidence: `backend/app.py`)
- System info collector → OS and host info: reads host details (evidence: `backend/app.py`)
- psutil metrics → Linux system: samples resources
- Fetch and render → Charts and info display: renders data (evidence: `frontend/script.js`)
- Charts and info display → Chart.js: creates charts (evidence: `frontend/script.js`)
- Dashboard page → Dashboard styles: uses styles
