# totblabs/multitap architecture

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

- Interactive diagram: https://gitdiagram.com/totblabs/multitap
- Repository: https://github.com/totblabs/multitap

## Overview

Multitap is self-hosted VDI for Proxmox VE: an administrator connects Proxmox, installs the Windows Host on desktops, and assigns desktops to people. A user signs in with the Windows or Android app, selects an assigned desktop, and streams through the server they run. The Host captures and encodes desktop media; the client decodes and presents it. Supporting capabilities include account security, desktop management, clipboard and device redirection, monitoring, updates, and Proxmox console access. The README documents the product-level flows; several implementation links below are therefore shown at subsystem level.

Main entry points: [`server/src/index.mjs`](https://github.com/totblabs/multitap/blob/main/server/src/index.mjs) (Session broker), [`apps/windows_client/windows/runner/remote_engine.cpp`](https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/remote_engine.cpp) (Windows app), [`server/admin/app.js`](https://github.com/totblabs/multitap/blob/main/server/admin/app.js) (Admin console), [`apps/windows_client/android/app/src/main/kotlin/me/totb/multitap_client/MainActivity.kt`](https://github.com/totblabs/multitap/blob/main/apps/windows_client/android/app/src/main/kotlin/me/totb/multitap_client/MainActivity.kt) (Android app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Server and administration"]
  node_admin["Admin console<br/>[app.js]"]
  node_mfa["Account security"]
  node_broker["Session broker<br/>[index.mjs]"]
  node_backup["Database backup"]
  node_server_update["Server updates<br/>[engine.mjs]"]
end

subgraph group_desktop["Host and desktop"]
  node_host["Windows Host<br/>[main.cpp]"]
  node_capture_encode["Capture and encode<br/>[media.cpp]"]
  node_host_display["Virtual displays<br/>[display.cpp]"]
end

subgraph group_windows["Windows client"]
  node_client_app["Windows app<br/>[remote_engine.cpp]"]
  node_client_tracks["Multi-screen media"]
  node_clipboard["Clipboard transfer<br/>[clipboard.cpp]"]
  node_drive["Shared folders<br/>[drive_channel.cpp]"]
  node_printing["Printing<br/>[client_print.cpp]"]
  node_usb["USB redirection<br/>[usb_capture.cpp]"]
end

subgraph group_android["Android client"]
  node_android_app["Android app<br/>[MainActivity.kt]"]
  node_android_media["Android media<br/>[AndroidMedia.kt]"]
end

subgraph group_integrations["External systems"]
  node_proxmox(("Proxmox VE"))
  node_vm(("Windows desktop"))
  node_release_service(("Release service"))
end

node_people(("People"))

node_people -->|"administer"| node_admin
node_admin -->|"manage sign-in"| node_mfa
node_admin -->|"manage desktops"| node_broker
node_admin -->|"control VMs"| node_proxmox
node_proxmox -->|"run desktops"| node_vm
node_host -->|"connect outbound"| node_broker
node_host -.->|"capture and encode"| node_capture_encode
node_host -->|"use displays"| node_host_display
node_people -->|"select desktop"| node_client_app
node_people -->|"select desktop"| node_android_app
node_client_app -->|"connect session"| node_broker
node_android_app -->|"connect session"| node_broker
node_broker -->|"relay media"| node_client_app
node_broker -->|"relay media"| node_android_app
node_capture_encode -->|"send media"| node_broker
node_client_app -.->|"present tracks"| node_client_tracks
node_client_app -->|"transfer clipboard"| node_clipboard
node_client_app -->|"redirect folders"| node_drive
node_client_app -->|"redirect printing"| node_printing
node_client_app -->|"redirect USB"| node_usb
node_android_app -.->|"present media"| node_android_media
node_broker -.->|"back up data"| node_backup
node_broker -.->|"update server"| node_server_update
node_release_service -->|"provide updates"| node_server_update

click node_admin "https://github.com/totblabs/multitap/blob/main/server/admin/app.js"
click node_mfa "https://github.com/totblabs/multitap/blob/main/server/admin/js/account-security-controller.js"
click node_broker "https://github.com/totblabs/multitap/blob/main/server/src/index.mjs"
click node_backup "https://github.com/totblabs/multitap/blob/main/server/src/backup-database.mjs"
click node_server_update "https://github.com/totblabs/multitap/blob/main/server/update/engine.mjs"
click node_host "https://github.com/totblabs/multitap/blob/main/apps/windows_host/src/main.cpp"
click node_capture_encode "https://github.com/totblabs/multitap/blob/main/apps/windows_host/src/media.cpp"
click node_host_display "https://github.com/totblabs/multitap/blob/main/drivers/virtual_display/display.cpp"
click node_client_app "https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/remote_engine.cpp"
click node_client_tracks "https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/remote_track_engine.cpp"
click node_clipboard "https://github.com/totblabs/multitap/blob/main/native/windows_clipboard/clipboard.cpp"
click node_drive "https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/drive_channel.cpp"
click node_printing "https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/client_print.cpp"
click node_usb "https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/usb_capture.cpp"
click node_android_app "https://github.com/totblabs/multitap/blob/main/apps/windows_client/android/app/src/main/kotlin/me/totb/multitap_client/MainActivity.kt"
click node_android_media "https://github.com/totblabs/multitap/blob/main/apps/windows_client/android/app/src/main/kotlin/me/totb/multitap_client/AndroidMedia.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_admin,node_mfa,node_broker,node_backup,node_server_update toneBlue
class node_host,node_capture_encode,node_host_display toneAmber
class node_client_app,node_client_tracks,node_clipboard,node_drive,node_printing,node_usb toneMint
class node_android_app,node_android_media toneRose
class node_proxmox,node_vm,node_release_service,node_people toneIndigo
```

## Components

### Server and administration

- [Admin console](https://github.com/totblabs/multitap/blob/main/server/admin/app.js): `server/admin/app.js`
- [Account security](https://github.com/totblabs/multitap/blob/main/server/admin/js/account-security-controller.js): `server/admin/js/account-security-controller.js`
- [Session broker](https://github.com/totblabs/multitap/blob/main/server/src/index.mjs): `server/src/index.mjs`
- [Database backup](https://github.com/totblabs/multitap/blob/main/server/src/backup-database.mjs): `server/src/backup-database.mjs`
- [Server updates](https://github.com/totblabs/multitap/blob/main/server/update/engine.mjs): `server/update/engine.mjs`

### Host and desktop

- [Windows Host](https://github.com/totblabs/multitap/blob/main/apps/windows_host/src/main.cpp): `apps/windows_host/src/main.cpp`
- [Capture and encode](https://github.com/totblabs/multitap/blob/main/apps/windows_host/src/media.cpp): `apps/windows_host/src/media.cpp`
- [Virtual displays](https://github.com/totblabs/multitap/blob/main/drivers/virtual_display/display.cpp): `drivers/virtual_display/display.cpp`

### Windows client

- [Windows app](https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/remote_engine.cpp): `apps/windows_client/windows/runner/remote_engine.cpp`
- [Multi-screen media](https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/remote_track_engine.cpp): `apps/windows_client/windows/runner/remote_track_engine.cpp`
- [Clipboard transfer](https://github.com/totblabs/multitap/blob/main/native/windows_clipboard/clipboard.cpp): `native/windows_clipboard/clipboard.cpp`
- [Shared folders](https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/drive_channel.cpp): `apps/windows_client/windows/runner/drive_channel.cpp`
- [Printing](https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/client_print.cpp): `apps/windows_client/windows/runner/client_print.cpp`
- [USB redirection](https://github.com/totblabs/multitap/blob/main/apps/windows_client/windows/runner/usb_capture.cpp): `apps/windows_client/windows/runner/usb_capture.cpp`

### Android client

- [Android app](https://github.com/totblabs/multitap/blob/main/apps/windows_client/android/app/src/main/kotlin/me/totb/multitap_client/MainActivity.kt): `apps/windows_client/android/app/src/main/kotlin/me/totb/multitap_client/MainActivity.kt`
- [Android media](https://github.com/totblabs/multitap/blob/main/apps/windows_client/android/app/src/main/kotlin/me/totb/multitap_client/AndroidMedia.kt): `apps/windows_client/android/app/src/main/kotlin/me/totb/multitap_client/AndroidMedia.kt`

### External systems

- **Proxmox VE**
- **Windows desktop**
- **Release service**

### Other components

- **People**

## Connections

- People → Admin console: administer (evidence: `README.md`)
- Admin console → Account security: manage sign-in (evidence: `README.md`)
- Admin console → Session broker: manage desktops (evidence: `README.md`)
- Admin console → Proxmox VE: control VMs (evidence: `README.md`)
- Proxmox VE → Windows desktop: run desktops (evidence: `README.md`)
- Windows Host → Session broker: connect outbound (evidence: `README.md`)
- Windows Host → Capture and encode: capture and encode
- Windows Host → Virtual displays: use displays (evidence: `README.md`)
- People → Windows app: select desktop (evidence: `README.md`)
- People → Android app: select desktop (evidence: `README.md`)
- Windows app → Session broker: connect session (evidence: `README.md`)
- Android app → Session broker: connect session (evidence: `README.md`)
- Session broker → Windows app: relay media (evidence: `README.md`)
- Session broker → Android app: relay media (evidence: `README.md`)
- Capture and encode → Session broker: send media (evidence: `README.md`)
- Windows app → Multi-screen media: present tracks
- Windows app → Clipboard transfer: transfer clipboard (evidence: `README.md`)
- Windows app → Shared folders: redirect folders (evidence: `README.md`)
- Windows app → Printing: redirect printing (evidence: `README.md`)
- Windows app → USB redirection: redirect USB (evidence: `README.md`)
- Android app → Android media: present media (evidence: `apps/windows_client/android/app/src/main/kotlin/me/totb/multitap_client/MainActivity.kt`)
- Session broker → Database backup: back up data
- Session broker → Server updates: update server
- Release service → Server updates: provide updates (evidence: `README.md`)
