# dyhwdnmd/rlink-remotectrl architecture

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

- Interactive diagram: https://gitdiagram.com/dyhwdnmd/rlink-remotectrl
- Repository: https://github.com/dyhwdnmd/rlink-remotectrl

## Overview

RLink is a Windows remote-desktop and collaboration product: users sign in or choose a device/room, establish signaling and peer sessions, then view/control screens or use room media and data features. The client also manages devices, recent connections, diagnostics, settings, and updates; a separately deployable signaling server coordinates authentication, rooms, and direct-session setup. README claims supply the major capabilities; sampled source confirms session-engine responsibilities, WebRTC data channels, authentication, and update checking, but does not expose every UI-to-runtime call site.

Main entry points: [`src/apps/remote/InProcessSessionEngine.cpp`](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/InProcessSessionEngine.cpp) (Session engine), [`src/apps/controller/ControllerMainWindow.cpp`](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/controller/ControllerMainWindow.cpp) (Client shell), [`src/server/signaling/SignalServer.cpp`](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/server/signaling/SignalServer.cpp) (Signal server), [`src/auth/AuthManager.cpp`](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/auth/AuthManager.cpp) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Desktop client"]
  node_desktop["Client shell"]
  node_devicepages["Device and room pages"]
  node_remotewindow["Remote session UI"]
  node_diagnostics["Diagnostics UI"]
end

subgraph group_session["Session runtime"]
  node_engine["Session engine"]
  node_roomcoord["Room coordinator"]
  node_directcoord["Direct coordinator"]
  node_signalingclient["Signaling client"]
  node_webrtc["Peer sessions"]
  node_channels["Data channels"]
  node_capture["Windows capture"]
  node_input["Input execution"]
  node_filetransfer["File transfer"]
  node_clipboard["Remote clipboard"]
end

subgraph group_server["Signaling service"]
  node_server["Signal server<br/>[SignalServer.cpp]"]
  node_rooms[("Room registry<br/>[RoomRegistry.cpp]")]
  node_directregistry[("Direct-session registry")]
  node_identitystore[("Identity store<br/>[IdentityStore.cpp]")]
end

subgraph group_identity["Identity and updates"]
  node_updater["Update controller"]
  node_auth["Authentication<br/>[AuthManager.cpp]"]
end

node_user(("User"))
node_logto["Logto identity"]
node_manifest["Update manifests"]
node_peer(("Remote peers"))

node_user -->|"uses"| node_desktop
node_desktop -->|"shows"| node_devicepages
node_desktop -->|"authenticates"| node_auth
node_desktop -->|"commands"| node_engine
node_devicepages -->|"requests sessions"| node_engine
node_remotewindow -->|"controls session"| node_engine
node_diagnostics -->|"reads status"| node_engine
node_desktop -->|"checks updates"| node_updater
node_updater -->|"fetches"| node_manifest
node_auth -.->|"uses OIDC"| node_logto
node_auth -->|"stores tokens"| node_identitystore
node_engine -->|"coordinates direct"| node_directcoord
node_engine -->|"coordinates rooms"| node_roomcoord
node_engine -->|"signals"| node_signalingclient
node_signalingclient -->|"exchanges messages"| node_server
node_server -->|"manages membership"| node_rooms
node_server -->|"tracks sessions"| node_directregistry
node_server -->|"reads identities"| node_identitystore
node_engine -->|"creates peer sessions"| node_webrtc
node_webrtc -->|"connects P2P"| node_peer
node_engine -->|"captures desktop"| node_capture
node_engine -->|"executes remote input"| node_input
node_engine -->|"sends data"| node_channels
node_engine -->|"manages transfers"| node_filetransfer
node_engine -->|"manages clipboard"| node_clipboard
node_filetransfer -->|"transfers P2P"| node_peer
node_clipboard -->|"sends clipboard data"| node_peer

