# parm2006/conduit architecture

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

- Interactive diagram: https://gitdiagram.com/parm2006/conduit
- Repository: https://github.com/parm2006/conduit
- Video tour (about a minute): https://gitdiagram.com/parm2006/conduit/video

## Overview

Conduit is a Windows wireless KVM. A user starts one Server and up to two Clients, authenticates them, arranges displays, then local input is captured, routed through topology ownership, and injected remotely. Clipboard offers and file-paste manifests travel through authenticated control/file lanes, while optional desktop video is captured, encoded, encrypted, transported, decoded, and rendered. The excerpts directly establish routing, clipboard, transfer, and native streaming internals; several GUI, pairing, and persistence links are therefore represented only where documented.

Main entry points: [`app/network.py`](https://github.com/parm2006/conduit/blob/main/app/network.py) (Control Networking), [`app/server.py`](https://github.com/parm2006/conduit/blob/main/app/server.py) (Server Runtime), [`app/client.py`](https://github.com/parm2006/conduit/blob/main/app/client.py) (Client Runtime), [`native/conduit_streamer/conduit_streamer.h`](https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/conduit_streamer.h) (Streamer API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["Session Coordination"]
  node_server["Server Runtime<br/>[server.py]"]
  node_client["Client Runtime<br/>[client.py]"]
  node_gui["Desktop GUI<br/>[gui.py]"]
  node_sessions["Session Registry<br/>[session.py]"]
end

subgraph group_input["Input and Topology"]
  node_input_handler["Input Capture<br/>[input_handler.py]"]
  node_input_router["Input Router<br/>[input_router.py]"]
  node_topology["Display Topology"]
end

subgraph group_sharing["Clipboard and Files"]
  node_clipboard_handler["Clipboard Handler"]
  node_clipboard_hub["Clipboard Hub<br/>[clipboard_hub.py]"]
  node_paste_service["File Paste Service<br/>[paste_service.py]"]
  node_cluster_router["File Cluster Router<br/>[cluster_router.py]"]
  node_transfer_controller["Transfer Controller<br/>[controller.py]"]
  node_file_transport["File Transport<br/>[transport.py]"]
end

subgraph group_video["Native Video"]
  node_native_api["Streamer API<br/>[conduit_streamer.h]"]
  node_capture["DXGI Capture<br/>[dxgi_capture.h]"]
  node_encoder["H264 Encoder<br/>[h264_encoder.cpp]"]
  node_udp_transport["Encrypted UDP<br/>[udp_transport.h]"]
  node_decoder["H264 Decoder<br/>[h264_decoder.h]"]
  node_renderer["D3D11 Renderer<br/>[d3d11_renderer.h]"]
end

subgraph group_security["Trust and Networking"]
  node_network["Control Networking<br/>[network.py]"]
  node_trust[("Peer Trust<br/>[trust.py]")]
  node_crypto["Identity Crypto<br/>[crypto.py]"]
end

node_user(("User"))
node_windows(("Windows Desktop"))

node_user -->|"starts and configures"| node_gui
node_gui -->|"starts server"| node_server
node_gui -->|"connects client"| node_client
node_server -->|"tracks sessions"| node_sessions
node_server -->|"serves control"| node_network
node_client -->|"opens control"| node_network
node_network -->|"checks peers"| node_trust
node_crypto -->|"secures identity"| node_network
node_windows -->|"provides input"| node_input_handler
node_input_handler -->|"dispatches events"| node_input_router
node_input_router -->|"reads mappings"| node_topology
node_input_router -->|"sends handoff"| node_network
node_network -->|"delivers remote input"| node_input_handler
node_windows -->|"provides clipboard"| node_clipboard_handler
node_clipboard_handler -->|"publishes offers"| node_clipboard_hub
node_server -->|"accepts snapshots"| node_clipboard_hub
node_client -->|"accepts snapshots"| node_clipboard_hub
node_clipboard_hub -->|"shares clipboard"| node_network
node_network -->|"dispatches manifests"| node_paste_service
node_paste_service -->|"coordinates paste"| node_cluster_router
node_cluster_router -->|"relays frames"| node_file_transport
node_paste_service -->|"reports status"| node_transfer_controller
node_client -.->|"starts stream"| node_native_api
node_native_api -->|"captures desktop"| node_capture
node_native_api -->|"encodes frames"| node_encoder
node_native_api -->|"sends media"| node_udp_transport
node_udp_transport -->|"delivers frames"| node_decoder
node_decoder -->|"renders frames"| node_renderer

click node_server "https://github.com/parm2006/conduit/blob/main/app/server.py"
click node_client "https://github.com/parm2006/conduit/blob/main/app/client.py"
click node_gui "https://github.com/parm2006/conduit/blob/main/app/gui.py"
click node_sessions "https://github.com/parm2006/conduit/blob/main/app/session.py"
click node_input_handler "https://github.com/parm2006/conduit/blob/main/app/input_handler.py"
click node_input_router "https://github.com/parm2006/conduit/blob/main/app/input_router.py"
click node_topology "https://github.com/parm2006/conduit/blob/main/app/display_topology.py"
click node_clipboard_handler "https://github.com/parm2006/conduit/blob/main/app/clipboard_handler.py"
click node_clipboard_hub "https://github.com/parm2006/conduit/blob/main/app/clipboard_hub.py"
click node_paste_service "https://github.com/parm2006/conduit/blob/main/app/file_transfer/paste_service.py"
click node_cluster_router "https://github.com/parm2006/conduit/blob/main/app/file_transfer/cluster_router.py"
click node_transfer_controller "https://github.com/parm2006/conduit/blob/main/app/file_transfer/controller.py"
click node_file_transport "https://github.com/parm2006/conduit/blob/main/app/file_transfer/transport.py"
click node_native_api "https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/conduit_streamer.h"
click node_capture "https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/dxgi_capture.h"
click node_encoder "https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/h264_encoder.cpp"
click node_udp_transport "https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/udp_transport.h"
click node_decoder "https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/h264_decoder.h"
click node_renderer "https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/d3d11_renderer.h"
click node_network "https://github.com/parm2006/conduit/blob/main/app/network.py"
click node_trust "https://github.com/parm2006/conduit/blob/main/app/trust.py"
click node_crypto "https://github.com/parm2006/conduit/blob/main/app/crypto.py"

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_server,node_client,node_gui,node_sessions,node_user toneBlue
class node_input_handler,node_input_router,node_topology toneAmber
class node_clipboard_handler,node_clipboard_hub,node_paste_service,node_cluster_router,node_transfer_controller,node_file_transport toneMint
class node_native_api,node_capture,node_encoder,node_udp_transport,node_decoder,node_renderer toneRose
class node_network,node_trust,node_crypto,node_windows toneIndigo
```

## Components

### Session Coordination

- [Server Runtime](https://github.com/parm2006/conduit/blob/main/app/server.py): `app/server.py`
- [Client Runtime](https://github.com/parm2006/conduit/blob/main/app/client.py): `app/client.py`
- [Desktop GUI](https://github.com/parm2006/conduit/blob/main/app/gui.py): `app/gui.py`
- [Session Registry](https://github.com/parm2006/conduit/blob/main/app/session.py): `app/session.py`

### Input and Topology

- [Input Capture](https://github.com/parm2006/conduit/blob/main/app/input_handler.py): `app/input_handler.py`
- [Input Router](https://github.com/parm2006/conduit/blob/main/app/input_router.py): `app/input_router.py`
- [Display Topology](https://github.com/parm2006/conduit/blob/main/app/display_topology.py): `app/display_topology.py`

### Clipboard and Files

- [Clipboard Handler](https://github.com/parm2006/conduit/blob/main/app/clipboard_handler.py): `app/clipboard_handler.py`
- [Clipboard Hub](https://github.com/parm2006/conduit/blob/main/app/clipboard_hub.py): `app/clipboard_hub.py`
- [File Paste Service](https://github.com/parm2006/conduit/blob/main/app/file_transfer/paste_service.py): `app/file_transfer/paste_service.py`
- [File Cluster Router](https://github.com/parm2006/conduit/blob/main/app/file_transfer/cluster_router.py): `app/file_transfer/cluster_router.py`
- [Transfer Controller](https://github.com/parm2006/conduit/blob/main/app/file_transfer/controller.py): `app/file_transfer/controller.py`
- [File Transport](https://github.com/parm2006/conduit/blob/main/app/file_transfer/transport.py): `app/file_transfer/transport.py`

### Native Video

- [Streamer API](https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/conduit_streamer.h): `native/conduit_streamer/conduit_streamer.h`
- [DXGI Capture](https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/dxgi_capture.h): `native/conduit_streamer/dxgi_capture.h`
- [H264 Encoder](https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/h264_encoder.cpp): `native/conduit_streamer/h264_encoder.cpp`
- [Encrypted UDP](https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/udp_transport.h): `native/conduit_streamer/udp_transport.h`
- [H264 Decoder](https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/h264_decoder.h): `native/conduit_streamer/h264_decoder.h`
- [D3D11 Renderer](https://github.com/parm2006/conduit/blob/main/native/conduit_streamer/d3d11_renderer.h): `native/conduit_streamer/d3d11_renderer.h`

### Trust and Networking

- [Control Networking](https://github.com/parm2006/conduit/blob/main/app/network.py): `app/network.py`
- [Peer Trust](https://github.com/parm2006/conduit/blob/main/app/trust.py): `app/trust.py`
- [Identity Crypto](https://github.com/parm2006/conduit/blob/main/app/crypto.py): `app/crypto.py`

### Other components

- **User**
- **Windows Desktop**

## Connections

- User → Desktop GUI: starts and configures
- Desktop GUI → Server Runtime: starts server
- Desktop GUI → Client Runtime: connects client
- Server Runtime → Session Registry: tracks sessions
- Server Runtime → Control Networking: serves control
- Client Runtime → Control Networking: opens control
- Control Networking → Peer Trust: checks peers
- Identity Crypto → Control Networking: secures identity
- Windows Desktop → Input Capture: provides input
- Input Capture → Input Router: dispatches events
- Input Router → Display Topology: reads mappings
- Input Router → Control Networking: sends handoff
- Control Networking → Input Capture: delivers remote input
- Windows Desktop → Clipboard Handler: provides clipboard
- Clipboard Handler → Clipboard Hub: publishes offers
- Server Runtime → Clipboard Hub: accepts snapshots
- Client Runtime → Clipboard Hub: accepts snapshots
- Clipboard Hub → Control Networking: shares clipboard
- Control Networking → File Paste Service: dispatches manifests
- File Paste Service → File Cluster Router: coordinates paste
- File Cluster Router → File Transport: relays frames
- File Paste Service → Transfer Controller: reports status
- Client Runtime → Streamer API: starts stream
- Streamer API → DXGI Capture: captures desktop
- Streamer API → H264 Encoder: encodes frames
- Streamer API → Encrypted UDP: sends media
- Encrypted UDP → H264 Decoder: delivers frames
- H264 Decoder → D3D11 Renderer: renders frames
