# ismailsarhrany/hps-dashboard architecture

> Architecture diagram of the GitHub repository ismailsarhrany/hps-dashboard, 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/ismailsarhrany/hps-dashboard
- Repository: https://github.com/ismailsarhrany/hps-dashboard

## Overview

HPS Dashboard monitors Unix resources through a web dashboard: users select servers and view live and historical metrics, anomaly detection, predictions, process information, and Oracle monitoring. The repository combines an Angular client with Django services and data models. Documented capabilities are included even where their implementation was not sampled; dashed links mark relationships whose wiring is not shown. The evidence supports selected module calls and references, not a fully verified end-to-end request flow.

Main entry points: [`frontend/src/app/pages/pages-routing.module.ts`](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/pages-routing.module.ts) (Feature navigation), [`frontend/src/app/pages/anomaly/anomaly.component.ts`](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/anomaly/anomaly.component.ts) (Anomaly dashboard), [`backend/metrics/management/services/oracle_service.py`](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/management/services/oracle_service.py) (Oracle monitoring service), [`frontend/src/app/services/monitoring.service.ts`](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/services/monitoring.service.ts) (Metric data services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Dashboard client"]
  node_app["Angular application<br/>[app.module.ts]"]
  node_navigation["Feature navigation"]
  node_realtime_view["Live metrics view"]
  node_history_view["Historical analysis"]
  node_process_view["Process view<br/>[process.module.ts]"]
  node_prediction_view["Prediction view"]
  node_server_config["Server configuration"]
  node_server_api["Server client service<br/>[server.service.ts]"]
  node_metric_client["Metric data services"]
  node_disk_network["Disk and network data"]
end

subgraph group_metrics["Metrics collection"]
  node_metric_api["Metric API<br/>[views.py]"]
  node_metric_store[("Metric records<br/>[models.py]")]
  node_collectors["Metric collectors"]
  node_ssh["SSH connections<br/>[ssh_client.py]"]
  node_streaming["Metric WebSocket consumers<br/>[consumers.py]"]
end

subgraph group_anomaly["Anomaly analysis"]
  node_anomaly_view["Anomaly dashboard"]
  node_anomaly_api["Anomaly API<br/>[views.py]"]
  node_anomaly_jobs["Detection and training"]
  node_anomaly_store[("Anomaly models<br/>[models.py]")]
end

subgraph group_oracle["Oracle monitoring"]
  node_oracle_view["Oracle dashboard"]
  node_oracle_service["Oracle monitoring service<br/>[oracle_service.py]"]
  node_oracle_store[("Oracle records<br/>[models.py]")]
  node_oracle_stream["Oracle WebSocket route<br/>[routing.py]"]
end

node_user(("Dashboard user"))
node_oracle_db[("Oracle database")]
node_realtime_transport["Realtime transport"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_navigation
node_navigation -->|"loads"| node_realtime_view
node_navigation -->|"loads"| node_history_view
node_navigation -->|"loads"| node_process_view
node_navigation -->|"loads"| node_anomaly_view
node_navigation -->|"loads"| node_server_config
node_navigation -->|"loads"| node_oracle_view
node_user -.->|"configures"| node_server_config
node_server_config -.->|"uses"| node_server_api
node_realtime_view -->|"uses"| node_metric_client
node_history_view -->|"uses"| node_metric_client
node_history_view -->|"uses"| node_disk_network
node_anomaly_view -->|"uses"| node_metric_client
node_anomaly_view -->|"uses"| node_disk_network
node_anomaly_view -->|"uses"| node_server_api
node_metric_client -.->|"requests"| node_metric_api
node_metric_api -.->|"reads"| node_metric_store
node_collectors -.->|"collects via"| node_ssh
node_collectors -.->|"records"| node_metric_store
node_streaming -.->|"streams"| node_realtime_transport
node_realtime_transport -.->|"delivers"| node_realtime_view
node_anomaly_jobs -->|"uses"| node_anomaly_store
node_anomaly_jobs -->|"reads"| node_metric_store
node_anomaly_api -.->|"serves"| node_anomaly_store
node_anomaly_view -.->|"requests"| node_anomaly_api
node_prediction_view -.->|"requests"| node_anomaly_api
node_oracle_view -.->|"requests"| node_oracle_service
node_oracle_service -->|"queries"| node_oracle_db
node_oracle_service -->|"stores snapshots"| node_oracle_store
node_oracle_service -->|"publishes updates"| node_realtime_transport
node_oracle_stream -.->|"routes updates"| node_realtime_transport

click node_app "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/app.module.ts"
click node_navigation "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/pages-routing.module.ts"
click node_realtime_view "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/realtime/realtime.component.ts"
click node_history_view "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/historic/historic.component.ts"
click node_process_view "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/process/process.module.ts"
click node_prediction_view "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/prediction/prediction.component.ts"
click node_server_config "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/server-configuration/server-configuration.module.ts"
click node_server_api "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/services/server.service.ts"
click node_metric_client "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/services/monitoring.service.ts"
click node_disk_network "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/services/disk-data.service.ts"
click node_metric_api "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/views.py"
click node_metric_store "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/models.py"
click node_collectors "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/management/commands/collect_all_servers.py"
click node_ssh "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/utils/ssh_client.py"
click node_streaming "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/consumers/consumers.py"
click node_anomaly_view "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/anomaly/anomaly.component.ts"
click node_anomaly_api "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/anomalies/views.py"
click node_anomaly_jobs "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/anomalies/management/commands/run_anomlay_detection.py"
click node_anomaly_store "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/anomalies/models.py"
click node_oracle_view "https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/oracle/oracle.component.ts"
click node_oracle_service "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/management/services/oracle_service.py"
click node_oracle_store "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/models.py"
click node_oracle_stream "https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/consumers/routing.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_app,node_navigation,node_realtime_view,node_history_view,node_process_view,node_prediction_view,node_server_config,node_server_api,node_metric_client,node_disk_network,node_user toneBlue
class node_metric_api,node_metric_store,node_collectors,node_ssh,node_streaming,node_oracle_db toneAmber
class node_anomaly_view,node_anomaly_api,node_anomaly_jobs,node_anomaly_store toneMint
class node_oracle_view,node_oracle_service,node_oracle_store,node_oracle_stream toneRose
class node_realtime_transport toneIndigo
```

## Components

### Dashboard client

- [Angular application](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/app.module.ts): `frontend/src/app/app.module.ts`
- [Feature navigation](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/pages-routing.module.ts): `frontend/src/app/pages/pages-routing.module.ts`
- [Live metrics view](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/realtime/realtime.component.ts): `frontend/src/app/pages/realtime/realtime.component.ts`
- [Historical analysis](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/historic/historic.component.ts): `frontend/src/app/pages/historic/historic.component.ts`
- [Process view](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/process/process.module.ts): `frontend/src/app/pages/process/process.module.ts`
- [Prediction view](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/prediction/prediction.component.ts): `frontend/src/app/pages/prediction/prediction.component.ts`
- [Server configuration](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/server-configuration/server-configuration.module.ts): `frontend/src/app/pages/server-configuration/server-configuration.module.ts`
- [Server client service](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/services/server.service.ts): `frontend/src/app/services/server.service.ts`
- [Metric data services](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/services/monitoring.service.ts): `frontend/src/app/services/monitoring.service.ts`
- [Disk and network data](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/services/disk-data.service.ts): `frontend/src/app/services/disk-data.service.ts`

### Metrics collection

- [Metric API](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/views.py): `backend/metrics/views.py`
- [Metric records](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/models.py): `backend/metrics/models.py`
- [Metric collectors](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/management/commands/collect_all_servers.py): `backend/metrics/management/commands/collect_all_servers.py`
- [SSH connections](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/utils/ssh_client.py): `backend/metrics/utils/ssh_client.py`
- [Metric WebSocket consumers](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/consumers/consumers.py): `backend/metrics/consumers/consumers.py`

### Anomaly analysis

- [Anomaly dashboard](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/anomaly/anomaly.component.ts): `frontend/src/app/pages/anomaly/anomaly.component.ts`
- [Anomaly API](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/anomalies/views.py): `backend/anomalies/views.py`
- [Detection and training](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/anomalies/management/commands/run_anomlay_detection.py): `backend/anomalies/management/commands/run_anomlay_detection.py`
- [Anomaly models](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/anomalies/models.py): `backend/anomalies/models.py`

### Oracle monitoring

- [Oracle dashboard](https://github.com/ismailsarhrany/hps-dashboard/blob/main/frontend/src/app/pages/oracle/oracle.component.ts): `frontend/src/app/pages/oracle/oracle.component.ts`
- [Oracle monitoring service](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/management/services/oracle_service.py): `backend/metrics/management/services/oracle_service.py`
- [Oracle records](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/models.py): `backend/metrics/models.py`
- [Oracle WebSocket route](https://github.com/ismailsarhrany/hps-dashboard/blob/main/backend/metrics/consumers/routing.py): `backend/metrics/consumers/routing.py`

### Other components

- **Dashboard user**
- **Oracle database**
- **Realtime transport**

## Connections

- Dashboard user → Angular application: uses
- Angular application → Feature navigation: routes to
- Feature navigation → Live metrics view: loads (evidence: `frontend/src/app/pages/pages-routing.module.ts`)
- Feature navigation → Historical analysis: loads (evidence: `frontend/src/app/pages/pages-routing.module.ts`)
- Feature navigation → Process view: loads (evidence: `frontend/src/app/pages/pages-routing.module.ts`)
- Feature navigation → Anomaly dashboard: loads (evidence: `frontend/src/app/pages/pages-routing.module.ts`)
- Feature navigation → Server configuration: loads (evidence: `frontend/src/app/pages/pages-routing.module.ts`)
- Feature navigation → Oracle dashboard: loads (evidence: `frontend/src/app/pages/pages-routing.module.ts`)
- Dashboard user → Server configuration: configures
- Server configuration → Server client service: uses
- Live metrics view → Metric data services: uses
- Historical analysis → Metric data services: uses (evidence: `frontend/src/app/pages/historic/historic.component.ts`)
- Historical analysis → Disk and network data: uses (evidence: `frontend/src/app/pages/historic/historic.component.ts`)
- Anomaly dashboard → Metric data services: uses (evidence: `frontend/src/app/pages/anomaly/anomaly.component.ts`)
- Anomaly dashboard → Disk and network data: uses (evidence: `frontend/src/app/pages/anomaly/anomaly.component.ts`)
- Anomaly dashboard → Server client service: uses (evidence: `frontend/src/app/pages/anomaly/anomaly.component.ts`)
- Metric data services → Metric API: requests
- Metric API → Metric records: reads
- Metric collectors → SSH connections: collects via
- Metric collectors → Metric records: records
- Metric WebSocket consumers → Realtime transport: streams
- Realtime transport → Live metrics view: delivers
- Detection and training → Anomaly models: uses (evidence: `backend/anomalies/management/commands/run_anomlay_detection.py`)
- Detection and training → Metric records: reads (evidence: `backend/anomalies/management/commands/run_anomlay_detection.py`)
- Anomaly API → Anomaly models: serves
- Anomaly dashboard → Anomaly API: requests
- Prediction view → Anomaly API: requests
- Oracle dashboard → Oracle monitoring service: requests
- Oracle monitoring service → Oracle database: queries (evidence: `backend/metrics/management/services/oracle_service.py`)
- Oracle monitoring service → Oracle records: stores snapshots (evidence: `backend/metrics/management/services/oracle_service.py`)
- Oracle monitoring service → Realtime transport: publishes updates (evidence: `backend/metrics/management/services/oracle_service.py`)
- Oracle WebSocket route → Realtime transport: routes updates
