# jurkovic-nikola/openlinkhub architecture

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

- Interactive diagram: https://gitdiagram.com/jurkovic-nikola/openlinkhub
- Repository: https://github.com/jurkovic-nikola/openlinkhub

## Overview

OpenLinkHub is a Linux hardware-control service with a browser dashboard. The main user workflow is to open the local UI, issue control requests, and view device and system status; the backend also initializes device management and monitoring at startup. Device-specific drivers implement hardware control, while temperature profiles, RGB effects, memory, motherboard PWM, and OpenRGB/audio integrations provide distinct capabilities. Relationships below follow explicit startup calls, visible API dispatches, or README descriptions; some internal runtime links are left unasserted because their source was not shown.

Main entry points: [`src/controller/controller.go`](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/controller/controller.go) (Lifecycle controller), [`src/server/server.go`](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/server/server.go) (HTTP server), [`src/devices/lsh/lsh.go`](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/devices/lsh/lsh.go) (iCUE Link hub driver), [`static/js/index.js`](https://github.com/jurkovic-nikola/openlinkhub/blob/main/static/js/index.js) (Dashboard UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_main["Process entry<br/>[main.go]"]
  node_controller["Lifecycle controller<br/>[controller.go]"]
  node_config["Configuration<br/>[config.go]"]
end

subgraph group_web["Web interface"]
  node_server["HTTP server<br/>[server.go]"]
  node_requests["Request handlers<br/>[requests.go]"]
  node_browser["Dashboard UI<br/>[index.js]"]
  node_controllerui["Controller UI<br/>[controller.js]"]
  node_templates["Page templates<br/>[templates.go]"]
end

subgraph group_hardware["Hardware control"]
  node_devices["Device registry<br/>[devices.go]"]
  node_drivers["Corsair device drivers"]
  node_lsh["iCUE Link hub driver<br/>[lsh.go]"]
  node_memory["Memory support<br/>[memory.go]"]
  node_motherboard["Motherboard PWM<br/>[motherboards.go]"]
end

subgraph group_sensors["Monitoring and effects"]
  node_temperatures["Temperature profiles<br/>[temperatures.go]"]
  node_rgb["RGB effects<br/>[rgb.go]"]
  node_monitor["System monitor<br/>[monitor.go]"]
end

subgraph group_integrations["Integrations"]
  node_input["Input emulation<br/>[inputmanager.go]"]
  node_audio["Virtual audio engine<br/>[audio.c]"]
  node_openrgb["OpenRGB bridge<br/>[openrgb.go]"]
end

node_operator(("Operator"))
node_hardwareworld["USB hardware"]

node_operator -->|"uses"| node_browser
node_browser -->|"sends API requests"| node_server
node_controllerui -->|"sends controller requests"| node_server
node_server -->|"dispatches"| node_requests
node_main -->|"starts"| node_controller
node_controller -->|"initializes"| node_config
node_controller -->|"initializes"| node_server
node_controller -->|"initializes"| node_devices
node_controller -->|"initializes"| node_temperatures
node_controller -->|"initializes"| node_rgb
node_controller -->|"initializes"| node_input
node_controller -->|"initializes"| node_audio
node_controller -->|"initializes"| node_monitor
node_controller -->|"initializes"| node_motherboard
node_devices -.->|"dispatches to"| node_drivers
node_lsh -->|"registers controller"| node_openrgb
node_lsh -->|"adds profile"| node_temperatures
node_lsh -.->|"controls"| node_hardwareworld
node_operator -.->|"configures"| node_hardwareworld
node_operator -.->|"manages"| node_memory
node_operator -.->|"configures"| node_motherboard
node_operator -.->|"integrates"| node_openrgb

click node_main "https://github.com/jurkovic-nikola/openlinkhub/blob/main/main.go"
click node_controller "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/controller/controller.go"
click node_config "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/config/config.go"
click node_server "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/server/server.go"
click node_requests "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/server/requests/requests.go"
click node_browser "https://github.com/jurkovic-nikola/openlinkhub/blob/main/static/js/index.js"
click node_controllerui "https://github.com/jurkovic-nikola/openlinkhub/blob/main/static/js/controller.js"
click node_templates "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/templates/templates.go"
click node_devices "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/devices/devices.go"
click node_drivers "https://github.com/jurkovic-nikola/openlinkhub/tree/main/src/devices"
click node_lsh "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/devices/lsh/lsh.go"
click node_temperatures "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/temperatures/temperatures.go"
click node_rgb "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/rgb/rgb.go"
click node_memory "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/devices/memory/memory.go"
click node_motherboard "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/motherboards/motherboards.go"
click node_input "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/inputmanager/inputmanager.go"
click node_audio "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/audio/audio.c"
click node_openrgb "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/openrgb/openrgb.go"
click node_monitor "https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/monitor/monitor.go"

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_main,node_controller,node_config toneBlue
class node_server,node_requests,node_browser,node_controllerui,node_templates toneAmber
class node_devices,node_drivers,node_lsh,node_memory,node_motherboard toneMint
class node_temperatures,node_rgb,node_monitor toneRose
class node_input,node_audio,node_openrgb,node_operator,node_hardwareworld toneIndigo
```

## Components

### Application

- [Process entry](https://github.com/jurkovic-nikola/openlinkhub/blob/main/main.go): `main.go`
- [Lifecycle controller](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/controller/controller.go): `src/controller/controller.go`
- [Configuration](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/config/config.go): `src/config/config.go`

### Web interface

- [HTTP server](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/server/server.go): `src/server/server.go`
- [Request handlers](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/server/requests/requests.go): `src/server/requests/requests.go`
- [Dashboard UI](https://github.com/jurkovic-nikola/openlinkhub/blob/main/static/js/index.js): `static/js/index.js`
- [Controller UI](https://github.com/jurkovic-nikola/openlinkhub/blob/main/static/js/controller.js): `static/js/controller.js`
- [Page templates](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/templates/templates.go): `src/templates/templates.go`

### Hardware control

- [Device registry](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/devices/devices.go): `src/devices/devices.go`
- [Corsair device drivers](https://github.com/jurkovic-nikola/openlinkhub/tree/main/src/devices): `src/devices`
- [iCUE Link hub driver](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/devices/lsh/lsh.go): `src/devices/lsh/lsh.go`
- [Memory support](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/devices/memory/memory.go): `src/devices/memory/memory.go`
- [Motherboard PWM](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/motherboards/motherboards.go): `src/motherboards/motherboards.go`

### Monitoring and effects

- [Temperature profiles](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/temperatures/temperatures.go): `src/temperatures/temperatures.go`
- [RGB effects](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/rgb/rgb.go): `src/rgb/rgb.go`
- [System monitor](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/monitor/monitor.go): `src/monitor/monitor.go`

### Integrations

- [Input emulation](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/inputmanager/inputmanager.go): `src/inputmanager/inputmanager.go`
- [Virtual audio engine](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/audio/audio.c): `src/audio/audio.c`
- [OpenRGB bridge](https://github.com/jurkovic-nikola/openlinkhub/blob/main/src/openrgb/openrgb.go): `src/openrgb/openrgb.go`

### Other components

- **Operator**
- **USB hardware**

## Connections

- Operator → Dashboard UI: uses
- Dashboard UI → HTTP server: sends API requests (evidence: `static/js/index.js`)
- Controller UI → HTTP server: sends controller requests (evidence: `static/js/controller.js`)
- HTTP server → Request handlers: dispatches (evidence: `src/server/server.go`)
- Process entry → Lifecycle controller: starts (evidence: `main.go`)
- Lifecycle controller → Configuration: initializes (evidence: `src/controller/controller.go`)
- Lifecycle controller → HTTP server: initializes (evidence: `src/controller/controller.go`)
- Lifecycle controller → Device registry: initializes (evidence: `src/controller/controller.go`)
- Lifecycle controller → Temperature profiles: initializes (evidence: `src/controller/controller.go`)
- Lifecycle controller → RGB effects: initializes (evidence: `src/controller/controller.go`)
- Lifecycle controller → Input emulation: initializes (evidence: `src/controller/controller.go`)
- Lifecycle controller → Virtual audio engine: initializes (evidence: `src/controller/controller.go`)
- Lifecycle controller → System monitor: initializes (evidence: `src/controller/controller.go`)
- Lifecycle controller → Motherboard PWM: initializes (evidence: `src/controller/controller.go`)
- Device registry → Corsair device drivers: dispatches to
- iCUE Link hub driver → OpenRGB bridge: registers controller (evidence: `src/devices/lsh/lsh.go`)
- iCUE Link hub driver → Temperature profiles: adds profile (evidence: `src/devices/lsh/lsh.go`)
- iCUE Link hub driver → USB hardware: controls
- Operator → USB hardware: configures
- Operator → Memory support: manages
- Operator → Motherboard PWM: configures
- Operator → OpenRGB bridge: integrates
