How inukaasith/twindesk works
TwinDesk is a cross-platform device-sharing suite: paired computers and Android devices share displays, apps, input, files, clipboard, notifications, audio, and related services over a direct link. The principal workflow is start the desktop or phone app, discover and pair a peer, establish an authenticated session, then route feature traffic between platform-specific handlers and native helpers. The graph emphasizes the documented capabilities and the sampled orchestration points; many platform feature implementations are represented by their exact enclosing directories because their source was not sampled.
Main entry points: main.js Desktop app · Core.kt Phone runtime · services.js Desktop features · peer.js Peer routing
Components 25
Desktop apps
- Desktop app
mac/main.js - Linux app
linux/main.js - Windows app
windows/main.js - Peer discovery
mac/discovery.js - Pairing
mac/pairing.js - Secure link
mac/link.js - Session server
mac/server.js - Peer routing
mac/peer.js - Desktop features
mac/services.js - Phone bridge
mac/phone-bridge.js - Settings and state
mac/store.js - Platform services
linux/vdd.js
Android app
- Android app
android/app/src/main/java/com/twindesk/android/MainActivity.kt - Phone runtime
android/app/src/main/java/com/twindesk/android/Core.kt - Phone features
android/app/src/main/java/com/twindesk/android/Files.kt - Clipboard and files
android/app/src/main/java/com/twindesk/android/FileClip.kt - Pointer input
android/app/src/main/java/com/twindesk/android/Pointer.kt - Updates
android/app/src/main/java/com/twindesk/android/Updates.kt
Shared protocol
- Message protocol
shared/protocol.js - Desktop updates
shared/updates.js - Product metadata
shared/about.js
Native helpers
- Windows native helper
windows-helper/src/Program.cs - macOS native helper
mac-helper/Sources/macshare-helper/main.swift
Other components
- Device user
- Paired peer
Connections 30
- Device user → Desktop app: opens app
- Device user → Android app: opens app
- Desktop app → Peer discovery: starts discovery
mac/main.js - Desktop app → Pairing: creates pairing
mac/main.js - Desktop app → Secure link: creates link
mac/main.js - Desktop app → Session server: starts host
mac/main.js - Desktop app → Peer routing: creates router
mac/main.js - Desktop app → Desktop features: wires features
mac/main.js - Desktop app → Phone bridge: starts bridge
mac/main.js - Desktop app → Settings and state: loads settings
mac/main.js - Session server → Peer routing: routes messages
mac/server.js - Peer routing → Desktop features: dispatches traffic
- Desktop features → Platform services: uses services
- Desktop features → macOS native helper: commands helper
mac/services.js - Windows native helper → Paired peer: emits events
- Android app → Phone runtime: renders runtime
android/app/src/main/java/com/twindesk/android/MainActivity.kt - Phone runtime → Phone features: dispatches features
android/app/src/main/java/com/twindesk/android/Core.kt - Phone runtime → Clipboard and files: creates handler
android/app/src/main/java/com/twindesk/android/Core.kt - Phone runtime → Pointer input: creates handler
android/app/src/main/java/com/twindesk/android/Core.kt - Phone runtime → Updates: starts updates
android/app/src/main/java/com/twindesk/android/Core.kt - Phone runtime → Peer discovery: discovers peers
- Phone runtime → Paired peer: connects securely
- Desktop app → Message protocol: uses message types
mac/main.js - Phone runtime → Message protocol: shares protocol
- Desktop app → Desktop updates: checks updates
mac/main.js - Desktop app → Product metadata: loads metadata
mac/main.js - Linux app → Paired peer: shares device features
- Windows app → Paired peer: shares device features
- Phone bridge → Phone runtime: bridges phone
- Phone features → Paired peer: transfers files