# danyalns/dc-equipment-monitor architecture

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

- Interactive diagram: https://gitdiagram.com/danyalns/dc-equipment-monitor
- Repository: https://github.com/danyalns/dc-equipment-monitor

## Overview

This repository describes a planned equipment availability-monitoring system; the tree contains no implementation source. The principal workflow is an employee viewing equipment through the frontend and REST API, while backend monitoring periodically checks registered TCP ports and stores results for status and history views. The graph represents documented target capabilities, not verified runtime behavior; relationships are based on the README.

Main entry points: [`backend`](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend) (REST API), [`frontend`](https://github.com/danyalns/dc-equipment-monitor/tree/main/frontend) (Web frontend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client"]
  node_frontend["Web frontend"]
  node_dashboard["Overview counters"]
end

subgraph group_server["Backend"]
  node_api["REST API"]
  node_access["Authentication and roles"]
  node_equipment["Equipment registry"]
  node_racks["Rack management"]
  node_search["Search and filters"]
end

subgraph group_monitoring["Monitoring and data"]
  node_scheduler["Periodic monitor"]
  node_tcpcheck["TCP availability check"]
  node_checkhistory["Check status and history"]
  node_database[("Application database")]
end

node_employee(("Employee"))

node_employee -->|"uses"| node_frontend
node_frontend -->|"requests data"| node_api
node_frontend -->|"polls status"| node_api
node_api -->|"enforces roles"| node_access
node_api -->|"manages records"| node_equipment
node_api -->|"manages racks"| node_racks
node_api -->|"filters records"| node_search
node_frontend -->|"shows counters"| node_dashboard
node_scheduler -->|"runs periodically"| node_tcpcheck
node_scheduler -->|"reads registered devices"| node_database
node_scheduler -->|"stores results"| node_database
node_api -->|"reads and writes"| node_database
node_api -->|"serves status and history"| node_checkhistory
node_tcpcheck -->|"produces check result"| node_checkhistory

click node_frontend "https://github.com/danyalns/dc-equipment-monitor/tree/main/frontend"
click node_api "https://github.com/danyalns/dc-equipment-monitor/tree/main/backend"
click node_access "https://github.com/danyalns/dc-equipment-monitor/tree/main/backend"
click node_equipment "https://github.com/danyalns/dc-equipment-monitor/tree/main/backend"
click node_racks "https://github.com/danyalns/dc-equipment-monitor/tree/main/backend"
click node_search "https://github.com/danyalns/dc-equipment-monitor/tree/main/backend"
click node_dashboard "https://github.com/danyalns/dc-equipment-monitor/tree/main/frontend"
click node_scheduler "https://github.com/danyalns/dc-equipment-monitor/tree/main/backend"
click node_tcpcheck "https://github.com/danyalns/dc-equipment-monitor/tree/main/backend"
click node_checkhistory "https://github.com/danyalns/dc-equipment-monitor/tree/main/backend"
click node_database "https://github.com/danyalns/dc-equipment-monitor/tree/main/backend"

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_frontend,node_dashboard toneBlue
class node_api,node_access,node_equipment,node_racks,node_search toneAmber
class node_scheduler,node_tcpcheck,node_checkhistory,node_database toneMint
class node_employee toneIndigo
```

## Components

### Client

- [Web frontend](https://github.com/danyalns/dc-equipment-monitor/tree/main/frontend): `frontend`
- [Overview counters](https://github.com/danyalns/dc-equipment-monitor/tree/main/frontend): `frontend`

### Backend

- [REST API](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend): `backend`
- [Authentication and roles](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend): `backend`
- [Equipment registry](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend): `backend`
- [Rack management](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend): `backend`
- [Search and filters](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend): `backend`

### Monitoring and data

- [Periodic monitor](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend): `backend`
- [TCP availability check](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend): `backend`
- [Check status and history](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend): `backend`
- [Application database](https://github.com/danyalns/dc-equipment-monitor/tree/main/backend): `backend`

### Other components

- **Employee**

## Connections

- Employee → Web frontend: uses (evidence: `README.md`)
- Web frontend → REST API: requests data (evidence: `README.md`)
- Web frontend → REST API: polls status (evidence: `README.md`)
- REST API → Authentication and roles: enforces roles (evidence: `README.md`)
- REST API → Equipment registry: manages records (evidence: `README.md`)
- REST API → Rack management: manages racks (evidence: `README.md`)
- REST API → Search and filters: filters records (evidence: `README.md`)
- Web frontend → Overview counters: shows counters (evidence: `README.md`)
- Periodic monitor → TCP availability check: runs periodically (evidence: `README.md`)
- Periodic monitor → Application database: reads registered devices (evidence: `README.md`)
- Periodic monitor → Application database: stores results (evidence: `README.md`)
- REST API → Application database: reads and writes (evidence: `README.md`)
- REST API → Check status and history: serves status and history (evidence: `README.md`)
- TCP availability check → Check status and history: produces check result (evidence: `README.md`)
