# beatz-maaraz/beatzconnect--pc architecture

> Architecture diagram of the GitHub repository beatz-maaraz/beatzconnect--pc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/beatz-maaraz/beatzconnect--pc
- Repository: https://github.com/beatz-maaraz/beatzconnect--pc

## Overview

Beatz Control is a Windows remote-control and workstation-automation suite with .NET/WPF, a background service, a native C++ TCP engine, and a Qt client/runtime. The principal flow is a remote client sending commands over WebSocket, relay, or raw TCP; a server dispatches them to Windows input, audio, system, and window controls, while the UI provides management and telemetry. README documents capabilities beyond the sampled excerpts; edges below are limited to excerpted calls and explicit README relationships, with unsampled internal wiring omitted.

Main entry points: [`PCControl.Core/WebSocketAccessPointServer.cs`](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/WebSocketAccessPointServer.cs) (Local WebSocket server), [`PCControl.UI/MainWindow.xaml.cs`](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.UI/MainWindow.xaml.cs) (WPF dashboard), [`PCControl.Service/Worker.cs`](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Service/Worker.cs) (Service worker), [`PCControl.Core/RelayConnectionService.cs`](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/RelayConnectionService.cs) (Cloud relay client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Clients and UI"]
  node_remote(("Remote clients"))
  node_dashboard["WPF dashboard<br/>[MainWindow.xaml.cs]"]
end

subgraph group_dotnet[".NET Runtime"]
  node_service["Background service<br/>[Program.cs]"]
  node_worker["Service worker<br/>[Worker.cs]"]
  node_ws["Local WebSocket server"]
  node_relay["Cloud relay client"]
  node_hardware["Windows controls"]
  node_audio["Audio endpoints"]
  node_accesspoint["Access point setup"]
  node_ipc["Named pipe IPC<br/>[NamedPipeIpc.cs]"]
end

subgraph group_native["Native TCP Engine"]
  node_tcpserver["TCP server<br/>[NetworkServer.cpp]"]
  node_dispatcher["Command dispatcher"]
  node_input["Input synthesis"]
  node_netutils["Network utilities<br/>[NetworkUtils.cpp]"]
  node_nativeentry["Native server entry<br/>[main.cpp]"]
end

subgraph group_qt["Qt Runtime"]
  node_qtentry["Qt application<br/>[main.cpp]"]
  node_qthardware["Qt hardware controls"]
  node_qtrelay["Qt relay client<br/>[RelayManager.cpp]"]
  node_autostart["Auto-start manager"]
end

node_remote -->|"sends commands"| node_ws
node_remote -->|"uses relay"| node_relay
node_remote -->|"sends TCP commands"| node_tcpserver
node_dashboard -->|"manages"| node_ws
node_dashboard -->|"manages"| node_relay
node_dashboard -->|"configures"| node_accesspoint
node_dashboard -->|"uses"| node_hardware
node_dashboard -->|"uses"| node_audio
node_service -->|"hosts"| node_worker
node_worker -->|"starts listener"| node_ws
node_worker -->|"provides"| node_hardware
node_worker -->|"provides"| node_audio
node_worker -->|"starts IPC"| node_ipc
node_ws -->|"dispatches controls"| node_hardware
node_ws -->|"dispatches audio"| node_audio
node_relay -->|"dispatches controls"| node_hardware
node_relay -->|"dispatches audio"| node_audio
node_relay -->|"reuses processor"| node_ws
node_nativeentry -->|"creates controller"| node_input
node_nativeentry -->|"creates dispatcher"| node_dispatcher
node_nativeentry -->|"starts server"| node_tcpserver
node_tcpserver -->|"dispatches commands"| node_dispatcher
node_dispatcher -->|"calls input"| node_input
node_qtentry -->|"creates controller"| node_qthardware
node_qtentry -->|"creates relay"| node_qtrelay
node_qtentry -->|"uses manager"| node_autostart

click node_dashboard "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.UI/MainWindow.xaml.cs"
click node_service "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Service/Program.cs"
click node_worker "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Service/Worker.cs"
click node_ws "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/WebSocketAccessPointServer.cs"
click node_relay "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/RelayConnectionService.cs"
click node_hardware "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/NativeHardwareController.cs"
click node_audio "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/AudioEndpointController.cs"
click node_accesspoint "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/AccessPointManager.cs"
click node_ipc "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/NamedPipeIpc.cs"
click node_tcpserver "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/NetworkServer.cpp"
click node_dispatcher "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/CommandDispatcher.cpp"
click node_input "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/InputController.cpp"
click node_netutils "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/NetworkUtils.cpp"
click node_nativeentry "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/main.cpp"
click node_qtentry "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/qt-app/src/main.cpp"
click node_qthardware "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/qt-app/src/HardwareController.cpp"
click node_qtrelay "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/qt-app/src/RelayManager.cpp"
click node_autostart "https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/qt-app/src/AutoStartManager.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_remote,node_dashboard toneBlue
class node_service,node_worker,node_ws,node_relay,node_hardware,node_audio,node_accesspoint,node_ipc toneAmber
class node_tcpserver,node_dispatcher,node_input,node_netutils,node_nativeentry toneMint
class node_qtentry,node_qthardware,node_qtrelay,node_autostart toneRose
```

## Components

### Clients and UI

- **Remote clients**
- [WPF dashboard](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.UI/MainWindow.xaml.cs): `PCControl.UI/MainWindow.xaml.cs`

### .NET Runtime

- [Background service](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Service/Program.cs): `PCControl.Service/Program.cs`
- [Service worker](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Service/Worker.cs): `PCControl.Service/Worker.cs`
- [Local WebSocket server](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/WebSocketAccessPointServer.cs): `PCControl.Core/WebSocketAccessPointServer.cs`
- [Cloud relay client](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/RelayConnectionService.cs): `PCControl.Core/RelayConnectionService.cs`
- [Windows controls](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/NativeHardwareController.cs): `PCControl.Core/NativeHardwareController.cs`
- [Audio endpoints](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/AudioEndpointController.cs): `PCControl.Core/AudioEndpointController.cs`
- [Access point setup](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/AccessPointManager.cs): `PCControl.Core/AccessPointManager.cs`
- [Named pipe IPC](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/PCControl.Core/NamedPipeIpc.cs): `PCControl.Core/NamedPipeIpc.cs`

### Native TCP Engine

- [TCP server](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/NetworkServer.cpp): `src/NetworkServer.cpp`
- [Command dispatcher](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/CommandDispatcher.cpp): `src/CommandDispatcher.cpp`
- [Input synthesis](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/InputController.cpp): `src/InputController.cpp`
- [Network utilities](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/NetworkUtils.cpp): `src/NetworkUtils.cpp`
- [Native server entry](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/src/main.cpp): `src/main.cpp`

### Qt Runtime

- [Qt application](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/qt-app/src/main.cpp): `qt-app/src/main.cpp`
- [Qt hardware controls](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/qt-app/src/HardwareController.cpp): `qt-app/src/HardwareController.cpp`
- [Qt relay client](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/qt-app/src/RelayManager.cpp): `qt-app/src/RelayManager.cpp`
- [Auto-start manager](https://github.com/beatz-maaraz/beatzconnect--pc/blob/main/qt-app/src/AutoStartManager.cpp): `qt-app/src/AutoStartManager.cpp`

## Connections

- Remote clients → Local WebSocket server: sends commands (evidence: `README.md`)
- Remote clients → Cloud relay client: uses relay (evidence: `README.md`)
- Remote clients → TCP server: sends TCP commands (evidence: `README.md`)
- WPF dashboard → Local WebSocket server: manages (evidence: `PCControl.UI/MainWindow.xaml.cs`)
- WPF dashboard → Cloud relay client: manages (evidence: `PCControl.UI/MainWindow.xaml.cs`)
- WPF dashboard → Access point setup: configures (evidence: `PCControl.UI/MainWindow.xaml.cs`)
- WPF dashboard → Windows controls: uses (evidence: `PCControl.UI/MainWindow.xaml.cs`)
- WPF dashboard → Audio endpoints: uses (evidence: `PCControl.UI/MainWindow.xaml.cs`)
- Background service → Service worker: hosts (evidence: `PCControl.Service/Program.cs`)
- Service worker → Local WebSocket server: starts listener (evidence: `PCControl.Service/Worker.cs`)
- Service worker → Windows controls: provides (evidence: `PCControl.Service/Worker.cs`)
- Service worker → Audio endpoints: provides (evidence: `PCControl.Service/Worker.cs`)
- Service worker → Named pipe IPC: starts IPC (evidence: `PCControl.Service/Worker.cs`)
- Local WebSocket server → Windows controls: dispatches controls (evidence: `PCControl.Core/WebSocketAccessPointServer.cs`)
- Local WebSocket server → Audio endpoints: dispatches audio (evidence: `PCControl.Core/WebSocketAccessPointServer.cs`)
- Cloud relay client → Windows controls: dispatches controls (evidence: `PCControl.Core/RelayConnectionService.cs`)
- Cloud relay client → Audio endpoints: dispatches audio (evidence: `PCControl.Core/RelayConnectionService.cs`)
- Cloud relay client → Local WebSocket server: reuses processor (evidence: `PCControl.Core/RelayConnectionService.cs`)
- Native server entry → Input synthesis: creates controller (evidence: `src/main.cpp`)
- Native server entry → Command dispatcher: creates dispatcher (evidence: `src/main.cpp`)
- Native server entry → TCP server: starts server (evidence: `src/main.cpp`)
- TCP server → Command dispatcher: dispatches commands (evidence: `README.md`)
- Command dispatcher → Input synthesis: calls input (evidence: `README.md`)
- Qt application → Qt hardware controls: creates controller (evidence: `qt-app/src/main.cpp`)
- Qt application → Qt relay client: creates relay (evidence: `qt-app/src/main.cpp`)
- Qt application → Auto-start manager: uses manager (evidence: `qt-app/src/main.cpp`)
