# i7exceed/telepad architecture

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

- Interactive diagram: https://gitdiagram.com/i7exceed/telepad
- Repository: https://github.com/i7exceed/telepad

## Overview

TelePad bridges an Android phone and a Windows PC: the client discovers or connects to a server, sends physical or on-screen controls over UDP, and the server translates them into virtual controller or mouse input. The README also documents pairing, rumble feedback, localization, settings, and server monitoring. Client implementation excerpts were not provided, so client-side links rely on README documentation; unsampled implementation details are not inferred.

Main entry points: [`TelePadServer/MainForm.cs`](https://github.com/i7exceed/telepad/blob/main/TelePadServer/MainForm.cs) (Server Orchestrator), [`TelePadServer/Network/UdpInputListener.cs`](https://github.com/i7exceed/telepad/blob/main/TelePadServer/Network/UdpInputListener.cs) (UDP Listener), [`telepad/lib/services/udp_service.dart`](https://github.com/i7exceed/telepad/blob/main/telepad/lib/services/udp_service.dart) (UDP Client), [`TelePadServer/UI/Pages/DashboardPage.cs`](https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/DashboardPage.cs) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Android Client"]
  node_physical_controls["Physical Controls"]
  node_virtual_gamepad["Virtual Gamepad"]
  node_touchpad["Virtual Touchpad"]
  node_discovery["Server Discovery"]
  node_udp_client["UDP Client<br/>[udp_service.dart]"]
  node_haptics["Rumble Feedback"]
end

subgraph group_server_input["Server Input and Emulation"]
  node_udp_listener["UDP Listener"]
  node_client_sessions["Client Sessions<br/>[ClientSession.cs]"]
  node_virtual_controller["Virtual Controller"]
  node_virtual_mouse["Virtual Mouse"]
end

subgraph group_server_ui["Server UI and Configuration"]
  node_main_form["Server Orchestrator<br/>[MainForm.cs]"]
  node_settings[("Server Settings<br/>[ServerSettings.cs]")]
  node_startup["Startup Registry"]
  node_localization["Localization"]
  node_dashboard["Dashboard<br/>[DashboardPage.cs]"]
  node_visualizer["Input Visualizer"]
  node_clients_page["Clients Page<br/>[ClientsPage.cs]"]
  node_settings_page["Settings Page<br/>[SettingsPage.cs]"]
  node_logs_page["Logs Page<br/>[LogsPage.cs]"]
  node_help_page["Help Page<br/>[HelpPage.cs]"]
  node_theme_drawing["Theme Drawing<br/>[ThemeDrawing.cs]"]
  node_theme_tokens["Theme Tokens<br/>[ThemeTokens.cs]"]
end

subgraph group_platform["Windows Input Platform"]
  node_vigem["ViGEmBus Driver"]
end

node_user(("Phone User"))
node_phone_vibrator["Phone Vibration"]
node_pc(("Windows PC"))
node_windows_games(("Windows Games"))

node_user -->|"uses"| node_physical_controls
node_user -->|"uses"| node_virtual_gamepad
node_user -->|"uses"| node_touchpad
node_user -->|"scans servers"| node_discovery
node_discovery -->|"connects to"| node_udp_client
node_physical_controls -->|"sends input"| node_udp_client
node_virtual_gamepad -->|"sends input"| node_udp_client
node_touchpad -->|"sends input"| node_udp_client
node_udp_client -->|"sends UDP"| node_udp_listener
node_udp_listener -->|"tracks clients"| node_client_sessions
node_udp_listener -->|"routes controls"| node_virtual_controller
node_udp_listener -->|"routes mouse input"| node_virtual_mouse
node_virtual_controller -->|"emulates controller"| node_vigem
node_vigem -->|"provides gamepad"| node_windows_games
node_virtual_mouse -->|"moves cursor"| node_windows_games
node_virtual_controller -->|"returns rumble"| node_udp_listener
node_udp_listener -->|"sends feedback"| node_haptics
node_haptics -->|"vibrates"| node_phone_vibrator
node_main_form -->|"starts and stops"| node_udp_listener
node_main_form -->|"loads settings"| node_settings
node_main_form -->|"configures startup"| node_startup
node_main_form -->|"hosts page"| node_dashboard
node_main_form -->|"updates sessions"| node_clients_page
node_main_form -->|"hosts page"| node_settings_page
node_main_form -->|"writes logs"| node_logs_page
node_main_form -->|"hosts page"| node_help_page
node_dashboard -->|"displays input"| node_visualizer
node_settings_page -->|"edits settings"| node_settings
node_clients_page -->|"displays sessions"| node_client_sessions
node_dashboard -->|"localizes labels"| node_localization
node_clients_page -->|"localizes labels"| node_localization
node_settings_page -->|"localizes labels"| node_localization
node_dashboard -->|"uses styles"| node_theme_tokens
node_visualizer -->|"uses colors"| node_theme_tokens
node_theme_drawing -->|"uses palette"| node_theme_tokens

click node_physical_controls "https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/relay/physical_relay_view.dart"
click node_virtual_gamepad "https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/virtual_pad/virtual_gamepad_view.dart"
click node_touchpad "https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/touchpad/virtual_touchpad_view.dart"
click node_discovery "https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/discovery/server_discovery_sheet.dart"
click node_udp_client "https://github.com/i7exceed/telepad/blob/main/telepad/lib/services/udp_service.dart"
click node_haptics "https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/relay/controller_telemetry.dart"
click node_main_form "https://github.com/i7exceed/telepad/blob/main/TelePadServer/MainForm.cs"
click node_udp_listener "https://github.com/i7exceed/telepad/blob/main/TelePadServer/Network/UdpInputListener.cs"
click node_client_sessions "https://github.com/i7exceed/telepad/blob/main/TelePadServer/Network/ClientSession.cs"
click node_virtual_controller "https://github.com/i7exceed/telepad/blob/main/TelePadServer/Emulation/VirtualControllerManager.cs"
click node_virtual_mouse "https://github.com/i7exceed/telepad/blob/main/TelePadServer/Emulation/VirtualMouseManager.cs"
click node_settings "https://github.com/i7exceed/telepad/blob/main/TelePadServer/Config/ServerSettings.cs"
click node_startup "https://github.com/i7exceed/telepad/blob/main/TelePadServer/Config/StartupRegistryService.cs"
click node_localization "https://github.com/i7exceed/telepad/blob/main/TelePadServer/Config/ServerLocalization.cs"
click node_dashboard "https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/DashboardPage.cs"
click node_visualizer "https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/GamepadVisualizer.cs"
click node_clients_page "https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/ClientsPage.cs"
click node_settings_page "https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/SettingsPage.cs"
click node_logs_page "https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/LogsPage.cs"
click node_help_page "https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/HelpPage.cs"
click node_theme_drawing "https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/ThemeDrawing.cs"
click node_theme_tokens "https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/ThemeTokens.cs"

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_physical_controls,node_virtual_gamepad,node_touchpad,node_discovery,node_udp_client,node_haptics,node_user toneBlue
class node_udp_listener,node_client_sessions,node_virtual_controller,node_virtual_mouse toneAmber
class node_main_form,node_settings,node_startup,node_localization,node_dashboard,node_visualizer,node_clients_page,node_settings_page,node_logs_page,node_help_page,node_theme_drawing,node_theme_tokens toneMint
class node_vigem toneRose
class node_phone_vibrator,node_pc,node_windows_games toneIndigo
```

## Components

### Android Client

- [Physical Controls](https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/relay/physical_relay_view.dart): `telepad/lib/features/relay/physical_relay_view.dart`
- [Virtual Gamepad](https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/virtual_pad/virtual_gamepad_view.dart): `telepad/lib/features/virtual_pad/virtual_gamepad_view.dart`
- [Virtual Touchpad](https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/touchpad/virtual_touchpad_view.dart): `telepad/lib/features/touchpad/virtual_touchpad_view.dart`
- [Server Discovery](https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/discovery/server_discovery_sheet.dart): `telepad/lib/features/discovery/server_discovery_sheet.dart`
- [UDP Client](https://github.com/i7exceed/telepad/blob/main/telepad/lib/services/udp_service.dart): `telepad/lib/services/udp_service.dart`
- [Rumble Feedback](https://github.com/i7exceed/telepad/blob/main/telepad/lib/features/relay/controller_telemetry.dart): `telepad/lib/features/relay/controller_telemetry.dart`

### Server Input and Emulation

- [UDP Listener](https://github.com/i7exceed/telepad/blob/main/TelePadServer/Network/UdpInputListener.cs): `TelePadServer/Network/UdpInputListener.cs`
- [Client Sessions](https://github.com/i7exceed/telepad/blob/main/TelePadServer/Network/ClientSession.cs): `TelePadServer/Network/ClientSession.cs`
- [Virtual Controller](https://github.com/i7exceed/telepad/blob/main/TelePadServer/Emulation/VirtualControllerManager.cs): `TelePadServer/Emulation/VirtualControllerManager.cs`
- [Virtual Mouse](https://github.com/i7exceed/telepad/blob/main/TelePadServer/Emulation/VirtualMouseManager.cs): `TelePadServer/Emulation/VirtualMouseManager.cs`

### Server UI and Configuration

- [Server Orchestrator](https://github.com/i7exceed/telepad/blob/main/TelePadServer/MainForm.cs): `TelePadServer/MainForm.cs`
- [Server Settings](https://github.com/i7exceed/telepad/blob/main/TelePadServer/Config/ServerSettings.cs): `TelePadServer/Config/ServerSettings.cs`
- [Startup Registry](https://github.com/i7exceed/telepad/blob/main/TelePadServer/Config/StartupRegistryService.cs): `TelePadServer/Config/StartupRegistryService.cs`
- [Localization](https://github.com/i7exceed/telepad/blob/main/TelePadServer/Config/ServerLocalization.cs): `TelePadServer/Config/ServerLocalization.cs`
- [Dashboard](https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/DashboardPage.cs): `TelePadServer/UI/Pages/DashboardPage.cs`
- [Input Visualizer](https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/GamepadVisualizer.cs): `TelePadServer/UI/GamepadVisualizer.cs`
- [Clients Page](https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/ClientsPage.cs): `TelePadServer/UI/Pages/ClientsPage.cs`
- [Settings Page](https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/SettingsPage.cs): `TelePadServer/UI/Pages/SettingsPage.cs`
- [Logs Page](https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/LogsPage.cs): `TelePadServer/UI/Pages/LogsPage.cs`
- [Help Page](https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/Pages/HelpPage.cs): `TelePadServer/UI/Pages/HelpPage.cs`
- [Theme Drawing](https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/ThemeDrawing.cs): `TelePadServer/UI/ThemeDrawing.cs`
- [Theme Tokens](https://github.com/i7exceed/telepad/blob/main/TelePadServer/UI/ThemeTokens.cs): `TelePadServer/UI/ThemeTokens.cs`

### Windows Input Platform

- **ViGEmBus Driver**

### Other components

- **Phone User**
- **Phone Vibration**
- **Windows PC**
- **Windows Games**

## Connections

- Phone User → Physical Controls: uses (evidence: `README.md`)
- Phone User → Virtual Gamepad: uses (evidence: `README.md`)
- Phone User → Virtual Touchpad: uses (evidence: `README.md`)
- Phone User → Server Discovery: scans servers (evidence: `README.md`)
- Server Discovery → UDP Client: connects to (evidence: `README.md`)
- Physical Controls → UDP Client: sends input (evidence: `README.md`)
- Virtual Gamepad → UDP Client: sends input (evidence: `README.md`)
- Virtual Touchpad → UDP Client: sends input (evidence: `README.md`)
- UDP Client → UDP Listener: sends UDP (evidence: `README.md`)
- UDP Listener → Client Sessions: tracks clients (evidence: `TelePadServer/Network/UdpInputListener.cs`)
- UDP Listener → Virtual Controller: routes controls (evidence: `README.md`)
- UDP Listener → Virtual Mouse: routes mouse input (evidence: `README.md`)
- Virtual Controller → ViGEmBus Driver: emulates controller (evidence: `TelePadServer/Emulation/VirtualControllerManager.cs`)
- ViGEmBus Driver → Windows Games: provides gamepad (evidence: `README.md`)
- Virtual Mouse → Windows Games: moves cursor (evidence: `README.md`)
- Virtual Controller → UDP Listener: returns rumble (evidence: `README.md`)
- UDP Listener → Rumble Feedback: sends feedback (evidence: `README.md`)
- Rumble Feedback → Phone Vibration: vibrates (evidence: `README.md`)
- Server Orchestrator → UDP Listener: starts and stops (evidence: `TelePadServer/MainForm.cs`)
- Server Orchestrator → Server Settings: loads settings (evidence: `TelePadServer/MainForm.cs`)
- Server Orchestrator → Startup Registry: configures startup (evidence: `TelePadServer/MainForm.cs`)
- Server Orchestrator → Dashboard: hosts page (evidence: `TelePadServer/MainForm.cs`)
- Server Orchestrator → Clients Page: updates sessions (evidence: `TelePadServer/MainForm.cs`)
- Server Orchestrator → Settings Page: hosts page (evidence: `TelePadServer/MainForm.cs`)
- Server Orchestrator → Logs Page: writes logs (evidence: `TelePadServer/MainForm.cs`)
- Server Orchestrator → Help Page: hosts page (evidence: `TelePadServer/MainForm.cs`)
- Dashboard → Input Visualizer: displays input (evidence: `TelePadServer/UI/Pages/DashboardPage.cs`)
- Settings Page → Server Settings: edits settings (evidence: `TelePadServer/UI/Pages/SettingsPage.cs`)
- Clients Page → Client Sessions: displays sessions (evidence: `TelePadServer/UI/Pages/ClientsPage.cs`)
- Dashboard → Localization: localizes labels (evidence: `TelePadServer/UI/Pages/DashboardPage.cs`)
- Clients Page → Localization: localizes labels (evidence: `TelePadServer/UI/Pages/ClientsPage.cs`)
- Settings Page → Localization: localizes labels (evidence: `TelePadServer/UI/Pages/SettingsPage.cs`)
- Dashboard → Theme Tokens: uses styles (evidence: `TelePadServer/UI/Pages/DashboardPage.cs`)
- Input Visualizer → Theme Tokens: uses colors (evidence: `TelePadServer/UI/GamepadVisualizer.cs`)
- Theme Drawing → Theme Tokens: uses palette (evidence: `TelePadServer/UI/ThemeDrawing.cs`)
