# winboat-org/winboat architecture

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

- Interactive diagram: https://gitdiagram.com/winboat-org/winboat
- Repository: https://github.com/winboat-org/winboat

## Overview

WinBoat is an Electron desktop application for installing and operating Windows in a Docker or Podman container, then exposing Windows apps as Linux desktop windows or opening the full desktop over RDP. The main workflow runs from setup and configuration through container management, guest-server communication, and app/desktop access; USB passthrough and guest-server updating are supporting capabilities. Relationships are limited to README statements and SOURCE INDEX references; unsampled implementations are represented only at paths supported by the tree.

Main entry points: [`src/renderer/lib/winboat.ts`](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/winboat.ts) (Runtime coordinator), [`src/renderer/router.ts`](https://github.com/winboat-org/winboat/blob/main/src/renderer/router.ts) (Screen router), [`src/renderer/App.vue`](https://github.com/winboat-org/winboat/blob/main/src/renderer/App.vue) (App shell), [`src/renderer/lib/install.ts`](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/install.ts) (Installer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop UI"]
  node_app["Electron shell<br/>[main.ts]"]
  node_app_ui["App shell<br/>[App.vue]"]
  node_router["Screen router<br/>[router.ts]"]
  node_home["Dashboard<br/>[Home.vue]"]
  node_setup_ui["Install wizard<br/>[SetupUI.vue]"]
  node_apps_ui["Windows apps<br/>[Apps.vue]"]
  node_config_ui["Configuration UI<br/>[Config.vue]"]
  node_migration_ui["Migration screen<br/>[Migration.vue]"]
end

subgraph group_setup["Setup and State"]
  node_installer["Installer<br/>[install.ts]"]
  node_config[("Persistent config<br/>[config.ts]")]
  node_specs["Install specs<br/>[specs.ts]"]
end

subgraph group_runtime["Windows Runtime"]
  node_winboat["Runtime coordinator<br/>[winboat.ts]"]
  node_container_api["Container dispatch<br/>[common.ts]"]
  node_container_base["Container manager<br/>[container.ts]"]
  node_docker["Docker backend<br/>[docker.ts]"]
  node_podman["Podman backend<br/>[podman.ts]"]
end

subgraph group_integration["Host Integration"]
  node_usb["USB passthrough<br/>[usbmanager.ts]"]
  node_rdp["FreeRDP integration<br/>[getFreeRDP.ts]"]
end

subgraph group_guest["Guest Services"]
  node_guest_client["Guest API client<br/>[guestServer.ts]"]
  node_guest_server["Guest server<br/>[main.go]"]
  node_updater["Guest updater<br/>[main.go]"]
end

node_user(("Linux user"))
node_windows["Windows VM"]
node_container_runtime["Docker / Podman"]

node_user -->|"opens"| node_app
node_app -.->|"hosts"| node_app_ui
node_app_ui -->|"uses routes"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_setup_ui
node_router -->|"routes to"| node_apps_ui
node_router -->|"routes to"| node_config_ui
node_router -->|"routes to"| node_migration_ui
node_app_ui -->|"checks install"| node_installer
node_app_ui -->|"runs migrations"| node_migration_ui
node_setup_ui -->|"reads specs"| node_specs
node_setup_ui -->|"starts install"| node_installer
node_installer -->|"persists settings"| node_config
node_installer -->|"selects runtime"| node_container_api
node_container_api -->|"dispatches"| node_docker
node_container_api -->|"dispatches"| node_podman
node_docker -->|"implements"| node_container_base
node_podman -.->|"implements"| node_container_base
node_container_base -.->|"controls"| node_container_runtime
node_container_runtime -->|"runs VM"| node_windows
node_home -->|"reads status"| node_winboat
node_apps_ui -->|"manages apps"| node_winboat
node_config_ui -.->|"edits settings"| node_config
node_winboat -->|"reads settings"| node_config
node_winboat -->|"controls runtime"| node_container_api
node_winboat -->|"calls guest API"| node_guest_client
node_guest_client -->|"HTTP requests"| node_guest_server
node_guest_server -->|"retrieves data"| node_windows
node_winboat -->|"requests updates"| node_updater
node_winboat -->|"uses FreeRDP"| node_rdp
node_rdp -->|"RemoteApp / RDP"| node_windows
node_winboat -->|"coordinates passthrough"| node_usb
node_usb -.->|"passes devices"| node_windows

click node_app "https://github.com/winboat-org/winboat/blob/main/src/main/main.ts"
click node_app_ui "https://github.com/winboat-org/winboat/blob/main/src/renderer/App.vue"
click node_router "https://github.com/winboat-org/winboat/blob/main/src/renderer/router.ts"
click node_home "https://github.com/winboat-org/winboat/blob/main/src/renderer/views/Home.vue"
click node_setup_ui "https://github.com/winboat-org/winboat/blob/main/src/renderer/views/SetupUI.vue"
click node_apps_ui "https://github.com/winboat-org/winboat/blob/main/src/renderer/views/Apps.vue"
click node_config_ui "https://github.com/winboat-org/winboat/blob/main/src/renderer/views/Config.vue"
click node_migration_ui "https://github.com/winboat-org/winboat/blob/main/src/renderer/views/Migration.vue"
click node_installer "https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/install.ts"
click node_config "https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/config.ts"
click node_specs "https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/specs.ts"
click node_winboat "https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/winboat.ts"
click node_container_api "https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/containers/common.ts"
click node_container_base "https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/containers/container.ts"
click node_docker "https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/containers/docker.ts"
click node_podman "https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/containers/podman.ts"
click node_guest_client "https://github.com/winboat-org/winboat/blob/main/src/renderer/utils/guestServer.ts"
click node_guest_server "https://github.com/winboat-org/winboat/blob/main/guest_server/cmd/server/main.go"
click node_updater "https://github.com/winboat-org/winboat/blob/main/guest_server/cmd/updater/main.go"
click node_usb "https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/usbmanager.ts"
click node_rdp "https://github.com/winboat-org/winboat/blob/main/src/renderer/utils/getFreeRDP.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_app,node_app_ui,node_router,node_home,node_setup_ui,node_apps_ui,node_config_ui,node_migration_ui,node_user toneBlue
class node_installer,node_config,node_specs toneAmber
class node_winboat,node_container_api,node_container_base,node_docker,node_podman toneMint
class node_usb,node_rdp toneRose
class node_guest_client,node_guest_server,node_updater,node_windows,node_container_runtime toneIndigo
```

## Components

### Desktop UI

- [Electron shell](https://github.com/winboat-org/winboat/blob/main/src/main/main.ts): `src/main/main.ts`
- [App shell](https://github.com/winboat-org/winboat/blob/main/src/renderer/App.vue): `src/renderer/App.vue`
- [Screen router](https://github.com/winboat-org/winboat/blob/main/src/renderer/router.ts): `src/renderer/router.ts`
- [Dashboard](https://github.com/winboat-org/winboat/blob/main/src/renderer/views/Home.vue): `src/renderer/views/Home.vue`
- [Install wizard](https://github.com/winboat-org/winboat/blob/main/src/renderer/views/SetupUI.vue): `src/renderer/views/SetupUI.vue`
- [Windows apps](https://github.com/winboat-org/winboat/blob/main/src/renderer/views/Apps.vue): `src/renderer/views/Apps.vue`
- [Configuration UI](https://github.com/winboat-org/winboat/blob/main/src/renderer/views/Config.vue): `src/renderer/views/Config.vue`
- [Migration screen](https://github.com/winboat-org/winboat/blob/main/src/renderer/views/Migration.vue): `src/renderer/views/Migration.vue`

### Setup and State

- [Installer](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/install.ts): `src/renderer/lib/install.ts`
- [Persistent config](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/config.ts): `src/renderer/lib/config.ts`
- [Install specs](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/specs.ts): `src/renderer/lib/specs.ts`

### Windows Runtime

- [Runtime coordinator](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/winboat.ts): `src/renderer/lib/winboat.ts`
- [Container dispatch](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/containers/common.ts): `src/renderer/lib/containers/common.ts`
- [Container manager](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/containers/container.ts): `src/renderer/lib/containers/container.ts`
- [Docker backend](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/containers/docker.ts): `src/renderer/lib/containers/docker.ts`
- [Podman backend](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/containers/podman.ts): `src/renderer/lib/containers/podman.ts`

### Host Integration

- [USB passthrough](https://github.com/winboat-org/winboat/blob/main/src/renderer/lib/usbmanager.ts): `src/renderer/lib/usbmanager.ts`
- [FreeRDP integration](https://github.com/winboat-org/winboat/blob/main/src/renderer/utils/getFreeRDP.ts): `src/renderer/utils/getFreeRDP.ts`

### Guest Services

- [Guest API client](https://github.com/winboat-org/winboat/blob/main/src/renderer/utils/guestServer.ts): `src/renderer/utils/guestServer.ts`
- [Guest server](https://github.com/winboat-org/winboat/blob/main/guest_server/cmd/server/main.go): `guest_server/cmd/server/main.go`
- [Guest updater](https://github.com/winboat-org/winboat/blob/main/guest_server/cmd/updater/main.go): `guest_server/cmd/updater/main.go`

### Other components

- **Linux user**
- **Windows VM**
- **Docker / Podman**

## Connections

- Linux user → Electron shell: opens (evidence: `README.md`)
- Electron shell → App shell: hosts
- App shell → Screen router: uses routes (evidence: `src/renderer/App.vue`)
- Screen router → Dashboard: routes to (evidence: `src/renderer/router.ts`)
- Screen router → Install wizard: routes to (evidence: `src/renderer/router.ts`)
- Screen router → Windows apps: routes to (evidence: `src/renderer/router.ts`)
- Screen router → Configuration UI: routes to (evidence: `src/renderer/router.ts`)
- Screen router → Migration screen: routes to (evidence: `src/renderer/router.ts`)
- App shell → Installer: checks install (evidence: `src/renderer/App.vue`)
- App shell → Migration screen: runs migrations (evidence: `src/renderer/App.vue`)
- Install wizard → Install specs: reads specs (evidence: `src/renderer/views/SetupUI.vue`)
- Install wizard → Installer: starts install (evidence: `src/renderer/views/SetupUI.vue`)
- Installer → Persistent config: persists settings (evidence: `src/renderer/lib/install.ts`)
- Installer → Container dispatch: selects runtime (evidence: `src/renderer/lib/install.ts`)
- Container dispatch → Docker backend: dispatches (evidence: `src/renderer/lib/containers/common.ts`)
- Container dispatch → Podman backend: dispatches (evidence: `src/renderer/lib/containers/common.ts`)
- Docker backend → Container manager: implements (evidence: `src/renderer/lib/containers/docker.ts`)
- Podman backend → Container manager: implements
- Container manager → Docker / Podman: controls
- Docker / Podman → Windows VM: runs VM (evidence: `README.md`)
- Dashboard → Runtime coordinator: reads status (evidence: `src/renderer/views/Home.vue`)
- Windows apps → Runtime coordinator: manages apps (evidence: `src/renderer/views/Apps.vue`)
- Configuration UI → Persistent config: edits settings
- Runtime coordinator → Persistent config: reads settings (evidence: `src/renderer/lib/winboat.ts`)
- Runtime coordinator → Container dispatch: controls runtime (evidence: `src/renderer/lib/winboat.ts`)
- Runtime coordinator → Guest API client: calls guest API (evidence: `src/renderer/lib/winboat.ts`)
- Guest API client → Guest server: HTTP requests (evidence: `README.md`)
- Guest server → Windows VM: retrieves data (evidence: `README.md`)
- Runtime coordinator → Guest updater: requests updates (evidence: `README.md`)
- Runtime coordinator → FreeRDP integration: uses FreeRDP (evidence: `src/renderer/lib/winboat.ts`)
- FreeRDP integration → Windows VM: RemoteApp / RDP (evidence: `README.md`)
- Runtime coordinator → USB passthrough: coordinates passthrough (evidence: `src/renderer/lib/winboat.ts`)
- USB passthrough → Windows VM: passes devices
