# baonq0507/borderlands-4-save-editor architecture

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

- Interactive diagram: https://gitdiagram.com/baonq0507/borderlands-4-save-editor
- Repository: https://github.com/baonq0507/borderlands-4-save-editor

## Overview

The checked-in runtime is a small Windows hotkey loop: it polls Insert to toggle a local menu flag and End to stop, sleeping between polls. The header also defines configuration defaults, but the sampled core does not consume them. Although the README advertises radar, save/profile, rendering, and other trainer capabilities, the available source does not show their implementation or wiring, so they are not modeled as runtime components.

Main entry points: [`src/borderlands_4_save_editor_core.cpp`](https://github.com/baonq0507/borderlands-4-save-editor/blob/main/src/borderlands_4_save_editor_core.cpp) (Hotkey polling)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_loop["Runtime loop"]
node_hotkeys["Hotkey polling"]
node_config["Runtime defaults"]
node_windows["Windows input API"]

node_loop -->|"polls"| node_hotkeys
node_hotkeys -->|"reads keys"| node_windows
node_user -.->|"presses hotkeys"| node_hotkeys

click node_loop "https://github.com/baonq0507/borderlands-4-save-editor/blob/main/src/borderlands_4_save_editor_core.cpp"
click node_hotkeys "https://github.com/baonq0507/borderlands-4-save-editor/blob/main/src/borderlands_4_save_editor_core.cpp"
click node_config "https://github.com/baonq0507/borderlands-4-save-editor/blob/main/include/borderlands_4_save_editor_runtime.hpp"

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_user toneBlue
class node_loop,node_hotkeys,node_config toneTeal
class node_windows toneMint
```

## Components

### Other components

- **User**
- [Runtime loop](https://github.com/baonq0507/borderlands-4-save-editor/blob/main/src/borderlands_4_save_editor_core.cpp): `src/borderlands_4_save_editor_core.cpp`
- [Hotkey polling](https://github.com/baonq0507/borderlands-4-save-editor/blob/main/src/borderlands_4_save_editor_core.cpp): `src/borderlands_4_save_editor_core.cpp`
- [Runtime defaults](https://github.com/baonq0507/borderlands-4-save-editor/blob/main/include/borderlands_4_save_editor_runtime.hpp): `include/borderlands_4_save_editor_runtime.hpp`
- **Windows input API**

## Connections

- Runtime loop → Hotkey polling: polls (evidence: `src/borderlands_4_save_editor_core.cpp`)
- Hotkey polling → Windows input API: reads keys (evidence: `src/borderlands_4_save_editor_core.cpp`)
- User → Hotkey polling: presses hotkeys
