# w00zla/bindsight architecture

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

- Interactive diagram: https://gitdiagram.com/w00zla/bindsight
- Repository: https://github.com/w00zla/bindsight

## Overview

BindSight is a Tauri desktop utility for inspecting and managing Star Citizen input bindings. Its central workflow loads game configuration and connected-device state, then lets users inspect bindings through live input or action search, visualize device inputs, and edit bindings or device maps. Separate capabilities include profile comparison, backups, joystick-order correction, game-environment settings, and device diagnostics. The graph reflects documented features where implementation excerpts are absent; those subsystem paths use the exact source files or directories available in the tree.

Main entry points: [`src/App.vue`](https://github.com/w00zla/bindsight/blob/main/src/App.vue) (App shell), [`src-tauri/src/lib.rs`](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/lib.rs) (Tauri commands), [`src/components/BindingsView.vue`](https://github.com/w00zla/bindsight/blob/main/src/components/BindingsView.vue) (Bindings view), [`src/components/ImageStage.vue`](https://github.com/w00zla/bindsight/blob/main/src/components/ImageStage.vue) (Monitor display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Desktop interface"]
  node_app["App shell<br/>[App.vue]"]
  node_binding_view["Bindings view<br/>[BindingsView.vue]"]
  node_monitor_view["Monitor display<br/>[ImageStage.vue]"]
  node_map_editor["Map editor<br/>[ImageMapEditor.vue]"]
  node_tauri["Tauri commands<br/>[lib.rs]"]
end

subgraph group_input["Input monitoring"]
  node_keyboard_capture["Keyboard capture<br/>[keyboard.ts]"]
  node_sdl_input["SDL device input<br/>[input.rs]"]
  node_device_helpers["Device helpers<br/>[devices.ts]"]
  node_device_inventory["Device details<br/>[hid.rs]"]
end

subgraph group_bindings["Binding management"]
  node_binding_engine["Binding index<br/>[bindings.rs]"]
  node_profile_ops["Binding profiles"]
  node_binding_compare["Binding compare<br/>[diff.rs]"]
  node_rebind["Rebinding<br/>[rebind.rs]"]
  node_backup["Backups<br/>[backups.rs]"]
end

subgraph group_game["Game data and order"]
  node_game_config["Game configuration<br/>[config.rs]"]
  node_sc_data["Star Citizen data<br/>[scdata.rs]"]
  node_game_log["Game log<br/>[gamelog.rs]"]
  node_order_fix["Joystick order<br/>[order.rs]"]
  node_wine_order["Wine diagnostics<br/>[wineorder.rs]"]
end

subgraph group_devices["Device visualizations"]
  node_map_backend["Image-map storage<br/>[imagemap.rs]"]
  node_map_types["Image-map model<br/>[imagemap.ts]"]
end

node_user(("Player"))
node_star_citizen[("Star Citizen files")]

node_user -->|"uses"| node_app
node_app -->|"invokes commands"| node_tauri
node_app -->|"shows monitor"| node_monitor_view
node_app -->|"shows bindings"| node_binding_view
node_app -->|"opens editor"| node_map_editor
node_keyboard_capture -->|"captures keys"| node_app
node_sdl_input -->|"emits input events"| node_app
node_app -.->|"starts input"| node_sdl_input
node_app -->|"uses device state"| node_device_helpers
node_monitor_view -->|"uses device helpers"| node_device_helpers
node_monitor_view -->|"renders maps"| node_map_types
node_binding_view -->|"requests binding operations"| node_tauri
node_tauri -->|"dispatches binding commands"| node_binding_engine
node_binding_engine -->|"uses game action data"| node_sc_data
node_binding_engine -->|"uses device order"| node_game_log
node_binding_view -.->|"manages profiles"| node_profile_ops
node_binding_view -->|"compares bindings"| node_binding_compare
node_binding_view -->|"manages backups"| node_backup
node_binding_view -.->|"edits bindings"| node_rebind
node_tauri -->|"loads settings"| node_game_config
node_tauri -.->|"loads game data"| node_sc_data
node_sc_data -->|"parses game data"| node_star_citizen
node_game_log -.->|"reads game log"| node_star_citizen
node_order_fix -.->|"corrects device slots"| node_star_citizen
node_wine_order -->|"diagnoses order"| node_order_fix
node_app -.->|"shows device info"| node_device_inventory
node_map_editor -->|"imports and exports maps"| node_tauri
node_tauri -->|"dispatches map commands"| node_map_backend
node_map_backend -->|"uses configuration"| node_game_config
node_map_editor -->|"edits map model"| node_map_types

click node_app "https://github.com/w00zla/bindsight/blob/main/src/App.vue"
click node_binding_view "https://github.com/w00zla/bindsight/blob/main/src/components/BindingsView.vue"
click node_monitor_view "https://github.com/w00zla/bindsight/blob/main/src/components/ImageStage.vue"
click node_map_editor "https://github.com/w00zla/bindsight/blob/main/src/components/ImageMapEditor.vue"
click node_keyboard_capture "https://github.com/w00zla/bindsight/blob/main/src/keyboard.ts"
click node_sdl_input "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/input.rs"
click node_device_helpers "https://github.com/w00zla/bindsight/blob/main/src/devices.ts"
click node_binding_engine "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/bindings.rs"
click node_profile_ops "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/binding_profiles.rs"
click node_binding_compare "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/diff.rs"
click node_rebind "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/rebind.rs"
click node_backup "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/backups.rs"
click node_game_config "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/config.rs"
click node_sc_data "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/scdata.rs"
click node_game_log "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/gamelog.rs"
click node_order_fix "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/order.rs"
click node_wine_order "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/wineorder.rs"
click node_map_backend "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/imagemap.rs"
click node_map_types "https://github.com/w00zla/bindsight/blob/main/src/imagemap.ts"
click node_device_inventory "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/hid.rs"
click node_tauri "https://github.com/w00zla/bindsight/blob/main/src-tauri/src/lib.rs"

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_binding_view,node_monitor_view,node_map_editor,node_tauri toneBlue
class node_keyboard_capture,node_sdl_input,node_device_helpers,node_device_inventory,node_star_citizen toneAmber
class node_binding_engine,node_profile_ops,node_binding_compare,node_rebind,node_backup toneMint
class node_game_config,node_sc_data,node_game_log,node_order_fix,node_wine_order toneRose
class node_map_backend,node_map_types,node_user toneIndigo
```

## Components

### Desktop interface

- [App shell](https://github.com/w00zla/bindsight/blob/main/src/App.vue): `src/App.vue`
- [Bindings view](https://github.com/w00zla/bindsight/blob/main/src/components/BindingsView.vue): `src/components/BindingsView.vue`
- [Monitor display](https://github.com/w00zla/bindsight/blob/main/src/components/ImageStage.vue): `src/components/ImageStage.vue`
- [Map editor](https://github.com/w00zla/bindsight/blob/main/src/components/ImageMapEditor.vue): `src/components/ImageMapEditor.vue`
- [Tauri commands](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Input monitoring

- [Keyboard capture](https://github.com/w00zla/bindsight/blob/main/src/keyboard.ts): `src/keyboard.ts`
- [SDL device input](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/input.rs): `src-tauri/src/input.rs`
- [Device helpers](https://github.com/w00zla/bindsight/blob/main/src/devices.ts): `src/devices.ts`
- [Device details](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/hid.rs): `src-tauri/src/hid.rs`

### Binding management

- [Binding index](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/bindings.rs): `src-tauri/src/bindings.rs`
- [Binding profiles](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/binding_profiles.rs): `src-tauri/src/binding_profiles.rs`
- [Binding compare](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/diff.rs): `src-tauri/src/diff.rs`
- [Rebinding](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/rebind.rs): `src-tauri/src/rebind.rs`
- [Backups](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/backups.rs): `src-tauri/src/backups.rs`

### Game data and order

- [Game configuration](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/config.rs): `src-tauri/src/config.rs`
- [Star Citizen data](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/scdata.rs): `src-tauri/src/scdata.rs`
- [Game log](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/gamelog.rs): `src-tauri/src/gamelog.rs`
- [Joystick order](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/order.rs): `src-tauri/src/order.rs`
- [Wine diagnostics](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/wineorder.rs): `src-tauri/src/wineorder.rs`

### Device visualizations

- [Image-map storage](https://github.com/w00zla/bindsight/blob/main/src-tauri/src/imagemap.rs): `src-tauri/src/imagemap.rs`
- [Image-map model](https://github.com/w00zla/bindsight/blob/main/src/imagemap.ts): `src/imagemap.ts`

### Other components

- **Player**
- **Star Citizen files**

## Connections

- Player → App shell: uses
- App shell → Tauri commands: invokes commands (evidence: `src/App.vue`)
- App shell → Monitor display: shows monitor (evidence: `src/App.vue`)
- App shell → Bindings view: shows bindings (evidence: `src/App.vue`)
- App shell → Map editor: opens editor (evidence: `src/App.vue`)
- Keyboard capture → App shell: captures keys (evidence: `src/keyboard.ts`)
- SDL device input → App shell: emits input events (evidence: `src-tauri/src/input.rs`)
- App shell → SDL device input: starts input
- App shell → Device helpers: uses device state (evidence: `src/App.vue`)
- Monitor display → Device helpers: uses device helpers (evidence: `src/components/ImageStage.vue`)
- Monitor display → Image-map model: renders maps (evidence: `src/components/ImageStage.vue`)
- Bindings view → Tauri commands: requests binding operations (evidence: `src/components/BindingsView.vue`)
- Tauri commands → Binding index: dispatches binding commands (evidence: `src-tauri/src/lib.rs`)
- Binding index → Star Citizen data: uses game action data (evidence: `src-tauri/src/bindings.rs`)
- Binding index → Game log: uses device order (evidence: `src-tauri/src/bindings.rs`)
- Bindings view → Binding profiles: manages profiles
- Bindings view → Binding compare: compares bindings (evidence: `src/components/BindingsView.vue`)
- Bindings view → Backups: manages backups (evidence: `src/components/BindingsView.vue`)
- Bindings view → Rebinding: edits bindings
- Tauri commands → Game configuration: loads settings (evidence: `src-tauri/src/lib.rs`)
- Tauri commands → Star Citizen data: loads game data (evidence: `src-tauri/src/lib.rs`)
- Star Citizen data → Star Citizen files: parses game data
- Game log → Star Citizen files: reads game log
- Joystick order → Star Citizen files: corrects device slots
- Wine diagnostics → Joystick order: diagnoses order (evidence: `src-tauri/src/wineorder.rs`)
- App shell → Device details: shows device info
- Map editor → Tauri commands: imports and exports maps (evidence: `src/components/ImageMapEditor.vue`)
- Tauri commands → Image-map storage: dispatches map commands (evidence: `src-tauri/src/lib.rs`)
- Image-map storage → Game configuration: uses configuration (evidence: `src-tauri/src/imagemap.rs`)
- Map editor → Image-map model: edits map model (evidence: `src/components/ImageMapEditor.vue`)
