# allenasat044-prog/orangecats architecture

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

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

## Overview

Hospital IT Server Console combines macOS server provisioning with a browser console for presenting captured evidence. The documented server stages cover accounts, storage and ACLs, scheduled backups and recovery, security, and testing. In the console workflow, a presenter captures real server checks with the collection script; the page reads the resulting evidence file and displays results, while sign-in is browser-local. The server-stage links and evidence handoff follow the README; unsampled scripts are represented by their exact tree paths, not inferred internal calls.

Main entry points: [`src/App.tsx`](https://github.com/allenasat044-prog/orangecats/blob/main/src/App.tsx) (Route application), [`src/scripts/mac/create_users.sh`](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/create_users.sh) (Users and groups), [`src/scripts/mac/setup_storage.sh`](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/setup_storage.sh) (Storage and ACLs), [`src/scripts/mac/collect_evidence.sh`](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/collect_evidence.sh) (Evidence collector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server["Server provisioning"]
  node_serverhost["Hospital server"]
  node_identitysetup["Users and groups<br/>[create_users.sh]"]
  node_storage["Storage and ACLs<br/>[setup_storage.sh]"]
  node_automation["Job scheduling"]
  node_backup["Backup and verify<br/>[hospital_backup.sh]"]
  node_diskcheck["Disk checks"]
  node_restore["Recovery"]
  node_security["Firewall and SSH<br/>[firewall.sh]"]
  node_permissions["Permission audit"]
  node_roletests["Role tests<br/>[role_tests.sh]"]
  node_linuxusers["Linux user setup<br/>[create_users.sh]"]
end

subgraph group_evidence["Evidence capture"]
  node_collector["Evidence collector"]
  node_evidencefile["Captured evidence<br/>[evidence.json]"]
  node_evidenceloader["Evidence loader<br/>[evidence.ts]"]
end

subgraph group_console["Web console"]
  node_app["Route application<br/>[App.tsx]"]
  node_landing["Landing page<br/>[hero.tsx]"]
  node_authpage["Sign-in page<br/>[Auth.tsx]"]
  node_evidencepage["Evidence page<br/>[Evidence.tsx]"]
  node_faq["FAQs<br/>[FAQ.tsx]"]
  node_contentdata["Stage and FAQ content<br/>[data.ts]"]
end

subgraph group_identity["Console identity"]
  node_authstate["Browser auth<br/>[auth.tsx]"]
  node_protected["Evidence access gate<br/>[Protected.tsx]"]
end

node_staff(("Hospital staff"))
node_presenter(("Presenter"))

node_staff -->|"connects by SSH"| node_serverhost
node_serverhost -->|"protects access"| node_security
node_security -->|"secures identities"| node_identitysetup
node_identitysetup -->|"groups drive ACLs"| node_storage
node_storage -->|"data read by"| node_automation
node_automation -->|"schedules backups"| node_backup
node_backup -->|"archive restored by"| node_restore
node_serverhost -->|"monitored by"| node_diskcheck
node_storage -->|"audited by"| node_permissions
node_identitysetup -->|"roles tested by"| node_roletests
node_presenter -->|"runs checks"| node_collector
node_collector -->|"reads real state"| node_serverhost
node_collector -->|"writes results"| node_evidencefile
node_presenter -->|"opens console"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_authpage
node_app -->|"routes to"| node_faq
node_app -->|"guards evidence route"| node_protected
node_protected -->|"allows access"| node_evidencepage
node_authpage -->|"signs in"| node_authstate
node_evidencepage -->|"loads evidence"| node_evidenceloader
node_evidenceloader -->|"fetches periodically"| node_evidencefile
node_evidencepage -->|"renders stages"| node_contentdata
node_faq -->|"renders FAQs"| node_contentdata
node_landing -->|"checks session"| node_authstate
node_linuxusers -.->|"configures Linux variant"| node_serverhost

click node_identitysetup "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/create_users.sh"
click node_storage "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/setup_storage.sh"
click node_automation "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/install_automation.sh"
click node_backup "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/hospital_backup.sh"
click node_diskcheck "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/hospital_disk_check.sh"
click node_restore "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/hospital_restore.sh"
click node_security "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/firewall.sh"
click node_permissions "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/permission_audit.sh"
click node_roletests "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/role_tests.sh"
click node_linuxusers "https://github.com/allenasat044-prog/orangecats/blob/main/linux/create_users.sh"
click node_collector "https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/collect_evidence.sh"
click node_evidencefile "https://github.com/allenasat044-prog/orangecats/blob/main/public/evidence.json"
click node_app "https://github.com/allenasat044-prog/orangecats/blob/main/src/App.tsx"
click node_landing "https://github.com/allenasat044-prog/orangecats/blob/main/src/components/ui/hero.tsx"
click node_authpage "https://github.com/allenasat044-prog/orangecats/blob/main/src/pages/Auth.tsx"
click node_authstate "https://github.com/allenasat044-prog/orangecats/blob/main/src/auth.tsx"
click node_protected "https://github.com/allenasat044-prog/orangecats/blob/main/src/components/Protected.tsx"
click node_evidencepage "https://github.com/allenasat044-prog/orangecats/blob/main/src/pages/Evidence.tsx"
click node_evidenceloader "https://github.com/allenasat044-prog/orangecats/blob/main/src/evidence.ts"
click node_faq "https://github.com/allenasat044-prog/orangecats/blob/main/src/pages/FAQ.tsx"
click node_contentdata "https://github.com/allenasat044-prog/orangecats/blob/main/src/data.ts"

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_serverhost,node_identitysetup,node_storage,node_automation,node_backup,node_diskcheck,node_restore,node_security,node_permissions,node_roletests,node_linuxusers toneBlue
class node_collector,node_evidencefile,node_evidenceloader toneAmber
class node_app,node_landing,node_authpage,node_evidencepage,node_faq,node_contentdata toneMint
class node_authstate,node_protected toneRose
class node_staff,node_presenter toneIndigo
```

## Components

### Server provisioning

- **Hospital server**
- [Users and groups](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/create_users.sh): `src/scripts/mac/create_users.sh`
- [Storage and ACLs](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/setup_storage.sh): `src/scripts/mac/setup_storage.sh`
- [Job scheduling](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/install_automation.sh): `src/scripts/mac/install_automation.sh`
- [Backup and verify](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/hospital_backup.sh): `src/scripts/mac/hospital_backup.sh`
- [Disk checks](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/hospital_disk_check.sh): `src/scripts/mac/hospital_disk_check.sh`
- [Recovery](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/hospital_restore.sh): `src/scripts/mac/hospital_restore.sh`
- [Firewall and SSH](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/firewall.sh): `src/scripts/mac/firewall.sh`
- [Permission audit](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/permission_audit.sh): `src/scripts/mac/permission_audit.sh`
- [Role tests](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/role_tests.sh): `src/scripts/mac/role_tests.sh`
- [Linux user setup](https://github.com/allenasat044-prog/orangecats/blob/main/linux/create_users.sh): `linux/create_users.sh`

### Evidence capture

- [Evidence collector](https://github.com/allenasat044-prog/orangecats/blob/main/src/scripts/mac/collect_evidence.sh): `src/scripts/mac/collect_evidence.sh`
- [Captured evidence](https://github.com/allenasat044-prog/orangecats/blob/main/public/evidence.json): `public/evidence.json`
- [Evidence loader](https://github.com/allenasat044-prog/orangecats/blob/main/src/evidence.ts): `src/evidence.ts`

### Web console

- [Route application](https://github.com/allenasat044-prog/orangecats/blob/main/src/App.tsx): `src/App.tsx`
- [Landing page](https://github.com/allenasat044-prog/orangecats/blob/main/src/components/ui/hero.tsx): `src/components/ui/hero.tsx`
- [Sign-in page](https://github.com/allenasat044-prog/orangecats/blob/main/src/pages/Auth.tsx): `src/pages/Auth.tsx`
- [Evidence page](https://github.com/allenasat044-prog/orangecats/blob/main/src/pages/Evidence.tsx): `src/pages/Evidence.tsx`
- [FAQs](https://github.com/allenasat044-prog/orangecats/blob/main/src/pages/FAQ.tsx): `src/pages/FAQ.tsx`
- [Stage and FAQ content](https://github.com/allenasat044-prog/orangecats/blob/main/src/data.ts): `src/data.ts`

### Console identity

- [Browser auth](https://github.com/allenasat044-prog/orangecats/blob/main/src/auth.tsx): `src/auth.tsx`
- [Evidence access gate](https://github.com/allenasat044-prog/orangecats/blob/main/src/components/Protected.tsx): `src/components/Protected.tsx`

### Other components

- **Hospital staff**
- **Presenter**

## Connections

- Hospital staff → Hospital server: connects by SSH (evidence: `README.md`)
- Hospital server → Firewall and SSH: protects access (evidence: `README.md`)
- Firewall and SSH → Users and groups: secures identities (evidence: `README.md`)
- Users and groups → Storage and ACLs: groups drive ACLs (evidence: `README.md`)
- Storage and ACLs → Job scheduling: data read by (evidence: `README.md`)
- Job scheduling → Backup and verify: schedules backups (evidence: `README.md`)
- Backup and verify → Recovery: archive restored by (evidence: `README.md`)
- Hospital server → Disk checks: monitored by (evidence: `README.md`)
- Storage and ACLs → Permission audit: audited by (evidence: `README.md`)
- Users and groups → Role tests: roles tested by (evidence: `README.md`)
- Presenter → Evidence collector: runs checks (evidence: `README.md`)
- Evidence collector → Hospital server: reads real state (evidence: `README.md`)
- Evidence collector → Captured evidence: writes results (evidence: `README.md`)
- Presenter → Route application: opens console (evidence: `README.md`)
- Route application → Landing page: routes to (evidence: `src/App.tsx`)
- Route application → Sign-in page: routes to (evidence: `src/App.tsx`)
- Route application → FAQs: routes to (evidence: `src/App.tsx`)
- Route application → Evidence access gate: guards evidence route (evidence: `src/App.tsx`)
- Evidence access gate → Evidence page: allows access (evidence: `src/App.tsx`)
- Sign-in page → Browser auth: signs in (evidence: `src/pages/Auth.tsx`)
- Evidence page → Evidence loader: loads evidence (evidence: `src/pages/Evidence.tsx`)
- Evidence loader → Captured evidence: fetches periodically (evidence: `README.md`)
- Evidence page → Stage and FAQ content: renders stages (evidence: `src/pages/Evidence.tsx`)
- FAQs → Stage and FAQ content: renders FAQs (evidence: `src/pages/FAQ.tsx`)
- Landing page → Browser auth: checks session (evidence: `src/components/ui/hero.tsx`)
- Linux user setup → Hospital server: configures Linux variant (evidence: `README.md`)
