# shybruh/fightingcontrolcenter-fcc architecture

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

- Interactive diagram: https://gitdiagram.com/shybruh/fightingcontrolcenter-fcc
- Repository: https://github.com/shybruh/fightingcontrolcenter-fcc

## Overview

Fighting Control Center is a desktop/web configurator for Hall-effect and selected other USB keyboards. The main workflow is to connect a board, identify its protocol, read its settings into application state, edit profiles and keyboard features, then write changes over the matching USB transport. The graph preserves documented feature areas and desktop integrations; several panel-to-runtime links are dashed because their implementation was not sampled. Relationships shown with source evidence come from the excerpts or SOURCE INDEX; broader capability links use the README.

Main entry points: [`app/src/store.ts`](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/store.ts) (Keyboard and profile state), [`app/src/devices/registry.ts`](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/devices/registry.ts) (Device registry and layouts), [`app/src/App.tsx`](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/App.tsx) (App entry and connection), [`app/src/hid/mc.ts`](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/mc.ts) (MCHOSE driver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Configurator experience"]
  node_app["App entry and connection<br/>[App.tsx]"]
  node_shell["Configurator shell<br/>[Shell.tsx]"]
  node_feature_panels["Feature panels"]
  node_lighting_preview["Lighting preview<br/>[preview.ts]"]
  node_lighting_presets["Lighting presets<br/>[presets.ts]"]
end

subgraph group_state["Profiles and device model"]
  node_store["Keyboard and profile state<br/>[store.ts]"]
  node_device_catalog["Device registry and layouts<br/>[registry.ts]"]
  node_key_layout["Keyboard layouts<br/>[layout.ts]"]
  node_codec["Settings codec<br/>[codec.ts]"]
end

subgraph group_protocols["Keyboard protocols"]
  node_transport["USB transport<br/>[transport.ts]"]
  node_wire_protocol["Sonix wire protocol<br/>[protocol.ts]"]
  node_mc_driver["MCHOSE driver<br/>[mc.ts]"]
  node_ry_driver["RongYuan driver<br/>[ry.ts]"]
  node_other_drivers["Other keyboard drivers"]
end

subgraph group_platform["Desktop platform"]
  node_tauri_bridge["Tauri HID bridge<br/>[tauri.ts]"]
  node_rust_hid["Native HID commands<br/>[hid.rs]"]
  node_desktop_integration["Desktop integration<br/>[integration.ts]"]
  node_updates["Update checking<br/>[updates.ts]"]
end

subgraph group_support["Diagnostics and support"]
  node_diagnostics["Diagnostics<br/>[Diagnostics.tsx]"]
  node_scan["Device scanning<br/>[scan.ts]"]
  node_report["Keyboard reports<br/>[ReportDialog.tsx]"]
end

node_user(("Keyboard user"))
node_github["GitHub Releases and issues"]
node_keyboard["USB keyboard"]

node_user -->|"connects or edits"| node_app
node_app -->|"renders"| node_shell
node_shell -.->|"hosts"| node_feature_panels
node_user -.->|"configures features"| node_feature_panels
node_feature_panels -.->|"updates settings"| node_store
node_feature_panels -.->|"previews effects"| node_lighting_preview
node_lighting_presets -.->|"supplies designs"| node_lighting_preview
node_app -->|"connects keyboard"| node_store
node_store -->|"identifies board"| node_device_catalog
node_store -->|"opens connection"| node_transport
node_device_catalog -->|"sets layout"| node_key_layout
node_device_catalog -->|"configures capabilities"| node_codec
node_store -->|"creates driver"| node_mc_driver
node_store -->|"creates driver"| node_ry_driver
node_store -->|"creates drivers"| node_other_drivers
node_mc_driver -->|"encodes settings"| node_codec
node_ry_driver -->|"encodes settings"| node_codec
node_mc_driver -->|"reads device definitions"| node_device_catalog
node_ry_driver -->|"reads device definitions"| node_device_catalog
node_mc_driver -->|"exchanges reports"| node_transport
node_ry_driver -->|"exchanges reports"| node_transport
node_transport -.->|"sends USB reports"| node_keyboard
node_store -->|"opens desktop HID"| node_tauri_bridge
node_tauri_bridge -->|"invokes HID commands"| node_rust_hid
node_app -->|"renders"| node_diagnostics
node_diagnostics -->|"uses scan data"| node_scan
node_scan -->|"matches devices"| node_device_catalog
node_user -.->|"requests report"| node_report
node_report -.->|"opens issue"| node_github
node_desktop_integration -->|"uses keyboard state"| node_store
node_updates -->|"checks releases"| node_github

click node_app "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/App.tsx"
click node_shell "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/components/Shell.tsx"
click node_feature_panels "https://github.com/shybruh/fightingcontrolcenter-fcc/tree/main/app/src/components"
click node_lighting_preview "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/lighting/preview.ts"
click node_lighting_presets "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/lighting/presets.ts"
click node_store "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/store.ts"
click node_device_catalog "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/devices/registry.ts"
click node_key_layout "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/data/layout.ts"
click node_codec "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/codec.ts"
click node_transport "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/transport.ts"
click node_wire_protocol "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/protocol.ts"
click node_mc_driver "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/mc.ts"
click node_ry_driver "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/ry.ts"
click node_other_drivers "https://github.com/shybruh/fightingcontrolcenter-fcc/tree/main/app/src/hid"
click node_tauri_bridge "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/tauri.ts"
click node_rust_hid "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src-tauri/src/hid.rs"
click node_desktop_integration "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/desktop/integration.ts"
click node_updates "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/desktop/updates.ts"
click node_diagnostics "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/components/Diagnostics.tsx"
click node_scan "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/diag/scan.ts"
click node_report "https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/components/ReportDialog.tsx"

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_app,node_shell,node_feature_panels,node_lighting_preview,node_lighting_presets,node_user toneBlue
class node_store,node_device_catalog,node_key_layout,node_codec toneAmber
class node_transport,node_wire_protocol,node_mc_driver,node_ry_driver,node_other_drivers toneMint
class node_tauri_bridge,node_rust_hid,node_desktop_integration,node_updates toneRose
class node_diagnostics,node_scan,node_report,node_github,node_keyboard toneIndigo
```

## Components

### Configurator experience

- [App entry and connection](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/App.tsx): `app/src/App.tsx`
- [Configurator shell](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/components/Shell.tsx): `app/src/components/Shell.tsx`
- [Feature panels](https://github.com/shybruh/fightingcontrolcenter-fcc/tree/main/app/src/components): `app/src/components`
- [Lighting preview](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/lighting/preview.ts): `app/src/lighting/preview.ts`
- [Lighting presets](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/lighting/presets.ts): `app/src/lighting/presets.ts`

### Profiles and device model

- [Keyboard and profile state](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/store.ts): `app/src/store.ts`
- [Device registry and layouts](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/devices/registry.ts): `app/src/devices/registry.ts`
- [Keyboard layouts](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/data/layout.ts): `app/src/data/layout.ts`
- [Settings codec](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/codec.ts): `app/src/hid/codec.ts`

### Keyboard protocols

- [USB transport](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/transport.ts): `app/src/hid/transport.ts`
- [Sonix wire protocol](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/protocol.ts): `app/src/hid/protocol.ts`
- [MCHOSE driver](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/mc.ts): `app/src/hid/mc.ts`
- [RongYuan driver](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/ry.ts): `app/src/hid/ry.ts`
- [Other keyboard drivers](https://github.com/shybruh/fightingcontrolcenter-fcc/tree/main/app/src/hid): `app/src/hid`

### Desktop platform

- [Tauri HID bridge](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/hid/tauri.ts): `app/src/hid/tauri.ts`
- [Native HID commands](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src-tauri/src/hid.rs): `app/src-tauri/src/hid.rs`
- [Desktop integration](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/desktop/integration.ts): `app/src/desktop/integration.ts`
- [Update checking](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/desktop/updates.ts): `app/src/desktop/updates.ts`

### Diagnostics and support

- [Diagnostics](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/components/Diagnostics.tsx): `app/src/components/Diagnostics.tsx`
- [Device scanning](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/diag/scan.ts): `app/src/diag/scan.ts`
- [Keyboard reports](https://github.com/shybruh/fightingcontrolcenter-fcc/blob/main/app/src/components/ReportDialog.tsx): `app/src/components/ReportDialog.tsx`

### Other components

- **Keyboard user**
- **GitHub Releases and issues**
- **USB keyboard**

## Connections

- Keyboard user → App entry and connection: connects or edits (evidence: `app/src/App.tsx`)
- App entry and connection → Configurator shell: renders (evidence: `app/src/App.tsx`)
- Configurator shell → Feature panels: hosts
- Keyboard user → Feature panels: configures features
- Feature panels → Keyboard and profile state: updates settings (evidence: `app/src/components/SettingsPanel.tsx`)
- Feature panels → Lighting preview: previews effects
- Lighting presets → Lighting preview: supplies designs
- App entry and connection → Keyboard and profile state: connects keyboard (evidence: `app/src/App.tsx`)
- Keyboard and profile state → Device registry and layouts: identifies board (evidence: `app/src/store.ts`)
- Keyboard and profile state → USB transport: opens connection (evidence: `app/src/store.ts`)
- Device registry and layouts → Keyboard layouts: sets layout (evidence: `app/src/devices/registry.ts`)
- Device registry and layouts → Settings codec: configures capabilities (evidence: `app/src/devices/registry.ts`)
- Keyboard and profile state → MCHOSE driver: creates driver (evidence: `app/src/store.ts`)
- Keyboard and profile state → RongYuan driver: creates driver (evidence: `app/src/store.ts`)
- Keyboard and profile state → Other keyboard drivers: creates drivers (evidence: `app/src/store.ts`)
- MCHOSE driver → Settings codec: encodes settings (evidence: `app/src/hid/mc.ts`)
- RongYuan driver → Settings codec: encodes settings (evidence: `app/src/hid/ry.ts`)
- MCHOSE driver → Device registry and layouts: reads device definitions (evidence: `app/src/hid/mc.ts`)
- RongYuan driver → Device registry and layouts: reads device definitions (evidence: `app/src/hid/ry.ts`)
- MCHOSE driver → USB transport: exchanges reports (evidence: `app/src/hid/mc.ts`)
- RongYuan driver → USB transport: exchanges reports (evidence: `app/src/hid/ry.ts`)
- USB transport → USB keyboard: sends USB reports
- Keyboard and profile state → Tauri HID bridge: opens desktop HID (evidence: `app/src/store.ts`)
- Tauri HID bridge → Native HID commands: invokes HID commands (evidence: `app/src/hid/tauri.ts`)
- App entry and connection → Diagnostics: renders (evidence: `app/src/App.tsx`)
- Diagnostics → Device scanning: uses scan data (evidence: `app/src/components/Diagnostics.tsx`)
- Device scanning → Device registry and layouts: matches devices (evidence: `app/src/diag/scan.ts`)
- Keyboard user → Keyboard reports: requests report
- Keyboard reports → GitHub Releases and issues: opens issue
- Desktop integration → Keyboard and profile state: uses keyboard state (evidence: `app/src/desktop/integration.ts`)
- Update checking → GitHub Releases and issues: checks releases
