# frlgit/openuu-trimmed architecture

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

- Interactive diagram: https://gitdiagram.com/frlgit/openuu-trimmed
- Repository: https://github.com/frlgit/openuu-trimmed

## Overview

OpenUU is a remote-desktop system centered on showing individual remote app windows alongside local windows, with full-desktop access as an alternative. A user discovers or specifies a host, authenticates, connects over LAN or WAN, then receives window media and sends input; clipboard and file transfer support the session. The graph also preserves browser access, notifications, audio, and host coordination. Windows excerpts expose capture and app wiring; Rust and web connections rely partly on the source index and README, so uncertain links are omitted.

Main entry points: [`apps/windows/OpenUUApp/Client/RemotePeerSession.cs`](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Client/RemotePeerSession.cs) (Remote Session), [`crates/openuu-core/src/ffi.rs`](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/ffi.rs) (Core FFI), [`apps/windows/OpenUUApp/Host/MultiWindowCaptureManager.cs`](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/MultiWindowCaptureManager.cs) (Window Capture), [`crates/openuu-core/src/transport.rs`](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/transport.rs) (Session Transport)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Windows Desktop"]
  node_app["Windows App<br/>[App.xaml.cs]"]
  node_state["App State<br/>[AppState.cs]"]
  node_catalog["Window Catalog<br/>[WindowCatalog.cs]"]
  node_capture_mgr["Window Capture"]
  node_capture["Screen Capture"]
  node_inject["Input Injection<br/>[InputInjector.cs]"]
  node_audio["Host Audio"]
  node_session["Remote Session"]
  node_viewer["Window Viewer"]
  node_clipboard["Clipboard Sync"]
  node_filetransfer["File Transfer"]
  node_notify["Notifications"]
end

subgraph group_core["Connection Core"]
  node_coreffi["Core FFI<br/>[ffi.rs]"]
  node_identity["Device Identity<br/>[identity.rs]"]
  node_discovery["Device Discovery<br/>[discovery.rs]"]
  node_transport["Session Transport<br/>[transport.rs]"]
  node_protocol["Control Protocol<br/>[protocol.rs]"]
  node_wan["WAN Access<br/>[wan.rs]"]
  node_p2p["WebRTC P2P<br/>[webrtc_p2p.rs]"]
  node_updater["Core Updater<br/>[updater.rs]"]
end

subgraph group_web["Browser Client"]
  node_webclient["Web Client<br/>[app.js]"]
  node_webcore["WebAssembly Core<br/>[lib.rs]"]
  node_quiccrypto["QUIC Crypto<br/>[quic_crypto.rs]"]
end

subgraph group_services["Coordination Services"]
  node_coord["Coordination Server<br/>[main.rs]"]
  node_relay["Relay Worker<br/>[index.js]"]
end

node_user(("Controller"))
node_host(("Remote Host"))

node_user -->|"starts session"| node_app
node_app -->|"initializes"| node_state
node_app -->|"starts host"| node_capture_mgr
node_capture_mgr -->|"enumerates windows"| node_catalog
node_capture_mgr -->|"starts capture"| node_capture
node_capture_mgr -->|"uses audio"| node_audio
node_host -->|"offers windows"| node_catalog
node_user -->|"connects"| node_session
node_session -->|"opens windows"| node_viewer
node_session -.->|"connects through"| node_coreffi
node_coreffi -->|"uses identity"| node_identity
node_coreffi -->|"uses discovery"| node_discovery
node_coreffi -->|"connects via"| node_transport
node_coreffi -->|"resolves WAN"| node_wan
node_transport -->|"frames control"| node_protocol
node_transport -->|"bridges P2P"| node_p2p
node_transport -->|"supports WAN"| node_wan
node_session -->|"sends input"| node_inject
node_session -->|"syncs clipboard"| node_clipboard
node_session -->|"transfers files"| node_filetransfer
node_session -->|"shows alerts"| node_notify
node_user -->|"opens browser"| node_webclient
node_webclient -->|"uses client core"| node_webcore
node_webcore -->|"configures QUIC"| node_quiccrypto
node_webcore -->|"connects to host"| node_host
node_coord -.->|"coordinates access"| node_host
node_relay -.->|"serves client"| node_webclient
node_user -->|"updates app"| node_updater

