# arrizal2004/ccd architecture

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

- Interactive diagram: https://gitdiagram.com/arrizal2004/ccd
- Repository: https://github.com/arrizal2004/ccd

## Overview

Campus Cloud Dashboard lets students sign in, see only assigned lab VMs, and launch browser-based SSH/RDP sessions; administrators manage users, VM assignments and infrastructure. The graph also preserves VM provisioning and lifecycle, Open Web, helpdesk, group access, optional bastion SSH, and audit/monitoring capabilities documented by the README. Sampled source confirms several backend and frontend links; other capability links rely on README documentation, so unsampled implementation details are not inferred.

Main entry points: [`frontend/src/api.js`](https://github.com/arrizal2004/ccd/blob/main/frontend/src/api.js) (Frontend API), [`frontend/src/App.jsx`](https://github.com/arrizal2004/ccd/blob/main/frontend/src/App.jsx) (Dashboard Shell), [`backend/database.py`](https://github.com/arrizal2004/ccd/blob/main/backend/database.py) (Application Database), [`backend/auth.py`](https://github.com/arrizal2004/ccd/blob/main/backend/auth.py) (JWT and Roles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Dashboard UI"]
  node_app["Dashboard Shell<br/>[App.jsx]"]
  node_vmui["VM Dashboard<br/>[ProxmoxPage.jsx]"]
  node_adminui["Admin Tools<br/>[AdminPanel.jsx]"]
  node_groupui["Group Management<br/>[GroupsPage.jsx]"]
  node_ticketui["Helpdesk Tickets<br/>[TicketsPage.jsx]"]
  node_requestui["VM Requests"]
  node_openwebui["Open Web<br/>[OpenWebPage.jsx]"]
  node_api["Frontend API<br/>[api.js]"]
end

subgraph group_identity["Identity and Access"]
  node_users["Accounts and Login<br/>[users.py]"]
  node_auth["JWT and Roles<br/>[auth.py]"]
  node_groups["Group Access API<br/>[groups.py]"]
  node_adminapi["Administration API<br/>[admin.py]"]
end

subgraph group_vm["VM Operations"]
  node_proxmoxroute["VM Management API<br/>[proxmox.py]"]
  node_provision["VM Provisioning"]
  node_instances["Proxmox Instances"]
  node_pveclient["Proxmox API Client<br/>[proxmox_client.py]"]
  node_metrics["VM Metrics Poller"]
end

subgraph group_support["Support and Remote Access"]
  node_guacroute["Remote Connect API<br/>[guac.py]"]
  node_guacsync["Guacamole Sync<br/>[guac_sync.py]"]
  node_openweb["Open Web Proxy<br/>[openweb.py]"]
  node_tickets["Ticket Service<br/>[tickets.py]"]
  node_requests["VM Request Service<br/>[infra_requests.py]"]
  node_ssh["SSH Credentials and Bastion<br/>[ssh_creds.py]"]
  node_sshclient["SSH Operations<br/>[ssh_client.py]"]
  node_sshkeys["SSH Key Access<br/>[ssh_keys.py]"]
end

subgraph group_state["Application State"]
  node_audit["Activity Audit<br/>[audit.py]"]
  node_database[("Application Database<br/>[database.py]")]
  node_postgres[("PostgreSQL")]
  node_redis[("Redis")]
end

node_student(("Student"))
node_admin(("Administrator"))
node_guacamole["Apache Guacamole"]
node_proxmox["Proxmox VE"]

node_student -->|"uses"| node_app
node_admin -->|"uses"| node_app
node_app -->|"opens"| node_vmui
node_app -->|"opens"| node_adminui
node_app -->|"opens"| node_groupui
node_app -->|"opens"| node_ticketui
node_app -->|"opens"| node_requestui
node_app -->|"opens"| node_openwebui
node_vmui -->|"requests"| node_api
node_adminui -->|"requests"| node_api
node_groupui -->|"requests"| node_api
node_ticketui -->|"requests"| node_api
node_requestui -->|"requests"| node_api
node_openwebui -->|"requests"| node_api
node_api -->|"calls REST API"| node_users
node_api -->|"calls REST API"| node_proxmoxroute
node_api -->|"calls REST API"| node_guacroute
node_api -->|"calls REST API"| node_tickets
node_api -->|"calls REST API"| node_requests
node_api -->|"calls REST API"| node_openweb
node_users -->|"authenticates"| node_auth
node_auth -->|"checks revocation"| node_redis
node_users -->|"syncs accounts"| node_guacsync
node_users -->|"reads and writes"| node_database
node_proxmoxroute -->|"checks access"| node_auth
node_proxmoxroute -->|"gets client"| node_instances
node_proxmoxroute -->|"calls"| node_pveclient
node_proxmoxroute -->|"provisions VMs"| node_provision
node_proxmoxroute -->|"updates VM records"| node_database
node_instances -->|"calls"| node_pveclient
node_pveclient -->|"sends API requests"| node_proxmox
node_metrics -->|"records metrics"| node_database
node_guacroute -->|"checks access"| node_auth
node_guacroute -->|"manages connections"| node_guacsync
node_guacroute -->|"reads credentials"| node_database
node_guacsync -->|"synchronizes accounts"| node_guacamole
node_guacroute -->|"creates remote sessions"| node_guacamole
node_openweb -.->|"reads session data"| node_database
node_openweb -->|"proxies private app"| node_proxmox
node_tickets -->|"checks access"| node_auth
node_tickets -->|"reads and writes"| node_database
node_tickets -->|"records activity"| node_audit
node_requests -->|"checks access"| node_auth
node_requests -->|"reads and writes"| node_database
node_ssh -->|"checks access"| node_auth
node_ssh -->|"stores credentials"| node_database
node_ssh -->|"tests SSH"| node_sshclient
node_sshkeys -->|"stores keys"| node_database

click node_app "https://github.com/arrizal2004/ccd/blob/main/frontend/src/App.jsx"
click node_vmui "https://github.com/arrizal2004/ccd/blob/main/frontend/src/pages/ProxmoxPage.jsx"
click node_adminui "https://github.com/arrizal2004/ccd/blob/main/frontend/src/components/AdminPanel.jsx"
click node_groupui "https://github.com/arrizal2004/ccd/blob/main/frontend/src/components/GroupsPage.jsx"
click node_ticketui "https://github.com/arrizal2004/ccd/blob/main/frontend/src/components/TicketsPage.jsx"
click node_requestui "https://github.com/arrizal2004/ccd/blob/main/frontend/src/components/InfraRequestsPage.jsx"
click node_openwebui "https://github.com/arrizal2004/ccd/blob/main/frontend/src/pages/OpenWebPage.jsx"
click node_api "https://github.com/arrizal2004/ccd/blob/main/frontend/src/api.js"
click node_users "https://github.com/arrizal2004/ccd/blob/main/backend/routers/users.py"
click node_auth "https://github.com/arrizal2004/ccd/blob/main/backend/auth.py"
click node_proxmoxroute "https://github.com/arrizal2004/ccd/blob/main/backend/routers/proxmox.py"
click node_provision "https://github.com/arrizal2004/ccd/blob/main/backend/services/proxmox_provision.py"
click node_instances "https://github.com/arrizal2004/ccd/blob/main/backend/services/proxmox_instances.py"
click node_pveclient "https://github.com/arrizal2004/ccd/blob/main/backend/services/proxmox_client.py"
click node_metrics "https://github.com/arrizal2004/ccd/blob/main/backend/services/proxmox_iops_poller.py"
click node_guacroute "https://github.com/arrizal2004/ccd/blob/main/backend/routers/guac.py"
click node_guacsync "https://github.com/arrizal2004/ccd/blob/main/backend/services/guac_sync.py"
click node_openweb "https://github.com/arrizal2004/ccd/blob/main/backend/routers/openweb.py"
click node_tickets "https://github.com/arrizal2004/ccd/blob/main/backend/routers/tickets.py"
click node_requests "https://github.com/arrizal2004/ccd/blob/main/backend/routers/infra_requests.py"
click node_ssh "https://github.com/arrizal2004/ccd/blob/main/backend/routers/ssh_creds.py"
click node_sshclient "https://github.com/arrizal2004/ccd/blob/main/backend/services/ssh_client.py"
click node_sshkeys "https://github.com/arrizal2004/ccd/blob/main/backend/routers/ssh_keys.py"
click node_groups "https://github.com/arrizal2004/ccd/blob/main/backend/routers/groups.py"
click node_adminapi "https://github.com/arrizal2004/ccd/blob/main/backend/routers/admin.py"
click node_audit "https://github.com/arrizal2004/ccd/blob/main/backend/services/audit.py"
click node_database "https://github.com/arrizal2004/ccd/blob/main/backend/database.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_vmui,node_adminui,node_groupui,node_ticketui,node_requestui,node_openwebui,node_api toneBlue
class node_users,node_auth,node_groups,node_adminapi toneAmber
class node_proxmoxroute,node_provision,node_instances,node_pveclient,node_metrics toneMint
class node_guacroute,node_guacsync,node_openweb,node_tickets,node_requests,node_ssh,node_sshclient,node_sshkeys toneRose
class node_audit,node_database,node_postgres,node_redis,node_student,node_admin,node_guacamole,node_proxmox toneIndigo
```

## Components

### Dashboard UI

- [Dashboard Shell](https://github.com/arrizal2004/ccd/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [VM Dashboard](https://github.com/arrizal2004/ccd/blob/main/frontend/src/pages/ProxmoxPage.jsx): `frontend/src/pages/ProxmoxPage.jsx`
- [Admin Tools](https://github.com/arrizal2004/ccd/blob/main/frontend/src/components/AdminPanel.jsx): `frontend/src/components/AdminPanel.jsx`
- [Group Management](https://github.com/arrizal2004/ccd/blob/main/frontend/src/components/GroupsPage.jsx): `frontend/src/components/GroupsPage.jsx`
- [Helpdesk Tickets](https://github.com/arrizal2004/ccd/blob/main/frontend/src/components/TicketsPage.jsx): `frontend/src/components/TicketsPage.jsx`
- [VM Requests](https://github.com/arrizal2004/ccd/blob/main/frontend/src/components/InfraRequestsPage.jsx): `frontend/src/components/InfraRequestsPage.jsx`
- [Open Web](https://github.com/arrizal2004/ccd/blob/main/frontend/src/pages/OpenWebPage.jsx): `frontend/src/pages/OpenWebPage.jsx`
- [Frontend API](https://github.com/arrizal2004/ccd/blob/main/frontend/src/api.js): `frontend/src/api.js`

### Identity and Access

- [Accounts and Login](https://github.com/arrizal2004/ccd/blob/main/backend/routers/users.py): `backend/routers/users.py`
- [JWT and Roles](https://github.com/arrizal2004/ccd/blob/main/backend/auth.py): `backend/auth.py`
- [Group Access API](https://github.com/arrizal2004/ccd/blob/main/backend/routers/groups.py): `backend/routers/groups.py`
- [Administration API](https://github.com/arrizal2004/ccd/blob/main/backend/routers/admin.py): `backend/routers/admin.py`

### VM Operations

- [VM Management API](https://github.com/arrizal2004/ccd/blob/main/backend/routers/proxmox.py): `backend/routers/proxmox.py`
- [VM Provisioning](https://github.com/arrizal2004/ccd/blob/main/backend/services/proxmox_provision.py): `backend/services/proxmox_provision.py`
- [Proxmox Instances](https://github.com/arrizal2004/ccd/blob/main/backend/services/proxmox_instances.py): `backend/services/proxmox_instances.py`
- [Proxmox API Client](https://github.com/arrizal2004/ccd/blob/main/backend/services/proxmox_client.py): `backend/services/proxmox_client.py`
- [VM Metrics Poller](https://github.com/arrizal2004/ccd/blob/main/backend/services/proxmox_iops_poller.py): `backend/services/proxmox_iops_poller.py`

### Support and Remote Access

- [Remote Connect API](https://github.com/arrizal2004/ccd/blob/main/backend/routers/guac.py): `backend/routers/guac.py`
- [Guacamole Sync](https://github.com/arrizal2004/ccd/blob/main/backend/services/guac_sync.py): `backend/services/guac_sync.py`
- [Open Web Proxy](https://github.com/arrizal2004/ccd/blob/main/backend/routers/openweb.py): `backend/routers/openweb.py`
- [Ticket Service](https://github.com/arrizal2004/ccd/blob/main/backend/routers/tickets.py): `backend/routers/tickets.py`
- [VM Request Service](https://github.com/arrizal2004/ccd/blob/main/backend/routers/infra_requests.py): `backend/routers/infra_requests.py`
- [SSH Credentials and Bastion](https://github.com/arrizal2004/ccd/blob/main/backend/routers/ssh_creds.py): `backend/routers/ssh_creds.py`
- [SSH Operations](https://github.com/arrizal2004/ccd/blob/main/backend/services/ssh_client.py): `backend/services/ssh_client.py`
- [SSH Key Access](https://github.com/arrizal2004/ccd/blob/main/backend/routers/ssh_keys.py): `backend/routers/ssh_keys.py`

### Application State

- [Activity Audit](https://github.com/arrizal2004/ccd/blob/main/backend/services/audit.py): `backend/services/audit.py`
- [Application Database](https://github.com/arrizal2004/ccd/blob/main/backend/database.py): `backend/database.py`
- **PostgreSQL**
- **Redis**

### Other components

- **Student**
- **Administrator**
- **Apache Guacamole**
- **Proxmox VE**

## Connections

- Student → Dashboard Shell: uses
- Administrator → Dashboard Shell: uses
- Dashboard Shell → VM Dashboard: opens (evidence: `frontend/src/App.jsx`)
- Dashboard Shell → Admin Tools: opens (evidence: `frontend/src/App.jsx`)
- Dashboard Shell → Group Management: opens (evidence: `frontend/src/App.jsx`)
- Dashboard Shell → Helpdesk Tickets: opens (evidence: `frontend/src/App.jsx`)
- Dashboard Shell → VM Requests: opens (evidence: `frontend/src/App.jsx`)
- Dashboard Shell → Open Web: opens (evidence: `frontend/src/App.jsx`)
- VM Dashboard → Frontend API: requests (evidence: `frontend/src/pages/ProxmoxPage.jsx`)
- Admin Tools → Frontend API: requests (evidence: `frontend/src/components/AdminPanel.jsx`)
- Group Management → Frontend API: requests (evidence: `frontend/src/components/GroupsPage.jsx`)
- Helpdesk Tickets → Frontend API: requests (evidence: `frontend/src/components/TicketsPage.jsx`)
- VM Requests → Frontend API: requests (evidence: `frontend/src/components/InfraRequestsPage.jsx`)
- Open Web → Frontend API: requests (evidence: `frontend/src/pages/OpenWebPage.jsx`)
- Frontend API → Accounts and Login: calls REST API
- Frontend API → VM Management API: calls REST API
- Frontend API → Remote Connect API: calls REST API
- Frontend API → Ticket Service: calls REST API
- Frontend API → VM Request Service: calls REST API
- Frontend API → Open Web Proxy: calls REST API
- Accounts and Login → JWT and Roles: authenticates (evidence: `backend/routers/users.py`)
- JWT and Roles → Redis: checks revocation (evidence: `backend/auth.py`)
- Accounts and Login → Guacamole Sync: syncs accounts (evidence: `backend/routers/users.py`)
- Accounts and Login → Application Database: reads and writes (evidence: `backend/routers/users.py`)
- VM Management API → JWT and Roles: checks access (evidence: `backend/routers/proxmox.py`)
- VM Management API → Proxmox Instances: gets client (evidence: `backend/routers/proxmox.py`)
- VM Management API → Proxmox API Client: calls (evidence: `backend/routers/proxmox.py`)
- VM Management API → VM Provisioning: provisions VMs (evidence: `backend/routers/proxmox.py`)
- VM Management API → Application Database: updates VM records (evidence: `backend/routers/proxmox.py`)
- Proxmox Instances → Proxmox API Client: calls (evidence: `backend/services/proxmox_instances.py`)
- Proxmox API Client → Proxmox VE: sends API requests
- VM Metrics Poller → Application Database: records metrics (evidence: `backend/services/proxmox_iops_poller.py`)
- Remote Connect API → JWT and Roles: checks access (evidence: `backend/routers/guac.py`)
- Remote Connect API → Guacamole Sync: manages connections
- Remote Connect API → Application Database: reads credentials (evidence: `backend/routers/guac.py`)
- Guacamole Sync → Apache Guacamole: synchronizes accounts (evidence: `backend/services/guac_sync.py`)
- Remote Connect API → Apache Guacamole: creates remote sessions
- Open Web Proxy → Application Database: reads session data
- Open Web Proxy → Proxmox VE: proxies private app
- Ticket Service → JWT and Roles: checks access (evidence: `backend/routers/tickets.py`)
- Ticket Service → Application Database: reads and writes (evidence: `backend/routers/tickets.py`)
- Ticket Service → Activity Audit: records activity (evidence: `backend/routers/tickets.py`)
- VM Request Service → JWT and Roles: checks access (evidence: `backend/routers/infra_requests.py`)
- VM Request Service → Application Database: reads and writes (evidence: `backend/routers/infra_requests.py`)
- SSH Credentials and Bastion → JWT and Roles: checks access (evidence: `backend/routers/ssh_creds.py`)
- SSH Credentials and Bastion → Application Database: stores credentials (evidence: `backend/routers/ssh_creds.py`)
- SSH Credentials and Bastion → SSH Operations: tests SSH (evidence: `backend/routers/ssh_creds.py`)
- SSH Key Access → Application Database: stores keys (evidence: `backend/routers/ssh_keys.py`)
