# game1024/openspeedy architecture

> Architecture diagram of the GitHub repository game1024/openspeedy, 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/game1024/openspeedy
- Repository: https://github.com/game1024/openspeedy

## Overview

OpenSpeedy is a Windows desktop game-speed controller. Users select a running game, adjust its speed in the UI or with shortcuts, and the app changes the game’s perceived timing through system-time hooks. The graph separates UI and settings, Rust app services, and the native bridge/hook implementation. Several backend details and UI-to-backend command paths are not shown in the excerpts, so those relationships are omitted or marked unverified rather than inferred as direct calls.

Main entry points: [`src-tauri/src/lib.rs`](https://github.com/game1024/openspeedy/blob/master/src-tauri/src/lib.rs) (Tauri command host), [`src/App.tsx`](https://github.com/game1024/openspeedy/blob/master/src/App.tsx) (App shell), [`src/components/SettingsManager.tsx`](https://github.com/game1024/openspeedy/blob/master/src/components/SettingsManager.tsx) (Settings screen), [`src/hooks/useShortcut.ts`](https://github.com/game1024/openspeedy/blob/master/src/hooks/useShortcut.ts) (Shortcut handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app["App shell<br/>[App.tsx]"]
  node_process_ui["Process manager<br/>[ProcessManager.tsx]"]
  node_process_detail["Process details<br/>[ProcessDetail.tsx]"]
  node_speed_ui["Speed controls<br/>[SpeedPanel.tsx]"]
  node_settings_ui["Settings screen"]
  node_shortcut_field["Shortcut editor<br/>[ShortcutField.tsx]"]
  node_titlebar["Status title bar<br/>[TitleBar.tsx]"]
end

subgraph group_state["Settings and feedback"]
  node_shortcuts["Shortcut handling<br/>[useShortcut.ts]"]
  node_settings_hook["Settings hook<br/>[useSettings.ts]"]
  node_settings_store[("Persistent settings<br/>[settings.ts]")]
  node_tray["System tray<br/>[useTray.ts]"]
  node_i18n["Localization<br/>[i18n.ts]"]
  node_snackbar["Notifications"]
  node_frontend_log["Frontend diagnostics<br/>[frontendLog.ts]"]
end

subgraph group_backend["Rust app services"]
  node_tauri["Tauri command host<br/>[lib.rs]"]
  node_enumerator["Process enumeration"]
  node_system_stats["System statistics<br/>[system_stats.rs]"]
  node_bridge_client["Bridge client<br/>[bridge_client.rs]"]
  node_bridge_job["Bridge lifecycle<br/>[bridge_job.rs]"]
  node_applog[("Application logging<br/>[applog.rs]")]
end

subgraph group_bridge["Speed bridge"]
  node_bridge_runtime["Bridge runtime<br/>[main.rs]"]
  node_speedpatch["Timing hooks<br/>[speedpatch.cpp]"]
end

node_user(("User"))
node_game["Target game"]

node_user -->|"operates"| node_app
node_app -->|"renders"| node_process_ui
node_app -->|"renders"| node_settings_ui
node_process_ui -->|"uses"| node_process_detail
node_settings_ui -->|"renders"| node_shortcut_field
node_settings_ui -->|"uses"| node_settings_hook
node_settings_ui -->|"uses"| node_shortcuts
node_app -->|"uses"| node_shortcuts
node_app -->|"uses"| node_tray
node_app -->|"reports errors"| node_frontend_log
node_settings_hook -->|"loads and saves"| node_settings_store
node_shortcuts -->|"reads settings"| node_settings_hook
node_settings_ui -->|"invokes speed commands"| node_tauri
node_shortcuts -->|"invokes speed commands"| node_tauri
node_frontend_log -->|"forwards errors"| node_tauri
node_tray -->|"reads setting"| node_settings_store
node_tauri -->|"uses"| node_enumerator
node_tauri -->|"uses"| node_system_stats
node_tauri -->|"uses"| node_bridge_client
node_tauri -->|"assigns bridge process"| node_bridge_job
node_bridge_client -->|"logs"| node_applog
node_bridge_job -->|"logs"| node_applog
node_tauri -->|"logs"| node_applog
node_process_ui -.->|"requests process list"| node_enumerator
node_speed_ui -.->|"requests speed change"| node_tauri
node_tauri -.->|"starts bridge"| node_bridge_runtime
node_bridge_runtime -.->|"applies timing hooks"| node_speedpatch
node_speedpatch -.->|"alters perceived timing"| node_game

click node_app "https://github.com/game1024/openspeedy/blob/master/src/App.tsx"
click node_process_ui "https://github.com/game1024/openspeedy/blob/master/src/components/ProcessManager.tsx"
click node_process_detail "https://github.com/game1024/openspeedy/blob/master/src/components/ProcessDetail.tsx"
click node_speed_ui "https://github.com/game1024/openspeedy/blob/master/src/components/SpeedPanel.tsx"
click node_settings_ui "https://github.com/game1024/openspeedy/blob/master/src/components/SettingsManager.tsx"
click node_shortcut_field "https://github.com/game1024/openspeedy/blob/master/src/components/ShortcutField.tsx"
click node_titlebar "https://github.com/game1024/openspeedy/blob/master/src/components/TitleBar.tsx"
click node_shortcuts "https://github.com/game1024/openspeedy/blob/master/src/hooks/useShortcut.ts"
click node_settings_hook "https://github.com/game1024/openspeedy/blob/master/src/hooks/useSettings.ts"
click node_settings_store "https://github.com/game1024/openspeedy/blob/master/src/store/settings.ts"
click node_tray "https://github.com/game1024/openspeedy/blob/master/src/hooks/useTray.ts"
click node_i18n "https://github.com/game1024/openspeedy/blob/master/src/i18n.ts"
click node_snackbar "https://github.com/game1024/openspeedy/blob/master/src/contexts/SnackbarContext.tsx"
click node_frontend_log "https://github.com/game1024/openspeedy/blob/master/src/utils/frontendLog.ts"
click node_tauri "https://github.com/game1024/openspeedy/blob/master/src-tauri/src/lib.rs"
click node_enumerator "https://github.com/game1024/openspeedy/blob/master/src-tauri/src/process_enumerator.rs"
click node_system_stats "https://github.com/game1024/openspeedy/blob/master/src-tauri/src/system_stats.rs"
click node_bridge_client "https://github.com/game1024/openspeedy/blob/master/src-tauri/src/bridge_client.rs"
click node_bridge_job "https://github.com/game1024/openspeedy/blob/master/src-tauri/src/bridge_job.rs"
click node_applog "https://github.com/game1024/openspeedy/blob/master/src-tauri/src/applog.rs"
click node_bridge_runtime "https://github.com/game1024/openspeedy/blob/master/src-bridge/src/main.rs"
click node_speedpatch "https://github.com/game1024/openspeedy/blob/master/src-bridge/speedpatch/speedpatch.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_app,node_process_ui,node_process_detail,node_speed_ui,node_settings_ui,node_shortcut_field,node_titlebar,node_user toneBlue
class node_shortcuts,node_settings_hook,node_settings_store,node_tray,node_i18n,node_snackbar,node_frontend_log toneAmber
class node_tauri,node_enumerator,node_system_stats,node_bridge_client,node_bridge_job,node_applog toneMint
class node_bridge_runtime,node_speedpatch toneRose
class node_game toneIndigo
```

## Components

### Desktop interface

- [App shell](https://github.com/game1024/openspeedy/blob/master/src/App.tsx): `src/App.tsx`
- [Process manager](https://github.com/game1024/openspeedy/blob/master/src/components/ProcessManager.tsx): `src/components/ProcessManager.tsx`
- [Process details](https://github.com/game1024/openspeedy/blob/master/src/components/ProcessDetail.tsx): `src/components/ProcessDetail.tsx`
- [Speed controls](https://github.com/game1024/openspeedy/blob/master/src/components/SpeedPanel.tsx): `src/components/SpeedPanel.tsx`
- [Settings screen](https://github.com/game1024/openspeedy/blob/master/src/components/SettingsManager.tsx): `src/components/SettingsManager.tsx`
- [Shortcut editor](https://github.com/game1024/openspeedy/blob/master/src/components/ShortcutField.tsx): `src/components/ShortcutField.tsx`
- [Status title bar](https://github.com/game1024/openspeedy/blob/master/src/components/TitleBar.tsx): `src/components/TitleBar.tsx`

### Settings and feedback

- [Shortcut handling](https://github.com/game1024/openspeedy/blob/master/src/hooks/useShortcut.ts): `src/hooks/useShortcut.ts`
- [Settings hook](https://github.com/game1024/openspeedy/blob/master/src/hooks/useSettings.ts): `src/hooks/useSettings.ts`
- [Persistent settings](https://github.com/game1024/openspeedy/blob/master/src/store/settings.ts): `src/store/settings.ts`
- [System tray](https://github.com/game1024/openspeedy/blob/master/src/hooks/useTray.ts): `src/hooks/useTray.ts`
- [Localization](https://github.com/game1024/openspeedy/blob/master/src/i18n.ts): `src/i18n.ts`
- [Notifications](https://github.com/game1024/openspeedy/blob/master/src/contexts/SnackbarContext.tsx): `src/contexts/SnackbarContext.tsx`
- [Frontend diagnostics](https://github.com/game1024/openspeedy/blob/master/src/utils/frontendLog.ts): `src/utils/frontendLog.ts`

### Rust app services

- [Tauri command host](https://github.com/game1024/openspeedy/blob/master/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Process enumeration](https://github.com/game1024/openspeedy/blob/master/src-tauri/src/process_enumerator.rs): `src-tauri/src/process_enumerator.rs`
- [System statistics](https://github.com/game1024/openspeedy/blob/master/src-tauri/src/system_stats.rs): `src-tauri/src/system_stats.rs`
- [Bridge client](https://github.com/game1024/openspeedy/blob/master/src-tauri/src/bridge_client.rs): `src-tauri/src/bridge_client.rs`
- [Bridge lifecycle](https://github.com/game1024/openspeedy/blob/master/src-tauri/src/bridge_job.rs): `src-tauri/src/bridge_job.rs`
- [Application logging](https://github.com/game1024/openspeedy/blob/master/src-tauri/src/applog.rs): `src-tauri/src/applog.rs`

### Speed bridge

- [Bridge runtime](https://github.com/game1024/openspeedy/blob/master/src-bridge/src/main.rs): `src-bridge/src/main.rs`
- [Timing hooks](https://github.com/game1024/openspeedy/blob/master/src-bridge/speedpatch/speedpatch.cpp): `src-bridge/speedpatch/speedpatch.cpp`

### Other components

- **User**
- **Target game**

## Connections

- User → App shell: operates (evidence: `README.md`)
- App shell → Process manager: renders (evidence: `src/App.tsx`)
- App shell → Settings screen: renders (evidence: `src/App.tsx`)
- Process manager → Process details: uses (evidence: `src/components/ProcessManager.tsx`)
- Settings screen → Shortcut editor: renders (evidence: `src/components/SettingsManager.tsx`)
- Settings screen → Settings hook: uses (evidence: `src/components/SettingsManager.tsx`)
- Settings screen → Shortcut handling: uses (evidence: `src/components/SettingsManager.tsx`)
- App shell → Shortcut handling: uses (evidence: `src/App.tsx`)
- App shell → System tray: uses (evidence: `src/App.tsx`)
- App shell → Frontend diagnostics: reports errors (evidence: `src/App.tsx`)
- Settings hook → Persistent settings: loads and saves (evidence: `src/hooks/useSettings.ts`)
- Shortcut handling → Settings hook: reads settings (evidence: `src/hooks/useShortcut.ts`)
- Settings screen → Tauri command host: invokes speed commands (evidence: `src/components/SettingsManager.tsx`)
- Shortcut handling → Tauri command host: invokes speed commands (evidence: `src/hooks/useShortcut.ts`)
- Frontend diagnostics → Tauri command host: forwards errors (evidence: `src/utils/frontendLog.ts`)
- System tray → Persistent settings: reads setting (evidence: `src/hooks/useTray.ts`)
- Tauri command host → Process enumeration: uses (evidence: `src-tauri/src/lib.rs`)
- Tauri command host → System statistics: uses (evidence: `src-tauri/src/lib.rs`)
- Tauri command host → Bridge client: uses (evidence: `src-tauri/src/lib.rs`)
- Tauri command host → Bridge lifecycle: assigns bridge process (evidence: `src-tauri/src/lib.rs`)
- Bridge client → Application logging: logs (evidence: `src-tauri/src/bridge_client.rs`)
- Bridge lifecycle → Application logging: logs (evidence: `src-tauri/src/bridge_job.rs`)
- Tauri command host → Application logging: logs (evidence: `src-tauri/src/lib.rs`)
- Process manager → Process enumeration: requests process list
- Speed controls → Tauri command host: requests speed change
- Tauri command host → Bridge runtime: starts bridge
- Bridge runtime → Timing hooks: applies timing hooks
- Timing hooks → Target game: alters perceived timing (evidence: `README.md`)