click node_desktop "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/controller/ControllerMainWindow.cpp"
click node_devicepages "https://github.com/dyhwdnmd/rlink-remotectrl/tree/release/src/apps/controller/pages"
click node_remotewindow "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/controller/RemoteSessionWindow.h"
click node_diagnostics "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/controller/pages/DiagnosticsPage.cpp"
click node_updater "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/update/SoftwareUpdateController.cpp"
click node_auth "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/auth/AuthManager.cpp"
click node_engine "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/InProcessSessionEngine.cpp"
click node_roomcoord "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/RoomSessionCoordinator.cpp"
click node_directcoord "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/DirectSessionCoordinator.cpp"
click node_signalingclient "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/signaling/QtWebSocketSignalingClient.cpp"
click node_webrtc "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/webrtc/LibWebRtcSession.cpp"
click node_channels "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/webrtc/DataChannelManager.cpp"
click node_capture "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/platform/win/WindowsDesktopCaptureSource.cpp"
click node_input "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/platform/win/WindowsInputExecutor.cpp"
click node_filetransfer "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/FileTransferController.cpp"
click node_clipboard "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/ClipboardController.cpp"
click node_server "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/server/signaling/SignalServer.cpp"
click node_rooms "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/server/signaling/RoomRegistry.cpp"
click node_directregistry "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/server/signaling/DirectSessionRegistry.cpp"
click node_identitystore "https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/server/persistence/IdentityStore.cpp"

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,node_devicepages,node_remotewindow,node_diagnostics,node_user toneBlue
class node_engine,node_roomcoord,node_directcoord,node_signalingclient,node_webrtc,node_channels,node_capture,node_input,node_filetransfer,node_clipboard toneAmber
class node_server,node_rooms,node_directregistry,node_identitystore toneMint
class node_updater,node_auth toneRose
class node_logto,node_manifest,node_peer toneIndigo
```

## Components

### Desktop client

- [Client shell](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/controller/ControllerMainWindow.cpp): `src/apps/controller/ControllerMainWindow.cpp`
- [Device and room pages](https://github.com/dyhwdnmd/rlink-remotectrl/tree/release/src/apps/controller/pages): `src/apps/controller/pages`
- [Remote session UI](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/controller/RemoteSessionWindow.h): `src/apps/controller/RemoteSessionWindow.h`
- [Diagnostics UI](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/controller/pages/DiagnosticsPage.cpp): `src/apps/controller/pages/DiagnosticsPage.cpp`

### Session runtime

- [Session engine](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/InProcessSessionEngine.cpp): `src/apps/remote/InProcessSessionEngine.cpp`
- [Room coordinator](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/RoomSessionCoordinator.cpp): `src/apps/remote/RoomSessionCoordinator.cpp`
- [Direct coordinator](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/DirectSessionCoordinator.cpp): `src/apps/remote/DirectSessionCoordinator.cpp`
- [Signaling client](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/signaling/QtWebSocketSignalingClient.cpp): `src/signaling/QtWebSocketSignalingClient.cpp`
- [Peer sessions](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/webrtc/LibWebRtcSession.cpp): `src/webrtc/LibWebRtcSession.cpp`
- [Data channels](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/webrtc/DataChannelManager.cpp): `src/webrtc/DataChannelManager.cpp`
- [Windows capture](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/platform/win/WindowsDesktopCaptureSource.cpp): `src/platform/win/WindowsDesktopCaptureSource.cpp`
- [Input execution](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/platform/win/WindowsInputExecutor.cpp): `src/platform/win/WindowsInputExecutor.cpp`
- [File transfer](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/FileTransferController.cpp): `src/apps/remote/FileTransferController.cpp`
- [Remote clipboard](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/remote/ClipboardController.cpp): `src/apps/remote/ClipboardController.cpp`

### Signaling service

- [Signal server](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/server/signaling/SignalServer.cpp): `src/server/signaling/SignalServer.cpp`
- [Room registry](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/server/signaling/RoomRegistry.cpp): `src/server/signaling/RoomRegistry.cpp`
- [Direct-session registry](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/server/signaling/DirectSessionRegistry.cpp): `src/server/signaling/DirectSessionRegistry.cpp`
- [Identity store](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/server/persistence/IdentityStore.cpp): `src/server/persistence/IdentityStore.cpp`

### Identity and updates

- [Update controller](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/apps/update/SoftwareUpdateController.cpp): `src/apps/update/SoftwareUpdateController.cpp`
- [Authentication](https://github.com/dyhwdnmd/rlink-remotectrl/blob/release/src/auth/AuthManager.cpp): `src/auth/AuthManager.cpp`

### Other components

- **User**
- **Logto identity**
- **Update manifests**
- **Remote peers**

## Connections

- User → Client shell: uses
- Client shell → Device and room pages: shows
- Client shell → Authentication: authenticates
- Client shell → Session engine: commands
- Device and room pages → Session engine: requests sessions
- Remote session UI → Session engine: controls session
- Diagnostics UI → Session engine: reads status
- Client shell → Update controller: checks updates
- Update controller → Update manifests: fetches
- Authentication → Logto identity: uses OIDC
- Authentication → Identity store: stores tokens
- Session engine → Direct coordinator: coordinates direct
- Session engine → Room coordinator: coordinates rooms
- Session engine → Signaling client: signals
- Signaling client → Signal server: exchanges messages
- Signal server → Room registry: manages membership
- Signal server → Direct-session registry: tracks sessions
- Signal server → Identity store: reads identities
- Session engine → Peer sessions: creates peer sessions
- Peer sessions → Remote peers: connects P2P
- Session engine → Windows capture: captures desktop
- Session engine → Input execution: executes remote input
- Session engine → Data channels: sends data
- Session engine → File transfer: manages transfers
- Session engine → Remote clipboard: manages clipboard
- File transfer → Remote peers: transfers P2P
- Remote clipboard → Remote peers: sends clipboard data
