# mu-zi-lee/yunx-docker architecture

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

- Interactive diagram: https://gitdiagram.com/mu-zi-lee/yunx-docker
- Repository: https://github.com/mu-zi-lee/yunx-docker

## Overview

YunX Docker Web is a browser-based cloud-drive workspace built on the desktop project’s shared protocol, persistence, and download code. The main workflow is browser login, account setup, browsing or resolving cloud files, then creating server-side download tasks that persist and write to the mounted download directory. The graph also retains GitHub/share-link handling, bookmarks and history, and settings. Relationships are limited to README-documented behavior and the shown ServerService excerpt or SOURCE INDEX references; unsampled routes and wiring are not asserted.

Main entry points: [`server/src/main/kotlin/com/yunx/server/ServerService.kt`](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/ServerService.kt) (Workspace API), [`desktop/src/main/kotlin/com/yunx/app/data/download/DownloadManager.kt`](https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/download/DownloadManager.kt) (Download Tasks), [`server/src/main/resources/web/app.js`](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/resources/web/app.js) (Web Interface), [`server/src/main/kotlin/com/yunx/server/Main.kt`](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/Main.kt) (HTTP Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Workspace"]
  node_webui["Web Interface<br/>[app.js]"]
  node_http["HTTP Server<br/>[Main.kt]"]
  node_auth["Login And Passwords<br/>[LoginAuth.kt]"]
  node_settings["Web Settings<br/>[app.js]"]
end

subgraph group_domain["Cloud Operations"]
  node_service["Workspace API<br/>[ServerService.kt]"]
  node_accounts["Account Management<br/>[ServerService.kt]"]
  node_cloud["Cloud Drive Access<br/>[ServerService.kt]"]
  node_resolve["Share Resolution"]
  node_github["GitHub Browsing<br/>[GitHubBrowser.kt]"]
  node_links["Bookmarks And History<br/>[ServerService.kt]"]
end

subgraph group_runtime["Server Runtime"]
  node_credentials["Encrypted Credentials<br/>[Credentials.kt]"]
  node_apis["Cloud Platform APIs<br/>[QuarkApi.kt]"]
  node_httpclients["HTTP Clients<br/>[HttpClients.kt]"]
  node_context["App Data Context<br/>[AppContext.kt]"]
end

subgraph group_storage["Persistence And Downloads"]
  node_database[("Application Database<br/>[AppDatabase.kt]")]
  node_downloads["Download Tasks<br/>[DownloadManager.kt]"]
  node_chunks["Resumable Downloader<br/>[ChunkDownloader.kt]"]
  node_downloadfiles[("Mounted Download Files")]
end

node_user(("Browser User"))
node_cloudservices{{"Cloud Providers"}}

node_user -->|"uses"| node_webui
node_webui -->|"sends requests"| node_http
node_http -->|"routes login"| node_auth
node_http -->|"dispatches requests"| node_service
node_service -->|"reads and saves"| node_credentials
node_service -->|"calls platform APIs"| node_apis
node_service -->|"uses resolver"| node_resolve
node_service -->|"uses browser"| node_github
node_service -->|"stores link data"| node_database
node_service -->|"manages tasks"| node_downloads
node_cloud -.->|"requests cloud data"| node_cloudservices
node_resolve -.->|"uses platform APIs"| node_apis
node_apis -.->|"uses clients"| node_httpclients
node_context -->|"provides data paths"| node_database
node_downloads -->|"downloads chunks"| node_chunks
node_downloads -->|"persists task state"| node_database
node_downloads -->|"writes files"| node_downloadfiles
node_webui -->|"edits settings"| node_settings

click node_webui "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/resources/web/app.js"
click node_http "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/Main.kt"
click node_auth "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/LoginAuth.kt"
click node_service "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/ServerService.kt"
click node_accounts "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/ServerService.kt"
click node_cloud "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/ServerService.kt"
click node_resolve "https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/repository/ShareResolveRepository.kt"
click node_github "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/GitHubBrowser.kt"
click node_links "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/ServerService.kt"
click node_credentials "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/Credentials.kt"
click node_apis "https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/network/QuarkApi.kt"
click node_httpclients "https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/network/HttpClients.kt"
click node_context "https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/AppContext.kt"
click node_settings "https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/resources/web/app.js"
click node_database "https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/db/AppDatabase.kt"
click node_downloads "https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/download/DownloadManager.kt"
click node_chunks "https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/download/ChunkDownloader.kt"

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_webui,node_http,node_auth,node_settings,node_user toneBlue
class node_service,node_accounts,node_cloud,node_resolve,node_github,node_links toneAmber
class node_credentials,node_apis,node_httpclients,node_context toneMint
class node_database,node_downloads,node_chunks,node_downloadfiles toneRose
class node_cloudservices toneIndigo
```

## Components

### Web Workspace

- [Web Interface](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/resources/web/app.js): `server/src/main/resources/web/app.js`
- [HTTP Server](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/Main.kt): `server/src/main/kotlin/com/yunx/server/Main.kt`
- [Login And Passwords](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/LoginAuth.kt): `server/src/main/kotlin/com/yunx/server/LoginAuth.kt`
- [Web Settings](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/resources/web/app.js): `server/src/main/resources/web/app.js`

### Cloud Operations

- [Workspace API](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/ServerService.kt): `server/src/main/kotlin/com/yunx/server/ServerService.kt`
- [Account Management](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/ServerService.kt): `server/src/main/kotlin/com/yunx/server/ServerService.kt`
- [Cloud Drive Access](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/ServerService.kt): `server/src/main/kotlin/com/yunx/server/ServerService.kt`
- [Share Resolution](https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/repository/ShareResolveRepository.kt): `desktop/src/main/kotlin/com/yunx/app/data/repository/ShareResolveRepository.kt`
- [GitHub Browsing](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/GitHubBrowser.kt): `server/src/main/kotlin/com/yunx/server/GitHubBrowser.kt`
- [Bookmarks And History](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/ServerService.kt): `server/src/main/kotlin/com/yunx/server/ServerService.kt`

### Server Runtime

- [Encrypted Credentials](https://github.com/mu-zi-lee/yunx-docker/blob/main/server/src/main/kotlin/com/yunx/server/Credentials.kt): `server/src/main/kotlin/com/yunx/server/Credentials.kt`
- [Cloud Platform APIs](https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/network/QuarkApi.kt): `desktop/src/main/kotlin/com/yunx/app/data/network/QuarkApi.kt`
- [HTTP Clients](https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/network/HttpClients.kt): `desktop/src/main/kotlin/com/yunx/app/data/network/HttpClients.kt`
- [App Data Context](https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/AppContext.kt): `desktop/src/main/kotlin/com/yunx/app/AppContext.kt`

### Persistence And Downloads

- [Application Database](https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/db/AppDatabase.kt): `desktop/src/main/kotlin/com/yunx/app/data/db/AppDatabase.kt`
- [Download Tasks](https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/download/DownloadManager.kt): `desktop/src/main/kotlin/com/yunx/app/data/download/DownloadManager.kt`
- [Resumable Downloader](https://github.com/mu-zi-lee/yunx-docker/blob/main/desktop/src/main/kotlin/com/yunx/app/data/download/ChunkDownloader.kt): `desktop/src/main/kotlin/com/yunx/app/data/download/ChunkDownloader.kt`
- **Mounted Download Files**

### Other components

- **Browser User**
- **Cloud Providers**

## Connections

- Browser User → Web Interface: uses (evidence: `README.md`)
- Web Interface → HTTP Server: sends requests (evidence: `README.md`)
- HTTP Server → Login And Passwords: routes login (evidence: `server/src/main/kotlin/com/yunx/server/Main.kt`)
- HTTP Server → Workspace API: dispatches requests (evidence: `server/src/main/kotlin/com/yunx/server/Main.kt`)
- Workspace API → Encrypted Credentials: reads and saves (evidence: `server/src/main/kotlin/com/yunx/server/ServerService.kt`)
- Workspace API → Cloud Platform APIs: calls platform APIs (evidence: `server/src/main/kotlin/com/yunx/server/ServerService.kt`)
- Workspace API → Share Resolution: uses resolver (evidence: `server/src/main/kotlin/com/yunx/server/ServerService.kt`)
- Workspace API → GitHub Browsing: uses browser (evidence: `server/src/main/kotlin/com/yunx/server/ServerService.kt`)
- Workspace API → Application Database: stores link data (evidence: `server/src/main/kotlin/com/yunx/server/ServerService.kt`)
- Workspace API → Download Tasks: manages tasks (evidence: `server/src/main/kotlin/com/yunx/server/ServerService.kt`)
- Cloud Drive Access → Cloud Providers: requests cloud data
- Share Resolution → Cloud Platform APIs: uses platform APIs
- Cloud Platform APIs → HTTP Clients: uses clients
- App Data Context → Application Database: provides data paths (evidence: `desktop/src/main/kotlin/com/yunx/app/AppContext.kt`)
- Download Tasks → Resumable Downloader: downloads chunks (evidence: `desktop/src/main/kotlin/com/yunx/app/data/download/DownloadManager.kt`)
- Download Tasks → Application Database: persists task state (evidence: `desktop/src/main/kotlin/com/yunx/app/data/download/DownloadManager.kt`)
- Download Tasks → Mounted Download Files: writes files (evidence: `README.md`)
- Web Interface → Web Settings: edits settings (evidence: `README.md`)
