# shuiju/all-in-one-mouse-driver architecture

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

- Interactive diagram: https://gitdiagram.com/shuiju/all-in-one-mouse-driver
- Repository: https://github.com/shuiju/all-in-one-mouse-driver

## Overview

Mouse Hub is a resident Windows mouse-configuration app for LAMZU, VAXEE, and Endgame Gear. Users select a device, edit or choose a profile, bind it to an executable (or make it the default), and the app applies settings as the foreground process changes; it reads settings back to confirm success. The graph preserves the documented profile migration, device-status, and native-UI branches. Main startup wiring and several UI/action files were not sampled, so edges between those components rely on README workflow statements; unsampled implementation details are not inferred.

Main entry points: [`internal/hub/engine.go`](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/engine.go) (Automation engine), [`internal/hub/devices_windows.go`](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/devices_windows.go) (Device discovery), [`native_views_windows.go`](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_views_windows.go) (UI views), [`internal/hub/readback_windows.go`](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/readback_windows.go) (Settings readback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Native interface"]
  node_native["Window and UI<br/>[native_windows.go]"]
  node_views["UI views"]
  node_deviceview["Device overview"]
  node_profileview["Profile linking"]
  node_tuningview["Device tuning"]
  node_actions["UI actions"]
  node_drafts["Edit drafts"]
end

subgraph group_profiles["Profiles and automation"]
  node_engine["Automation engine<br/>[engine.go]"]
  node_config[("Profiles and settings<br/>[config.go]")]
  node_migration["Legacy import<br/>[import_windows.go]"]
end

subgraph group_hardware["Device coordination"]
  node_process["Foreground process"]
  node_processes["Legacy-app conflicts"]
  node_hubdevices["Device discovery<br/>[devices_windows.go]"]
  node_hubreadback["Settings readback"]
end

subgraph group_lamzu["LAMZU adapter"]
  node_lamzu["LAMZU HID and settings<br/>[hid_windows.go]"]
  node_lamzuidentity["LAMZU identity"]
  node_lamzutrajectory["LAMZU trajectory<br/>[trajectory.go]"]
end

subgraph group_vaxee["VAXEE adapter"]
  node_vaxee["VAXEE HID and settings<br/>[hid_windows.go]"]
  node_vaxeeidentity["VAXEE identity"]
end

subgraph group_endgame["Endgame adapter"]
  node_endgamehid["Endgame HID<br/>[hid_windows.go]"]
  node_endgameprotocol["Endgame protocol<br/>[protocol.go]"]
end

node_user(("User"))
node_windows["Windows"]

node_user -->|"uses"| node_native
node_native -->|"renders"| node_views
node_views -->|"shows devices"| node_deviceview
node_views -->|"shows bindings"| node_profileview
node_views -->|"shows controls"| node_tuningview
node_user -->|"edits"| node_actions
node_actions -->|"updates"| node_drafts
node_actions -->|"requests changes"| node_engine
node_engine -->|"loads and saves"| node_config
node_engine -->|"checks foreground"| node_process
node_windows -->|"reports foreground"| node_process
node_engine -->|"checks conflicts"| node_processes
node_engine -->|"discovers devices"| node_hubdevices
node_windows -->|"reports HID devices"| node_hubdevices
node_hubdevices -->|"discovers"| node_lamzu
node_hubdevices -->|"discovers"| node_vaxee
node_hubdevices -->|"discovers"| node_endgamehid
node_engine -->|"confirms settings"| node_hubreadback
node_hubreadback -->|"reads settings"| node_lamzu
node_hubreadback -->|"reads settings"| node_vaxee
node_hubreadback -->|"reads settings"| node_endgameprotocol
node_lamzu -->|"reads identity"| node_lamzuidentity
node_lamzu -->|"supports trajectory"| node_lamzutrajectory
node_vaxee -->|"reads identity"| node_vaxeeidentity
node_endgamehid -->|"uses protocol"| node_endgameprotocol
node_user -->|"imports legacy config"| node_migration
node_migration -->|"migrates profiles"| node_config
node_config -->|"supplies profiles"| node_engine

click node_native "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_windows.go"
click node_views "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_views_windows.go"
click node_deviceview "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_view_devices_windows.go"
click node_profileview "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_view_profiles_windows.go"
click node_tuningview "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_view_tuning_windows.go"
click node_actions "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_actions_windows.go"
click node_drafts "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_drafts_windows.go"
click node_engine "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/engine.go"
click node_config "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/config.go"
click node_migration "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/import_windows.go"
click node_process "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/platform/foreground_windows.go"
click node_processes "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/platform/processes_windows.go"
click node_hubdevices "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/devices_windows.go"
click node_hubreadback "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/readback_windows.go"
click node_lamzu "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/lamzu/hid_windows.go"
click node_lamzuidentity "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/lamzu/identity_windows.go"
click node_lamzutrajectory "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/lamzu/trajectory.go"
click node_vaxee "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/vaxee/hid_windows.go"
click node_vaxeeidentity "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/vaxee/identity_windows.go"
click node_endgamehid "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/endgame/hid_windows.go"
click node_endgameprotocol "https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/endgame/protocol.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_native,node_views,node_deviceview,node_profileview,node_tuningview,node_actions,node_drafts,node_user toneBlue
class node_engine,node_config,node_migration toneAmber
class node_process,node_processes,node_hubdevices,node_hubreadback toneMint
class node_lamzu,node_lamzuidentity,node_lamzutrajectory toneRose
class node_vaxee,node_vaxeeidentity,node_windows toneIndigo
class node_endgamehid,node_endgameprotocol toneTeal
```

## Components

### Native interface

- [Window and UI](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_windows.go): `native_windows.go`
- [UI views](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_views_windows.go): `native_views_windows.go`
- [Device overview](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_view_devices_windows.go): `native_view_devices_windows.go`
- [Profile linking](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_view_profiles_windows.go): `native_view_profiles_windows.go`
- [Device tuning](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_view_tuning_windows.go): `native_view_tuning_windows.go`
- [UI actions](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_actions_windows.go): `native_actions_windows.go`
- [Edit drafts](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/native_drafts_windows.go): `native_drafts_windows.go`

### Profiles and automation

- [Automation engine](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/engine.go): `internal/hub/engine.go`
- [Profiles and settings](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/config.go): `internal/hub/config.go`
- [Legacy import](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/import_windows.go): `internal/hub/import_windows.go`

### Device coordination

- [Foreground process](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/platform/foreground_windows.go): `internal/platform/foreground_windows.go`
- [Legacy-app conflicts](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/platform/processes_windows.go): `internal/platform/processes_windows.go`
- [Device discovery](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/devices_windows.go): `internal/hub/devices_windows.go`
- [Settings readback](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/hub/readback_windows.go): `internal/hub/readback_windows.go`

### LAMZU adapter

- [LAMZU HID and settings](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/lamzu/hid_windows.go): `internal/lamzu/hid_windows.go`
- [LAMZU identity](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/lamzu/identity_windows.go): `internal/lamzu/identity_windows.go`
- [LAMZU trajectory](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/lamzu/trajectory.go): `internal/lamzu/trajectory.go`

### VAXEE adapter

- [VAXEE HID and settings](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/vaxee/hid_windows.go): `internal/vaxee/hid_windows.go`
- [VAXEE identity](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/vaxee/identity_windows.go): `internal/vaxee/identity_windows.go`

### Endgame adapter

- [Endgame HID](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/endgame/hid_windows.go): `internal/endgame/hid_windows.go`
- [Endgame protocol](https://github.com/shuiju/all-in-one-mouse-driver/blob/master/internal/endgame/protocol.go): `internal/endgame/protocol.go`

### Other components

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

## Connections

- User → Window and UI: uses
- Window and UI → UI views: renders (evidence: `native_windows.go`)
- UI views → Device overview: shows devices
- UI views → Profile linking: shows bindings
- UI views → Device tuning: shows controls
- User → UI actions: edits
- UI actions → Edit drafts: updates
- UI actions → Automation engine: requests changes
- Automation engine → Profiles and settings: loads and saves (evidence: `internal/hub/engine.go`)
- Automation engine → Foreground process: checks foreground
- Windows → Foreground process: reports foreground (evidence: `internal/platform/foreground_windows.go`)
- Automation engine → Legacy-app conflicts: checks conflicts
- Automation engine → Device discovery: discovers devices (evidence: `internal/hub/engine.go`)
- Windows → Device discovery: reports HID devices
- Device discovery → LAMZU HID and settings: discovers
- Device discovery → VAXEE HID and settings: discovers
- Device discovery → Endgame HID: discovers
- Automation engine → Settings readback: confirms settings (evidence: `internal/hub/engine.go`)
- Settings readback → LAMZU HID and settings: reads settings
- Settings readback → VAXEE HID and settings: reads settings
- Settings readback → Endgame protocol: reads settings
- LAMZU HID and settings → LAMZU identity: reads identity
- LAMZU HID and settings → LAMZU trajectory: supports trajectory
- VAXEE HID and settings → VAXEE identity: reads identity
- Endgame HID → Endgame protocol: uses protocol (evidence: `internal/endgame/protocol.go`)
- User → Legacy import: imports legacy config
- Legacy import → Profiles and settings: migrates profiles
- Profiles and settings → Automation engine: supplies profiles
