# allenasat044-prog/servercats architecture

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

- Interactive diagram: https://gitdiagram.com/allenasat044-prog/servercats
- Repository: https://github.com/allenasat044-prog/servercats

## Overview

LabServer combines a Linux collector that provisions and monitors a college computer lab with a React site that presents the collector’s saved report. The user workflow is to visit the dashboard and focused pages for users, storage, backups and cleanup, then consult setup FAQs; the dashboard also exposes terminal output and a report download. The README documents account creation, department folders, cleanup, backup/restore checks and CPU/RAM/disk collection. The collector and intermediate data flow are described in documentation, but their implementation is not linked to the website by sampled source; those edges are dashed to mark this evidence limit.

Main entry points: [`src/App.tsx`](https://github.com/allenasat044-prog/servercats/blob/main/src/App.tsx) (Page routing), [`src/lib/lab.ts`](https://github.com/allenasat044-prog/servercats/blob/main/src/lib/lab.ts) (Data access and formatting), [`src/components/ui/dashboard-4.tsx`](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4.tsx) (Dashboard layout), [`src/pages/Dashboard.tsx`](https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Dashboard.tsx) (Health dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Lab collection"]
  node_collector["Linux collector<br/>[collect.sh]"]
  node_python["Report processing<br/>[collect.py]"]
  node_serverdata["Collected report<br/>[data.json]"]
  node_webdata["Website snapshot<br/>[data.json]"]
end

subgraph group_presentation["Lab website"]
  node_router["Page routing<br/>[App.tsx]"]
  node_labdata["Data access and formatting<br/>[lab.ts]"]
  node_dashboard["Health dashboard<br/>[Dashboard.tsx]"]
  node_backup["Backup and cleanup<br/>[Backups.tsx]"]
  node_storage["Storage and access<br/>[Storage.tsx]"]
  node_users["Users and software<br/>[Users.tsx]"]
  node_storagehero["Storage backdrop<br/>[prisma-hero.tsx]"]
end

subgraph group_ui["Dashboard components"]
  node_dashlayout["Dashboard layout<br/>[dashboard-4.tsx]"]
  node_quickactions["Report shortcuts<br/>[quick-actions.tsx]"]
  node_resourcechart["Resource chart<br/>[resource-chart.tsx]"]
  node_stats["Lab statistics<br/>[stats.tsx]"]
  node_department["Department chart"]
  node_cleanupchart["Cleanup chart<br/>[cleanup-chart.tsx]"]
end

subgraph group_guidance["Help and landing"]
  node_faqpage["FAQ page<br/>[Faq.tsx]"]
  node_landing["Landing page<br/>[Landing.tsx]"]
  node_faqcomponent["FAQ presentation<br/>[faqs-02.tsx]"]
  node_hero["Landing animation<br/>[skiper39.tsx]"]
end

node_admin(("Lab administrator"))
node_browser(("Website visitor"))

node_admin -.->|"runs on Linux"| node_collector
node_collector -.->|"processes report"| node_python
node_collector -.->|"writes report"| node_serverdata
node_serverdata -.->|"copied for site"| node_webdata
node_browser -.->|"opens pages"| node_router
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_backup
node_router -->|"routes to"| node_storage
node_router -->|"routes to"| node_users
node_router -->|"routes to"| node_faqpage
node_router -->|"routes to"| node_landing
node_labdata -->|"loads snapshot"| node_webdata
node_dashboard -->|"reads data"| node_labdata
node_backup -->|"reads data"| node_labdata
node_storage -->|"reads data"| node_labdata
node_users -->|"reads data"| node_labdata
node_faqpage -->|"renders"| node_faqcomponent
node_faqpage -->|"reads data"| node_labdata
node_landing -->|"renders"| node_hero
node_storage -->|"renders"| node_storagehero
node_dashboard -->|"renders"| node_dashlayout
node_dashboard -->|"calls download"| node_quickactions
node_dashlayout -->|"renders"| node_quickactions
node_dashlayout -->|"renders"| node_resourcechart
node_dashlayout -->|"renders"| node_stats
node_dashlayout -->|"renders"| node_department
node_dashlayout -->|"renders"| node_cleanupchart
node_quickactions -->|"downloads report"| node_labdata

click node_collector "https://github.com/allenasat044-prog/servercats/blob/main/server/collect.sh"
click node_python "https://github.com/allenasat044-prog/servercats/blob/main/server/collect.py"
click node_serverdata "https://github.com/allenasat044-prog/servercats/blob/main/server/data.json"
click node_webdata "https://github.com/allenasat044-prog/servercats/blob/main/src/data.json"
click node_router "https://github.com/allenasat044-prog/servercats/blob/main/src/App.tsx"
click node_labdata "https://github.com/allenasat044-prog/servercats/blob/main/src/lib/lab.ts"
click node_dashboard "https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Dashboard.tsx"
click node_backup "https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Backups.tsx"
click node_storage "https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Storage.tsx"
click node_users "https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Users.tsx"
click node_faqpage "https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Faq.tsx"
click node_landing "https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Landing.tsx"
click node_dashlayout "https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4.tsx"
click node_quickactions "https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/quick-actions.tsx"
click node_resourcechart "https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/resource-chart.tsx"
click node_stats "https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/stats.tsx"
click node_department "https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/department-chart.tsx"
click node_cleanupchart "https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/cleanup-chart.tsx"
click node_faqcomponent "https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/faqs-02.tsx"
click node_hero "https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/skiper39.tsx"
click node_storagehero "https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/prisma-hero.tsx"

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_collector,node_python,node_serverdata,node_webdata toneBlue
class node_router,node_labdata,node_dashboard,node_backup,node_storage,node_users,node_storagehero toneAmber
class node_dashlayout,node_quickactions,node_resourcechart,node_stats,node_department,node_cleanupchart toneMint
class node_faqpage,node_landing,node_faqcomponent,node_hero toneRose
class node_admin,node_browser toneIndigo
```

## Components

### Lab collection

- [Linux collector](https://github.com/allenasat044-prog/servercats/blob/main/server/collect.sh): `server/collect.sh`
- [Report processing](https://github.com/allenasat044-prog/servercats/blob/main/server/collect.py): `server/collect.py`
- [Collected report](https://github.com/allenasat044-prog/servercats/blob/main/server/data.json): `server/data.json`
- [Website snapshot](https://github.com/allenasat044-prog/servercats/blob/main/src/data.json): `src/data.json`

### Lab website

- [Page routing](https://github.com/allenasat044-prog/servercats/blob/main/src/App.tsx): `src/App.tsx`
- [Data access and formatting](https://github.com/allenasat044-prog/servercats/blob/main/src/lib/lab.ts): `src/lib/lab.ts`
- [Health dashboard](https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Backup and cleanup](https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Backups.tsx): `src/pages/Backups.tsx`
- [Storage and access](https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Storage.tsx): `src/pages/Storage.tsx`
- [Users and software](https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Users.tsx): `src/pages/Users.tsx`
- [Storage backdrop](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/prisma-hero.tsx): `src/components/ui/prisma-hero.tsx`

### Dashboard components

- [Dashboard layout](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4.tsx): `src/components/ui/dashboard-4.tsx`
- [Report shortcuts](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/quick-actions.tsx): `src/components/ui/dashboard-4-utils/quick-actions.tsx`
- [Resource chart](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/resource-chart.tsx): `src/components/ui/dashboard-4-utils/resource-chart.tsx`
- [Lab statistics](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/stats.tsx): `src/components/ui/dashboard-4-utils/stats.tsx`
- [Department chart](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/department-chart.tsx): `src/components/ui/dashboard-4-utils/department-chart.tsx`
- [Cleanup chart](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/dashboard-4-utils/cleanup-chart.tsx): `src/components/ui/dashboard-4-utils/cleanup-chart.tsx`

### Help and landing

- [FAQ page](https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Faq.tsx): `src/pages/Faq.tsx`
- [Landing page](https://github.com/allenasat044-prog/servercats/blob/main/src/pages/Landing.tsx): `src/pages/Landing.tsx`
- [FAQ presentation](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/faqs-02.tsx): `src/components/ui/faqs-02.tsx`
- [Landing animation](https://github.com/allenasat044-prog/servercats/blob/main/src/components/ui/skiper39.tsx): `src/components/ui/skiper39.tsx`

### Other components

- **Lab administrator**
- **Website visitor**

## Connections

- Lab administrator → Linux collector: runs on Linux (evidence: `README.md`)
- Linux collector → Report processing: processes report (evidence: `README.md`)
- Linux collector → Collected report: writes report (evidence: `README.md`)
- Collected report → Website snapshot: copied for site (evidence: `README.md`)
- Website visitor → Page routing: opens pages (evidence: `README.md`)
- Page routing → Health dashboard: routes to (evidence: `src/App.tsx`)
- Page routing → Backup and cleanup: routes to (evidence: `src/App.tsx`)
- Page routing → Storage and access: routes to (evidence: `src/App.tsx`)
- Page routing → Users and software: routes to (evidence: `src/App.tsx`)
- Page routing → FAQ page: routes to (evidence: `src/App.tsx`)
- Page routing → Landing page: routes to (evidence: `src/App.tsx`)
- Data access and formatting → Website snapshot: loads snapshot (evidence: `src/lib/lab.ts`)
- Health dashboard → Data access and formatting: reads data (evidence: `src/pages/Dashboard.tsx`)
- Backup and cleanup → Data access and formatting: reads data (evidence: `src/pages/Backups.tsx`)
- Storage and access → Data access and formatting: reads data (evidence: `src/pages/Storage.tsx`)
- Users and software → Data access and formatting: reads data (evidence: `src/lib/lab.ts`)
- FAQ page → FAQ presentation: renders (evidence: `src/pages/Faq.tsx`)
- FAQ page → Data access and formatting: reads data (evidence: `src/pages/Faq.tsx`)
- Landing page → Landing animation: renders (evidence: `src/pages/Landing.tsx`)
- Storage and access → Storage backdrop: renders (evidence: `src/pages/Storage.tsx`)
- Health dashboard → Dashboard layout: renders (evidence: `src/pages/Dashboard.tsx`)
- Health dashboard → Report shortcuts: calls download (evidence: `src/pages/Dashboard.tsx`)
- Dashboard layout → Report shortcuts: renders (evidence: `src/components/ui/dashboard-4.tsx`)
- Dashboard layout → Resource chart: renders (evidence: `src/components/ui/dashboard-4.tsx`)
- Dashboard layout → Lab statistics: renders (evidence: `src/components/ui/dashboard-4.tsx`)
- Dashboard layout → Department chart: renders (evidence: `src/components/ui/dashboard-4.tsx`)
- Dashboard layout → Cleanup chart: renders (evidence: `src/components/ui/dashboard-4.tsx`)
- Report shortcuts → Data access and formatting: downloads report (evidence: `src/components/ui/dashboard-4-utils/quick-actions.tsx`)
