# iiyyll01lin/aup-learning-cloud architecture

> Architecture diagram of the GitHub repository iiyyll01lin/aup-learning-cloud, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iiyyll01lin/aup-learning-cloud
- Repository: https://github.com/iiyyll01lin/aup-learning-cloud

## Overview

AUP Learning Cloud combines a JupyterHub learning environment with an installer that detects AMD hardware and deploys the runtime. The user workflow runs from choosing a learning environment in the spawn interface to using a notebook, while administrators manage users, groups, quotas, and usage. The installer has a separate deployment workflow for preparing GPU configuration and installing the cluster and Hub. README capabilities include GitHub and native authentication, persistent storage, and CPU/GPU/NPU acceleration; several of those implementation details are not shown in the sampled source.

Main entry points: [`auplc_installer/cli.py`](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/cli.py) (Installer CLI), [`runtime/hub/core/handlers.py`](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/handlers.py) (Hub API handlers), [`runtime/notebook`](https://github.com/iiyyll01lin/aup-learning-cloud/tree/main/runtime/notebook) (Notebook environment), [`runtime/hub/frontend/packages/shared/src/api/client.ts`](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/frontend/packages/shared/src/api/client.ts) (Shared API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_install["Installation"]
  node_installer_cli["Installer CLI<br/>[cli.py]"]
  node_gpu_detect["GPU detection<br/>[gpu.py]"]
  node_course_catalog["Course catalog<br/>[catalog.py]"]
  node_images["Image preparation<br/>[images.py]"]
  node_overlay["Values overlay<br/>[overlay.py]"]
  node_cluster["K3s cluster<br/>[k3s.py]"]
  node_helm["Helm deployment<br/>[helm.py]"]
end

subgraph group_hub["Hub services"]
  node_handlers["Hub API handlers<br/>[handlers.py]"]
  node_auth["Authentication"]
  node_groups["Group management<br/>[groups.py]"]
  node_quota["Quota management<br/>[manager.py]"]
  node_stats["Usage statistics<br/>[stats_handlers.py]"]
  node_database[("Hub database<br/>[database.py]")]
end

subgraph group_interfaces["User interfaces"]
  node_spawn_ui["Environment selection<br/>[App.tsx]"]
  node_home_ui["Learner home<br/>[App.tsx]"]
  node_admin_ui["Admin console<br/>[App.tsx]"]
  node_shared_api["Shared API client<br/>[client.ts]"]
end

subgraph group_learning["Notebook runtime"]
  node_spawner["Kubernetes spawner<br/>[kubernetes.py]"]
  node_notebook["Notebook environment"]
  node_persistent_storage[("Persistent user storage")]
  node_amd_acceleration["AMD acceleration"]
  node_toolkits["Learning toolkits<br/>[labkit.py]"]
end

node_operator(("Operator"))
node_student(("Learner"))
node_admin(("Administrator"))

node_operator -->|"runs"| node_installer_cli
node_installer_cli -->|"detects hardware"| node_gpu_detect
node_installer_cli -->|"prepares images"| node_images
node_images -->|"uses course data"| node_course_catalog
node_installer_cli -->|"generates configuration"| node_overlay
node_installer_cli -->|"installs K3s"| node_cluster
node_installer_cli -->|"deploys runtime"| node_helm
node_installer_cli -->|"deploys GPU plugin"| node_amd_acceleration
node_student -->|"selects environment"| node_spawn_ui
node_student -->|"uses Hub"| node_home_ui
node_admin -->|"manages Hub"| node_admin_ui
node_spawn_ui -->|"requests resources"| node_shared_api
node_home_ui -->|"requests usage"| node_shared_api
node_admin_ui -.->|"manages users"| node_handlers
node_shared_api -.->|"calls Hub APIs"| node_handlers
node_handlers -->|"uses authenticators"| node_auth
node_handlers -->|"handles group operations"| node_groups
node_handlers -->|"handles quota operations"| node_quota
node_handlers -->|"routes statistics"| node_stats
node_quota -->|"persists quota data"| node_database
node_stats -->|"queries usage"| node_database
node_handlers -.->|"starts user servers"| node_spawner
node_spawner -.->|"launches"| node_notebook
node_notebook -.->|"uses persistent storage"| node_persistent_storage
node_notebook -.->|"uses hardware acceleration"| node_amd_acceleration
node_notebook -.->|"runs learning labs"| node_toolkits

click node_installer_cli "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/cli.py"
click node_gpu_detect "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/gpu.py"
click node_course_catalog "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/catalog.py"
click node_images "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/images.py"
click node_overlay "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/overlay.py"
click node_cluster "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/k3s.py"
click node_helm "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/helm.py"
click node_spawn_ui "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/frontend/apps/spawn/src/App.tsx"
click node_home_ui "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/frontend/apps/home/src/App.tsx"
click node_admin_ui "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/frontend/apps/admin/src/App.tsx"
click node_shared_api "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/frontend/packages/shared/src/api/client.ts"
click node_handlers "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/handlers.py"
click node_auth "https://github.com/iiyyll01lin/aup-learning-cloud/tree/main/runtime/hub/core/authenticators"
click node_groups "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/groups.py"
click node_quota "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/quota/manager.py"
click node_stats "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/stats_handlers.py"
click node_database "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/database.py"
click node_spawner "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/spawner/kubernetes.py"
click node_notebook "https://github.com/iiyyll01lin/aup-learning-cloud/tree/main/runtime/notebook"
click node_toolkits "https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/projects/ZKP/labkit.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_installer_cli,node_gpu_detect,node_course_catalog,node_images,node_overlay,node_cluster,node_helm toneBlue
class node_handlers,node_auth,node_groups,node_quota,node_stats,node_database toneAmber
class node_spawn_ui,node_home_ui,node_admin_ui,node_shared_api toneMint
class node_spawner,node_notebook,node_persistent_storage,node_amd_acceleration,node_toolkits toneRose
class node_operator,node_student,node_admin toneIndigo
```

## Components

### Installation

- [Installer CLI](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/cli.py): `auplc_installer/cli.py`
- [GPU detection](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/gpu.py): `auplc_installer/gpu.py`
- [Course catalog](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/catalog.py): `auplc_installer/catalog.py`
- [Image preparation](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/images.py): `auplc_installer/images.py`
- [Values overlay](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/overlay.py): `auplc_installer/overlay.py`
- [K3s cluster](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/k3s.py): `auplc_installer/k3s.py`
- [Helm deployment](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/auplc_installer/helm.py): `auplc_installer/helm.py`

### Hub services

- [Hub API handlers](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/handlers.py): `runtime/hub/core/handlers.py`
- [Authentication](https://github.com/iiyyll01lin/aup-learning-cloud/tree/main/runtime/hub/core/authenticators): `runtime/hub/core/authenticators`
- [Group management](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/groups.py): `runtime/hub/core/groups.py`
- [Quota management](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/quota/manager.py): `runtime/hub/core/quota/manager.py`
- [Usage statistics](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/stats_handlers.py): `runtime/hub/core/stats_handlers.py`
- [Hub database](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/database.py): `runtime/hub/core/database.py`

### User interfaces

- [Environment selection](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/frontend/apps/spawn/src/App.tsx): `runtime/hub/frontend/apps/spawn/src/App.tsx`
- [Learner home](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/frontend/apps/home/src/App.tsx): `runtime/hub/frontend/apps/home/src/App.tsx`
- [Admin console](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/frontend/apps/admin/src/App.tsx): `runtime/hub/frontend/apps/admin/src/App.tsx`
- [Shared API client](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/frontend/packages/shared/src/api/client.ts): `runtime/hub/frontend/packages/shared/src/api/client.ts`

### Notebook runtime

- [Kubernetes spawner](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/runtime/hub/core/spawner/kubernetes.py): `runtime/hub/core/spawner/kubernetes.py`
- [Notebook environment](https://github.com/iiyyll01lin/aup-learning-cloud/tree/main/runtime/notebook): `runtime/notebook`
- **Persistent user storage**
- **AMD acceleration**
- [Learning toolkits](https://github.com/iiyyll01lin/aup-learning-cloud/blob/main/projects/ZKP/labkit.py): `projects/ZKP/labkit.py`

### Other components

- **Operator**
- **Learner**
- **Administrator**

## Connections

- Operator → Installer CLI: runs
- Installer CLI → GPU detection: detects hardware (evidence: `auplc_installer/cli.py`)
- Installer CLI → Image preparation: prepares images (evidence: `auplc_installer/cli.py`)
- Image preparation → Course catalog: uses course data (evidence: `auplc_installer/images.py`)
- Installer CLI → Values overlay: generates configuration (evidence: `auplc_installer/cli.py`)
- Installer CLI → K3s cluster: installs K3s (evidence: `auplc_installer/cli.py`)
- Installer CLI → Helm deployment: deploys runtime (evidence: `auplc_installer/cli.py`)
- Installer CLI → AMD acceleration: deploys GPU plugin (evidence: `auplc_installer/cli.py`)
- Learner → Environment selection: selects environment
- Learner → Learner home: uses Hub
- Administrator → Admin console: manages Hub (evidence: `runtime/hub/frontend/apps/admin/src/App.tsx`)
- Environment selection → Shared API client: requests resources (evidence: `runtime/hub/frontend/apps/spawn/src/App.tsx`)
- Learner home → Shared API client: requests usage (evidence: `runtime/hub/frontend/apps/home/src/App.tsx`)
- Admin console → Hub API handlers: manages users
- Shared API client → Hub API handlers: calls Hub APIs
- Hub API handlers → Authentication: uses authenticators (evidence: `runtime/hub/core/handlers.py`)
- Hub API handlers → Group management: handles group operations (evidence: `runtime/hub/core/handlers.py`)
- Hub API handlers → Quota management: handles quota operations (evidence: `runtime/hub/core/handlers.py`)
- Hub API handlers → Usage statistics: routes statistics (evidence: `runtime/hub/core/handlers.py`)
- Quota management → Hub database: persists quota data (evidence: `runtime/hub/core/quota/manager.py`)
- Usage statistics → Hub database: queries usage (evidence: `runtime/hub/core/stats_handlers.py`)
- Hub API handlers → Kubernetes spawner: starts user servers
- Kubernetes spawner → Notebook environment: launches
- Notebook environment → Persistent user storage: uses persistent storage
- Notebook environment → AMD acceleration: uses hardware acceleration
- Notebook environment → Learning toolkits: runs learning labs