click node_app "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/App/App.xaml.cs"
click node_state "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/App/AppState.cs"
click node_catalog "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/WindowCatalog.cs"
click node_capture_mgr "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/MultiWindowCaptureManager.cs"
click node_capture "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/ScreenCaptureEngine.cs"
click node_inject "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/InputInjector.cs"
click node_audio "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/HostAudioStreamer.cs"
click node_session "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Client/RemotePeerSession.cs"
click node_viewer "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Client/ProxyWindow.xaml.cs"
click node_clipboard "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Shared/ClipboardSyncManager.cs"
click node_filetransfer "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Client/DragOutTransferCoordinator.cs"
click node_notify "https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Client/ClientNotificationManager.cs"
click node_coreffi "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/ffi.rs"
click node_identity "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/identity.rs"
click node_discovery "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/discovery.rs"
click node_transport "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/transport.rs"
click node_protocol "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/protocol.rs"
click node_wan "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/wan.rs"
click node_p2p "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/webrtc_p2p.rs"
click node_updater "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/updater.rs"
click node_webclient "https://github.com/frlgit/openuu-trimmed/blob/main/deploy/cloudflare-worker/public/web/app.js"
click node_webcore "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-web/src/lib.rs"
click node_quiccrypto "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-web/src/quic_crypto.rs"
click node_coord "https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-coord/src/main.rs"
click node_relay "https://github.com/frlgit/openuu-trimmed/blob/main/deploy/cloudflare-relay-worker/src/index.js"

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_state,node_catalog,node_capture_mgr,node_capture,node_inject,node_audio,node_session,node_viewer,node_clipboard,node_filetransfer,node_notify toneBlue
class node_coreffi,node_identity,node_discovery,node_transport,node_protocol,node_wan,node_p2p,node_updater toneAmber
class node_webclient,node_webcore,node_quiccrypto toneMint
class node_coord,node_relay toneRose
class node_user,node_host toneIndigo
```

## Components

### Windows Desktop

- [Windows App](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/App/App.xaml.cs): `apps/windows/OpenUUApp/App/App.xaml.cs`
- [App State](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/App/AppState.cs): `apps/windows/OpenUUApp/App/AppState.cs`
- [Window Catalog](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/WindowCatalog.cs): `apps/windows/OpenUUApp/Host/WindowCatalog.cs`
- [Window Capture](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/MultiWindowCaptureManager.cs): `apps/windows/OpenUUApp/Host/MultiWindowCaptureManager.cs`
- [Screen Capture](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/ScreenCaptureEngine.cs): `apps/windows/OpenUUApp/Host/ScreenCaptureEngine.cs`
- [Input Injection](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/InputInjector.cs): `apps/windows/OpenUUApp/Host/InputInjector.cs`
- [Host Audio](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Host/HostAudioStreamer.cs): `apps/windows/OpenUUApp/Host/HostAudioStreamer.cs`
- [Remote Session](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Client/RemotePeerSession.cs): `apps/windows/OpenUUApp/Client/RemotePeerSession.cs`
- [Window Viewer](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Client/ProxyWindow.xaml.cs): `apps/windows/OpenUUApp/Client/ProxyWindow.xaml.cs`
- [Clipboard Sync](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Shared/ClipboardSyncManager.cs): `apps/windows/OpenUUApp/Shared/ClipboardSyncManager.cs`
- [File Transfer](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Client/DragOutTransferCoordinator.cs): `apps/windows/OpenUUApp/Client/DragOutTransferCoordinator.cs`
- [Notifications](https://github.com/frlgit/openuu-trimmed/blob/main/apps/windows/OpenUUApp/Client/ClientNotificationManager.cs): `apps/windows/OpenUUApp/Client/ClientNotificationManager.cs`

### Connection Core

- [Core FFI](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/ffi.rs): `crates/openuu-core/src/ffi.rs`
- [Device Identity](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/identity.rs): `crates/openuu-core/src/identity.rs`
- [Device Discovery](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/discovery.rs): `crates/openuu-core/src/discovery.rs`
- [Session Transport](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/transport.rs): `crates/openuu-core/src/transport.rs`
- [Control Protocol](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/protocol.rs): `crates/openuu-core/src/protocol.rs`
- [WAN Access](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/wan.rs): `crates/openuu-core/src/wan.rs`
- [WebRTC P2P](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/webrtc_p2p.rs): `crates/openuu-core/src/webrtc_p2p.rs`
- [Core Updater](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-core/src/updater.rs): `crates/openuu-core/src/updater.rs`

### Browser Client

- [Web Client](https://github.com/frlgit/openuu-trimmed/blob/main/deploy/cloudflare-worker/public/web/app.js): `deploy/cloudflare-worker/public/web/app.js`
- [WebAssembly Core](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-web/src/lib.rs): `crates/openuu-web/src/lib.rs`
- [QUIC Crypto](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-web/src/quic_crypto.rs): `crates/openuu-web/src/quic_crypto.rs`

### Coordination Services

- [Coordination Server](https://github.com/frlgit/openuu-trimmed/blob/main/crates/openuu-coord/src/main.rs): `crates/openuu-coord/src/main.rs`
- [Relay Worker](https://github.com/frlgit/openuu-trimmed/blob/main/deploy/cloudflare-relay-worker/src/index.js): `deploy/cloudflare-relay-worker/src/index.js`

### Other components

- **Controller**
- **Remote Host**

## Connections

- Controller → Windows App: starts session
- Windows App → App State: initializes (evidence: `apps/windows/OpenUUApp/App/App.xaml.cs`)
- Windows App → Window Capture: starts host (evidence: `apps/windows/OpenUUApp/App/App.xaml.cs`)
- Window Capture → Window Catalog: enumerates windows (evidence: `apps/windows/OpenUUApp/Host/MultiWindowCaptureManager.cs`)
- Window Capture → Screen Capture: starts capture (evidence: `apps/windows/OpenUUApp/Host/MultiWindowCaptureManager.cs`)
- Window Capture → Host Audio: uses audio (evidence: `apps/windows/OpenUUApp/Host/MultiWindowCaptureManager.cs`)
- Remote Host → Window Catalog: offers windows
- Controller → Remote Session: connects
- Remote Session → Window Viewer: opens windows
- Remote Session → Core FFI: connects through
- Core FFI → Device Identity: uses identity (evidence: `crates/openuu-core/src/ffi.rs`)
- Core FFI → Device Discovery: uses discovery (evidence: `crates/openuu-core/src/ffi.rs`)
- Core FFI → Session Transport: connects via (evidence: `crates/openuu-core/src/ffi.rs`)
- Core FFI → WAN Access: resolves WAN (evidence: `crates/openuu-core/src/ffi.rs`)
- Session Transport → Control Protocol: frames control (evidence: `crates/openuu-core/src/transport.rs`)
- Session Transport → WebRTC P2P: bridges P2P (evidence: `crates/openuu-core/src/transport.rs`)
- Session Transport → WAN Access: supports WAN (evidence: `crates/openuu-core/src/transport.rs`)
- Remote Session → Input Injection: sends input
- Remote Session → Clipboard Sync: syncs clipboard
- Remote Session → File Transfer: transfers files
- Remote Session → Notifications: shows alerts
- Controller → Web Client: opens browser
- Web Client → WebAssembly Core: uses client core (evidence: `crates/openuu-web/src/lib.rs`)
- WebAssembly Core → QUIC Crypto: configures QUIC (evidence: `crates/openuu-web/src/lib.rs`)
- WebAssembly Core → Remote Host: connects to host (evidence: `crates/openuu-web/src/lib.rs`)
- Coordination Server → Remote Host: coordinates access
- Relay Worker → Web Client: serves client
- Controller → Core Updater: updates app
