# nanaminato/relaxkonos architecture

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

- Interactive diagram: https://gitdiagram.com/nanaminato/relaxkonos
- Repository: https://github.com/nanaminato/relaxkonos

## Overview

RelaxKonOS is a cross-platform remote desktop environment for managing server workloads and host services from desktop and Android clients. Users connect and authenticate, then manage files, terminals, applications, and server operations; the server performs remote work and returns state rather than streaming screen pixels. The desktop also has an application runtime and window manager. README statements support the broad client/server and feature relationships; sampled source confirms window creation, task-plan preview, Docker host actions, and storage setup, but not every feature’s wiring.

Main entry points: [`Shared/RelaxKonOS.Protocol/ApplicationDeployments/ApplicationDeploymentApiRoutes.cs`](https://github.com/nanaminato/relaxkonos/blob/master/Shared/RelaxKonOS.Protocol/ApplicationDeployments/ApplicationDeploymentApiRoutes.cs) (REST and SignalR), [`Client/RelaxKonOS.Client.Desktop/Program.cs`](https://github.com/nanaminato/relaxkonos/blob/master/Client/RelaxKonOS.Client.Desktop/Program.cs) (Desktop client), [`Client/RelaxKonOS.Client.Android/app/src/main/java/app/relaxkonos/mobile/AppContainer.kt`](https://github.com/nanaminato/relaxkonos/blob/master/Client/RelaxKonOS.Client.Android/app/src/main/java/app/relaxkonos/mobile/AppContainer.kt) (Android client), [`Framework/RelaxKonOS.Runtime/ApplicationManager.cs`](https://github.com/nanaminato/relaxkonos/blob/master/Framework/RelaxKonOS.Runtime/ApplicationManager.cs) (Application runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Client experiences"]
  node_desktop_client["Desktop client<br/>[Program.cs]"]
  node_android_client["Android client<br/>[AppContainer.kt]"]
end

subgraph group_desktop["Desktop runtime"]
  node_window_manager["Window manager<br/>[WindowManager.cs]"]
  node_application_runtime["Application runtime"]
  node_app_context["App SDK context<br/>[AppContext.cs]"]
end

subgraph group_server["Server capabilities"]
  node_auth["Login and identity"]
  node_protocol["REST and SignalR"]
  node_docker["Docker operations"]
  node_deployments["App deployments"]
  node_files["Remote files"]
  node_certificates["Certificates"]
  node_web_servers["Web servers"]
  node_proxy["Proxy engines<br/>[MihomoEngine.cs]"]
  node_task_preview["Task planning"]
end

subgraph group_state["Persistence and host"]
  node_storage[("Server storage<br/>[StorageStartup.cs]")]
  node_docker_host["Docker host control"]
  node_helper["Privileged helper"]
end

node_user(("User"))

node_user -->|"uses"| node_desktop_client
node_user -->|"uses"| node_android_client
node_desktop_client -->|"authenticates"| node_auth
node_android_client -->|"authenticates"| node_auth
node_desktop_client -->|"sends operations"| node_protocol
node_android_client -->|"sends operations"| node_protocol
node_protocol -.->|"routes operations"| node_docker
node_protocol -.->|"routes operations"| node_deployments
node_protocol -.->|"routes operations"| node_files
node_protocol -.->|"routes operations"| node_certificates
node_protocol -.->|"routes operations"| node_web_servers
node_protocol -.->|"routes operations"| node_proxy
node_desktop_client -->|"hosts apps"| node_application_runtime
node_application_runtime -->|"provides context"| node_app_context
node_app_context -->|"creates windows"| node_window_manager
node_desktop_client -->|"uses shell windows"| node_window_manager
node_desktop_client -->|"requests preview"| node_task_preview
node_task_preview -.->|"reads runtime state"| node_storage
node_storage -.->|"stores operation state"| node_docker
node_docker_host -->|"dispatches host action"| node_helper

click node_desktop_client "https://github.com/nanaminato/relaxkonos/blob/master/Client/RelaxKonOS.Client.Desktop/Program.cs"
click node_android_client "https://github.com/nanaminato/relaxkonos/blob/master/Client/RelaxKonOS.Client.Android/app/src/main/java/app/relaxkonos/mobile/AppContainer.kt"
click node_auth "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Identity/LoginAuthenticationService.cs"
click node_protocol "https://github.com/nanaminato/relaxkonos/blob/master/Shared/RelaxKonOS.Protocol/ApplicationDeployments/ApplicationDeploymentApiRoutes.cs"
click node_window_manager "https://github.com/nanaminato/relaxkonos/blob/master/Framework/RelaxKonOS.WindowManager/WindowManager.cs"
click node_application_runtime "https://github.com/nanaminato/relaxkonos/blob/master/Framework/RelaxKonOS.Runtime/ApplicationManager.cs"
click node_app_context "https://github.com/nanaminato/relaxkonos/blob/master/Framework/RelaxKonOS.App.SDK/AppContext.cs"
click node_docker "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Docker/DockerCliEngineService.cs"
click node_deployments "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/ApplicationDeployments/ApplicationDeploymentManager.cs"
click node_files "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/FileServices/FileServiceManager.cs"
click node_certificates "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Certificate/CertificateManager.cs"
click node_web_servers "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/WebServer/NginxWebServerManager.Installation.cs"
click node_proxy "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Proxy/Mihomo/MihomoEngine.cs"
click node_task_preview "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/TaskOrchestration/RuntimeTaskPreviewService.cs"
click node_storage "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Startup/StorageStartup.cs"
click node_docker_host "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Docker/DockerEngineHostController.cs"
click node_helper "https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.PrivilegedHelper/LinuxFrpServiceManager.cs"

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_desktop_client,node_android_client,node_user toneBlue
class node_window_manager,node_application_runtime,node_app_context toneAmber
class node_auth,node_protocol,node_docker,node_deployments,node_files,node_certificates,node_web_servers,node_proxy,node_task_preview toneMint
class node_storage,node_docker_host,node_helper toneRose
```

## Components

### Client experiences

- [Desktop client](https://github.com/nanaminato/relaxkonos/blob/master/Client/RelaxKonOS.Client.Desktop/Program.cs): `Client/RelaxKonOS.Client.Desktop/Program.cs`
- [Android client](https://github.com/nanaminato/relaxkonos/blob/master/Client/RelaxKonOS.Client.Android/app/src/main/java/app/relaxkonos/mobile/AppContainer.kt): `Client/RelaxKonOS.Client.Android/app/src/main/java/app/relaxkonos/mobile/AppContainer.kt`

### Desktop runtime

- [Window manager](https://github.com/nanaminato/relaxkonos/blob/master/Framework/RelaxKonOS.WindowManager/WindowManager.cs): `Framework/RelaxKonOS.WindowManager/WindowManager.cs`
- [Application runtime](https://github.com/nanaminato/relaxkonos/blob/master/Framework/RelaxKonOS.Runtime/ApplicationManager.cs): `Framework/RelaxKonOS.Runtime/ApplicationManager.cs`
- [App SDK context](https://github.com/nanaminato/relaxkonos/blob/master/Framework/RelaxKonOS.App.SDK/AppContext.cs): `Framework/RelaxKonOS.App.SDK/AppContext.cs`

### Server capabilities

- [Login and identity](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Identity/LoginAuthenticationService.cs): `RelaxKonOS.Server/Identity/LoginAuthenticationService.cs`
- [REST and SignalR](https://github.com/nanaminato/relaxkonos/blob/master/Shared/RelaxKonOS.Protocol/ApplicationDeployments/ApplicationDeploymentApiRoutes.cs): `Shared/RelaxKonOS.Protocol/ApplicationDeployments/ApplicationDeploymentApiRoutes.cs`
- [Docker operations](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Docker/DockerCliEngineService.cs): `RelaxKonOS.Server/Docker/DockerCliEngineService.cs`
- [App deployments](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/ApplicationDeployments/ApplicationDeploymentManager.cs): `RelaxKonOS.Server/ApplicationDeployments/ApplicationDeploymentManager.cs`
- [Remote files](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/FileServices/FileServiceManager.cs): `RelaxKonOS.Server/FileServices/FileServiceManager.cs`
- [Certificates](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Certificate/CertificateManager.cs): `RelaxKonOS.Server/Certificate/CertificateManager.cs`
- [Web servers](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/WebServer/NginxWebServerManager.Installation.cs): `RelaxKonOS.Server/WebServer/NginxWebServerManager.Installation.cs`
- [Proxy engines](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Proxy/Mihomo/MihomoEngine.cs): `RelaxKonOS.Server/Proxy/Mihomo/MihomoEngine.cs`
- [Task planning](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/TaskOrchestration/RuntimeTaskPreviewService.cs): `RelaxKonOS.Server/TaskOrchestration/RuntimeTaskPreviewService.cs`

### Persistence and host

- [Server storage](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Startup/StorageStartup.cs): `RelaxKonOS.Server/Startup/StorageStartup.cs`
- [Docker host control](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.Server/Docker/DockerEngineHostController.cs): `RelaxKonOS.Server/Docker/DockerEngineHostController.cs`
- [Privileged helper](https://github.com/nanaminato/relaxkonos/blob/master/RelaxKonOS.PrivilegedHelper/LinuxFrpServiceManager.cs): `RelaxKonOS.PrivilegedHelper/LinuxFrpServiceManager.cs`

### Other components

- **User**

## Connections

- User → Desktop client: uses
- User → Android client: uses
- Desktop client → Login and identity: authenticates
- Android client → Login and identity: authenticates
- Desktop client → REST and SignalR: sends operations
- Android client → REST and SignalR: sends operations
- REST and SignalR → Docker operations: routes operations
- REST and SignalR → App deployments: routes operations
- REST and SignalR → Remote files: routes operations
- REST and SignalR → Certificates: routes operations
- REST and SignalR → Web servers: routes operations
- REST and SignalR → Proxy engines: routes operations
- Desktop client → Application runtime: hosts apps
- Application runtime → App SDK context: provides context (evidence: `Framework/RelaxKonOS.Runtime/ApplicationManager.cs`)
- App SDK context → Window manager: creates windows (evidence: `Framework/RelaxKonOS.App.SDK/AppContext.cs`)
- Desktop client → Window manager: uses shell windows
- Desktop client → Task planning: requests preview
- Task planning → Server storage: reads runtime state
- Server storage → Docker operations: stores operation state
- Docker host control → Privileged helper: dispatches host action (evidence: `RelaxKonOS.Server/Docker/DockerEngineHostController.cs`)
