# protasiojr/status_pc_v2 architecture

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

- Interactive diagram: https://gitdiagram.com/protasiojr/status_pc_v2
- Repository: https://github.com/protasiojr/status_pc_v2

## Overview

STATUS PC v2 is a local-network computer dashboard. Users register devices, monitor reachability, discover LAN hosts, inspect device inventory, and issue Wake-on-LAN or SSH power commands. The server.js backend owns the API, network operations, SSH integrations, and device persistence; app.js drives the dashboard and its workflows. README capabilities without sampled call sites are included, but their internal wiring is not inferred.

Main entry points: [`app.js`](https://github.com/protasiojr/status_pc_v2/blob/main/app.js) (Dashboard UI), [`server.js`](https://github.com/protasiojr/status_pc_v2/blob/main/server.js) (Device API), [`validation.js`](https://github.com/protasiojr/status_pc_v2/blob/main/validation.js) (Form Validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_dashboard_ui["Dashboard UI<br/>[app.js]"]
  node_validation["Form Validation<br/>[validation.js]"]
end

subgraph group_device_ops["Device Operations"]
  node_device_api["Device API<br/>[server.js]"]
  node_device_store[("Device Storage<br/>[server.js]")]
  node_status_checks["Status Checks<br/>[server.js]"]
  node_config_transfer["Config Import Export<br/>[app.js]"]
end

subgraph group_network["Network Discovery"]
  node_network_map["Network Map<br/>[app.js]"]
  node_subnet_scan["Subnet Scan<br/>[server.js]"]
  node_arp_table["ARP Table<br/>[server.js]"]
  node_wol["Wake-on-LAN<br/>[server.js]"]
end

subgraph group_integrations["Remote Integrations"]
  node_ssh_power["SSH Power Actions<br/>[server.js]"]
  node_ssh_inventory["SSH Inventory<br/>[server.js]"]
  node_intune_inventory["Intune Inventory<br/>[server.js]"]
  node_ssh_credentials["SSH Credentials<br/>[server.js]"]
end

node_operator(("LAN Operator"))
node_lan_devices(("LAN Devices"))
node_microsoft_graph["Microsoft Graph"]

node_operator -->|"uses"| node_dashboard_ui
node_dashboard_ui -->|"validates with"| node_validation
node_dashboard_ui -->|"requests"| node_device_api
node_device_api -->|"reads and writes"| node_device_store
node_device_api -->|"checks status"| node_status_checks
node_dashboard_ui -->|"imports and exports"| node_config_transfer
node_dashboard_ui -->|"starts scan"| node_subnet_scan
node_subnet_scan -->|"reads"| node_arp_table
node_dashboard_ui -->|"renders"| node_network_map
node_dashboard_ui -->|"requests wake"| node_wol
node_wol -->|"sends UDP packet"| node_lan_devices
node_dashboard_ui -->|"requests power action"| node_ssh_power
node_ssh_power -->|"runs SSH command"| node_lan_devices
node_dashboard_ui -->|"requests information"| node_ssh_inventory
node_ssh_inventory -->|"queries over SSH"| node_lan_devices
node_dashboard_ui -->|"requests inventory"| node_intune_inventory
node_intune_inventory -->|"queries"| node_microsoft_graph
node_ssh_power -->|"uses credentials"| node_ssh_credentials
node_ssh_inventory -->|"uses credentials"| node_ssh_credentials

click node_dashboard_ui "https://github.com/protasiojr/status_pc_v2/blob/main/app.js"
click node_validation "https://github.com/protasiojr/status_pc_v2/blob/main/validation.js"
click node_device_api "https://github.com/protasiojr/status_pc_v2/blob/main/server.js"
click node_device_store "https://github.com/protasiojr/status_pc_v2/blob/main/server.js"
click node_status_checks "https://github.com/protasiojr/status_pc_v2/blob/main/server.js"
click node_config_transfer "https://github.com/protasiojr/status_pc_v2/blob/main/app.js"
click node_network_map "https://github.com/protasiojr/status_pc_v2/blob/main/app.js"
click node_subnet_scan "https://github.com/protasiojr/status_pc_v2/blob/main/server.js"
click node_arp_table "https://github.com/protasiojr/status_pc_v2/blob/main/server.js"
click node_wol "https://github.com/protasiojr/status_pc_v2/blob/main/server.js"
click node_ssh_power "https://github.com/protasiojr/status_pc_v2/blob/main/server.js"
click node_ssh_inventory "https://github.com/protasiojr/status_pc_v2/blob/main/server.js"
click node_intune_inventory "https://github.com/protasiojr/status_pc_v2/blob/main/server.js"
click node_ssh_credentials "https://github.com/protasiojr/status_pc_v2/blob/main/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_dashboard_ui,node_validation toneBlue
class node_device_api,node_device_store,node_status_checks,node_config_transfer toneAmber
class node_network_map,node_subnet_scan,node_arp_table,node_wol toneMint
class node_ssh_power,node_ssh_inventory,node_intune_inventory,node_ssh_credentials toneRose
class node_operator,node_lan_devices,node_microsoft_graph toneIndigo
```

## Components

### Dashboard

- [Dashboard UI](https://github.com/protasiojr/status_pc_v2/blob/main/app.js): `app.js`
- [Form Validation](https://github.com/protasiojr/status_pc_v2/blob/main/validation.js): `validation.js`

### Device Operations

- [Device API](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`
- [Device Storage](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`
- [Status Checks](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`
- [Config Import Export](https://github.com/protasiojr/status_pc_v2/blob/main/app.js): `app.js`

### Network Discovery

- [Network Map](https://github.com/protasiojr/status_pc_v2/blob/main/app.js): `app.js`
- [Subnet Scan](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`
- [ARP Table](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`
- [Wake-on-LAN](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`

### Remote Integrations

- [SSH Power Actions](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`
- [SSH Inventory](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`
- [Intune Inventory](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`
- [SSH Credentials](https://github.com/protasiojr/status_pc_v2/blob/main/server.js): `server.js`

### Other components

- **LAN Operator**
- **LAN Devices**
- **Microsoft Graph**

## Connections

- LAN Operator → Dashboard UI: uses (evidence: `README.md`)
- Dashboard UI → Form Validation: validates with (evidence: `app.js`)
- Dashboard UI → Device API: requests (evidence: `README.md`)
- Device API → Device Storage: reads and writes (evidence: `README.md`)
- Device API → Status Checks: checks status (evidence: `server.js`)
- Dashboard UI → Config Import Export: imports and exports (evidence: `README.md`)
- Dashboard UI → Subnet Scan: starts scan (evidence: `app.js`)
- Subnet Scan → ARP Table: reads (evidence: `server.js`)
- Dashboard UI → Network Map: renders (evidence: `app.js`)
- Dashboard UI → Wake-on-LAN: requests wake (evidence: `README.md`)
- Wake-on-LAN → LAN Devices: sends UDP packet (evidence: `README.md`)
- Dashboard UI → SSH Power Actions: requests power action (evidence: `README.md`)
- SSH Power Actions → LAN Devices: runs SSH command (evidence: `README.md`)
- Dashboard UI → SSH Inventory: requests information (evidence: `README.md`)
- SSH Inventory → LAN Devices: queries over SSH (evidence: `README.md`)
- Dashboard UI → Intune Inventory: requests inventory (evidence: `README.md`)
- Intune Inventory → Microsoft Graph: queries (evidence: `README.md`)
- SSH Power Actions → SSH Credentials: uses credentials (evidence: `README.md`)
- SSH Inventory → SSH Credentials: uses credentials (evidence: `README.md`)
