# renovice/fh6-sqlite-editor architecture

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

- Interactive diagram: https://gitdiagram.com/renovice/fh6-sqlite-editor
- Repository: https://github.com/renovice/fh6-sqlite-editor

## Overview

FH6 SQLite Editor Native is a Windows desktop modding and research tool for editing FH6 SQLite database dumps and interacting experimentally with the running game. The principal workflow is to open a dump, inspect and edit vehicle-related data, validate and save it, then optionally dump or import database changes in the game. The README also identifies focused tuning-limit and raw-table editing. Source excerpts confirm the main window’s links to core services; some UI-to-feature details are documented rather than visible in the sampled excerpts.

Main entry points: [`New Native WPF Editor/fh6_sqlite_native/MainWindow.xaml.cs`](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/MainWindow.xaml.cs) (Editor window), [`New Native WPF Editor/fh6_sqlite_native/GameProcess.cs`](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameProcess.cs) (Game process), [`New Native WPF Editor/fh6_sqlite_native/GameSql.cs`](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameSql.cs) (Game SQL bridge), [`New Native WPF Editor/fh6_sqlite_native/GameDatabaseDumper.cs`](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameDatabaseDumper.cs) (Game DB dumper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_ui["Editor window<br/>[MainWindow.xaml.cs]"]
  node_liveui["Live tuning window"]
end

subgraph group_database["Database editing"]
  node_car["Car editor"]
  node_engine["Engine editor"]
  node_parts["Engine parts"]
  node_aero["Aero editor"]
  node_tuning["Tuning limits"]
  node_raw["Raw tables"]
  node_validation["DB validation"]
  node_sessiondb[("SQLite session")]
end

subgraph group_game["Live game access"]
  node_dumper["Game DB dumper"]
  node_importer["Game DB importer"]
  node_scanner["Memory scanner"]
  node_livepatch["Live limits patcher"]
end

subgraph group_runtime["Runtime foundations"]
  node_process["Game process<br/>[GameProcess.cs]"]
  node_gamesql["Game SQL bridge<br/>[GameSql.cs]"]
  node_patterns["Pattern scanner<br/>[PatternScanner.cs]"]
  node_native["Windows APIs<br/>[NativeMethods.cs]"]
end

node_user(("Modder"))

node_user -->|"uses"| node_ui
node_ui -->|"edits cars"| node_car
node_ui -->|"edits engines"| node_engine
node_ui -->|"edits parts"| node_parts
node_ui -->|"edits aero"| node_aero
node_ui -->|"edits limits"| node_tuning
node_ui -->|"edits tables"| node_raw
node_ui -->|"validates"| node_validation
node_ui -->|"opens and saves"| node_sessiondb
node_ui -->|"starts dump"| node_dumper
node_ui -->|"starts import"| node_importer
node_ui -->|"starts scan"| node_scanner
node_ui -.->|"opens"| node_liveui
node_liveui -->|"invokes"| node_livepatch
node_dumper -->|"reads game"| node_process
node_dumper -->|"queries"| node_gamesql
node_importer -->|"accesses game"| node_process
node_importer -->|"executes SQL"| node_gamesql
node_scanner -->|"scans memory"| node_process
node_livepatch -->|"patches memory"| node_process
node_process -->|"calls APIs"| node_native
node_gamesql -->|"reads memory"| node_process
node_gamesql -->|"resolves signatures"| node_patterns
node_patterns -->|"scans memory"| node_process
node_patterns -->|"queries memory"| node_native

click node_ui "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/MainWindow.xaml.cs"
click node_liveui "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/LiveTuningPatcherWindow.xaml.cs"
click node_car "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs"
click node_engine "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs"
click node_parts "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs"
click node_aero "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs"
click node_tuning "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/LiveTuningLimitsPatcher.cs"
click node_raw "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs"
click node_validation "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs"
click node_sessiondb "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs"
click node_dumper "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameDatabaseDumper.cs"
click node_importer "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameDatabaseImporter.cs"
click node_scanner "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameMemoryScanner.cs"
click node_livepatch "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/LiveTuningLimitsPatcher.cs"
click node_process "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameProcess.cs"
click node_gamesql "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameSql.cs"
click node_patterns "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/PatternScanner.cs"
click node_native "https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/NativeMethods.cs"

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_ui,node_liveui toneBlue
class node_car,node_engine,node_parts,node_aero,node_tuning,node_raw,node_validation,node_sessiondb toneAmber
class node_dumper,node_importer,node_scanner,node_livepatch toneMint
class node_process,node_gamesql,node_patterns,node_native toneRose
class node_user toneIndigo
```

## Components

### Desktop experience

- [Editor window](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/MainWindow.xaml.cs): `New Native WPF Editor/fh6_sqlite_native/MainWindow.xaml.cs`
- [Live tuning window](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/LiveTuningPatcherWindow.xaml.cs): `New Native WPF Editor/fh6_sqlite_native/LiveTuningPatcherWindow.xaml.cs`

### Database editing

- [Car editor](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs): `New Native WPF Editor/fh6_sqlite_native/SqliteEditorService.cs`
- [Engine editor](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs): `New Native WPF Editor/fh6_sqlite_native/SqliteEditorService.cs`
- [Engine parts](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs): `New Native WPF Editor/fh6_sqlite_native/SqliteEditorService.cs`
- [Aero editor](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs): `New Native WPF Editor/fh6_sqlite_native/SqliteEditorService.cs`
- [Tuning limits](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/LiveTuningLimitsPatcher.cs): `New Native WPF Editor/fh6_sqlite_native/LiveTuningLimitsPatcher.cs`
- [Raw tables](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs): `New Native WPF Editor/fh6_sqlite_native/SqliteEditorService.cs`
- [DB validation](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs): `New Native WPF Editor/fh6_sqlite_native/SqliteEditorService.cs`
- [SQLite session](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/SqliteEditorService.cs): `New Native WPF Editor/fh6_sqlite_native/SqliteEditorService.cs`

### Live game access

- [Game DB dumper](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameDatabaseDumper.cs): `New Native WPF Editor/fh6_sqlite_native/GameDatabaseDumper.cs`
- [Game DB importer](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameDatabaseImporter.cs): `New Native WPF Editor/fh6_sqlite_native/GameDatabaseImporter.cs`
- [Memory scanner](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameMemoryScanner.cs): `New Native WPF Editor/fh6_sqlite_native/GameMemoryScanner.cs`
- [Live limits patcher](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/LiveTuningLimitsPatcher.cs): `New Native WPF Editor/fh6_sqlite_native/LiveTuningLimitsPatcher.cs`

### Runtime foundations

- [Game process](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameProcess.cs): `New Native WPF Editor/fh6_sqlite_native/GameProcess.cs`
- [Game SQL bridge](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/GameSql.cs): `New Native WPF Editor/fh6_sqlite_native/GameSql.cs`
- [Pattern scanner](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/PatternScanner.cs): `New Native WPF Editor/fh6_sqlite_native/PatternScanner.cs`
- [Windows APIs](https://github.com/renovice/fh6-sqlite-editor/blob/main/New%20Native%20WPF%20Editor/fh6_sqlite_native/NativeMethods.cs): `New Native WPF Editor/fh6_sqlite_native/NativeMethods.cs`

### Other components

- **Modder**

## Connections

- Modder → Editor window: uses (evidence: `README.md`)
- Editor window → Car editor: edits cars (evidence: `README.md`)
- Editor window → Engine editor: edits engines (evidence: `README.md`)
- Editor window → Engine parts: edits parts (evidence: `README.md`)
- Editor window → Aero editor: edits aero (evidence: `README.md`)
- Editor window → Tuning limits: edits limits (evidence: `README.md`)
- Editor window → Raw tables: edits tables (evidence: `README.md`)
- Editor window → DB validation: validates (evidence: `New Native WPF Editor/fh6_sqlite_native/MainWindow.xaml.cs`)
- Editor window → SQLite session: opens and saves (evidence: `New Native WPF Editor/fh6_sqlite_native/MainWindow.xaml.cs`)
- Editor window → Game DB dumper: starts dump (evidence: `New Native WPF Editor/fh6_sqlite_native/MainWindow.xaml.cs`)
- Editor window → Game DB importer: starts import (evidence: `New Native WPF Editor/fh6_sqlite_native/MainWindow.xaml.cs`)
- Editor window → Memory scanner: starts scan (evidence: `New Native WPF Editor/fh6_sqlite_native/MainWindow.xaml.cs`)
- Editor window → Live tuning window: opens
- Live tuning window → Live limits patcher: invokes (evidence: `New Native WPF Editor/fh6_sqlite_native/LiveTuningPatcherWindow.xaml.cs`)
- Game DB dumper → Game process: reads game (evidence: `New Native WPF Editor/fh6_sqlite_native/GameDatabaseDumper.cs`)
- Game DB dumper → Game SQL bridge: queries (evidence: `New Native WPF Editor/fh6_sqlite_native/GameDatabaseDumper.cs`)
- Game DB importer → Game process: accesses game (evidence: `New Native WPF Editor/fh6_sqlite_native/GameDatabaseImporter.cs`)
- Game DB importer → Game SQL bridge: executes SQL (evidence: `New Native WPF Editor/fh6_sqlite_native/GameDatabaseImporter.cs`)
- Memory scanner → Game process: scans memory (evidence: `New Native WPF Editor/fh6_sqlite_native/GameMemoryScanner.cs`)
- Live limits patcher → Game process: patches memory (evidence: `New Native WPF Editor/fh6_sqlite_native/LiveTuningLimitsPatcher.cs`)
- Game process → Windows APIs: calls APIs (evidence: `New Native WPF Editor/fh6_sqlite_native/GameProcess.cs`)
- Game SQL bridge → Game process: reads memory (evidence: `New Native WPF Editor/fh6_sqlite_native/GameSql.cs`)
- Game SQL bridge → Pattern scanner: resolves signatures (evidence: `New Native WPF Editor/fh6_sqlite_native/GameSql.cs`)
- Pattern scanner → Game process: scans memory (evidence: `New Native WPF Editor/fh6_sqlite_native/PatternScanner.cs`)
- Pattern scanner → Windows APIs: queries memory (evidence: `New Native WPF Editor/fh6_sqlite_native/PatternScanner.cs`)
