# aashay404/system-monitor architecture

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

- Interactive diagram: https://gitdiagram.com/aashay404/system-monitor
- Repository: https://github.com/aashay404/system-monitor

## Overview

System Monitor is a live system-monitoring dashboard. Users navigate among overview, process, hardware, and network views; the sampled overview and process pages poll backend endpoints, while the process view can request termination by PID. The backend gathers OS metrics through systeminformation and serves API responses. Hardware and network views are documented capabilities, but their source was not sampled, so their specific API calls are shown as unverified. The tree’s sidebar filename does not match the import path shown in App.jsx.

Main entry points: [`system-monitor/src/App.jsx`](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/App.jsx) (App router), [`system-monitor/src/pages/Processes.jsx`](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Processes.jsx) (Process monitor), [`system-monitor/src/pages/Home.jsx`](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Home.jsx) (System overview), [`system-monitor/src/pages/Hardware.jsx`](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Hardware.jsx) (Hardware view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Dashboard UI"]
  node_app["App router<br/>[App.jsx]"]
  node_sidebar["Navigation sidebar<br/>[Sizebar.jsx]"]
end

subgraph group_monitoring["Monitoring Views"]
  node_overview["System overview<br/>[Home.jsx]"]
  node_processes["Process monitor<br/>[Processes.jsx]"]
  node_hardware["Hardware view<br/>[Hardware.jsx]"]
  node_network["Network view<br/>[Network.jsx]"]
end

subgraph group_backend["Metrics API"]
  node_overview_api["Overview endpoint<br/>[server.js]"]
  node_process_api["Process endpoint<br/>[server.js]"]
  node_hardware_api["Hardware endpoint<br/>[server.js]"]
  node_network_api["Network endpoint<br/>[server.js]"]
  node_kill_api["Process termination<br/>[server.js]"]
end

node_user(("Dashboard user"))
node_sysinfo["systeminformation"]

node_user -->|"opens dashboard"| node_app
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_processes
node_app -->|"routes to"| node_hardware
node_app -->|"routes to"| node_network
node_overview -->|"polls metrics"| node_overview_api
node_processes -->|"polls processes"| node_process_api
node_processes -->|"requests termination"| node_kill_api
node_hardware -.->|"requests details"| node_hardware_api
node_network -.->|"requests traffic"| node_network_api
node_overview_api -->|"reads system metrics"| node_sysinfo
node_process_api -->|"reads process list"| node_sysinfo
node_hardware_api -->|"reads hardware data"| node_sysinfo
node_network_api -->|"reads network stats"| node_sysinfo

click node_app "https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/App.jsx"
click node_sidebar "https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/layout/Sizebar.jsx"
click node_overview "https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Home.jsx"
click node_processes "https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Processes.jsx"
click node_hardware "https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Hardware.jsx"
click node_network "https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Network.jsx"
click node_overview_api "https://github.com/aashay404/system-monitor/blob/main/backend/server.js"
click node_process_api "https://github.com/aashay404/system-monitor/blob/main/backend/server.js"
click node_hardware_api "https://github.com/aashay404/system-monitor/blob/main/backend/server.js"
click node_network_api "https://github.com/aashay404/system-monitor/blob/main/backend/server.js"
click node_kill_api "https://github.com/aashay404/system-monitor/blob/main/backend/server.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_app,node_sidebar,node_user toneBlue
class node_overview,node_processes,node_hardware,node_network toneAmber
class node_overview_api,node_process_api,node_hardware_api,node_network_api,node_kill_api toneMint
class node_sysinfo toneIndigo
```

## Components

### Dashboard UI

- [App router](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/App.jsx): `system-monitor/src/App.jsx`
- [Navigation sidebar](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/layout/Sizebar.jsx): `system-monitor/src/layout/Sizebar.jsx`

### Monitoring Views

- [System overview](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Home.jsx): `system-monitor/src/pages/Home.jsx`
- [Process monitor](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Processes.jsx): `system-monitor/src/pages/Processes.jsx`
- [Hardware view](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Hardware.jsx): `system-monitor/src/pages/Hardware.jsx`
- [Network view](https://github.com/aashay404/system-monitor/blob/main/system-monitor/src/pages/Network.jsx): `system-monitor/src/pages/Network.jsx`

### Metrics API

- [Overview endpoint](https://github.com/aashay404/system-monitor/blob/main/backend/server.js): `backend/server.js`
- [Process endpoint](https://github.com/aashay404/system-monitor/blob/main/backend/server.js): `backend/server.js`
- [Hardware endpoint](https://github.com/aashay404/system-monitor/blob/main/backend/server.js): `backend/server.js`
- [Network endpoint](https://github.com/aashay404/system-monitor/blob/main/backend/server.js): `backend/server.js`
- [Process termination](https://github.com/aashay404/system-monitor/blob/main/backend/server.js): `backend/server.js`

### Other components

- **Dashboard user**
- **systeminformation**

## Connections

- Dashboard user → App router: opens dashboard (evidence: `system-monitor/src/App.jsx`)
- App router → System overview: routes to (evidence: `system-monitor/src/App.jsx`)
- App router → Process monitor: routes to (evidence: `system-monitor/src/App.jsx`)
- App router → Hardware view: routes to (evidence: `system-monitor/src/App.jsx`)
- App router → Network view: routes to (evidence: `system-monitor/src/App.jsx`)
- System overview → Overview endpoint: polls metrics (evidence: `system-monitor/src/pages/Home.jsx`)
- Process monitor → Process endpoint: polls processes (evidence: `system-monitor/src/pages/Processes.jsx`)
- Process monitor → Process termination: requests termination (evidence: `system-monitor/src/pages/Processes.jsx`)
- Hardware view → Hardware endpoint: requests details
- Network view → Network endpoint: requests traffic
- Overview endpoint → systeminformation: reads system metrics (evidence: `backend/server.js`)
- Process endpoint → systeminformation: reads process list (evidence: `backend/server.js`)
- Hardware endpoint → systeminformation: reads hardware data (evidence: `backend/server.js`)
- Network endpoint → systeminformation: reads network stats (evidence: `backend/server.js`)
