# spongescripts/fn-external-base architecture

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

- Interactive diagram: https://gitdiagram.com/spongescripts/fn-external-base
- Repository: https://github.com/spongescripts/fn-external-base

## Overview

This is a Windows Fortnite overlay base. Its visible startup workflow waits for the game process, initializes driver access and the game image base, then sets up a windowed DirectX overlay and enters its render loop. The sampled code also shows kernel-mediated memory access, game-state caching, camera and bone transforms, and configurable visual/menu state. The README describes Discord Overlay use, but the available excerpts do not establish the full render-loop wiring or the exact visual features; those links are left unverified or omitted.

Main entry points: [`main.cpp`](https://github.com/spongescripts/fn-external-base/blob/main/main.cpp) (Application startup), [`sdk/sdk.h`](https://github.com/spongescripts/fn-external-base/blob/main/sdk/sdk.h) (Camera and entity math), [`overlay/overlay.h`](https://github.com/spongescripts/fn-external-base/blob/main/overlay/overlay.h) (Overlay window and loop), [`driver/comms.h`](https://github.com/spongescripts/fn-external-base/blob/main/driver/comms.h) (Memory access API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and Overlay"]
  node_entry["Application startup<br/>[main.cpp]"]
  node_overlay["Overlay window and loop<br/>[overlay.h]"]
end

subgraph group_memory["Process and Memory"]
  node_process["Process discovery<br/>[drv.h]"]
  node_driver["Kernel driver access<br/>[drv.h]"]
  node_comms["Memory access API<br/>[comms.h]"]
end

subgraph group_game["Game Data and Visuals"]
  node_cache["Game-state cache<br/>[loop.h]"]
  node_sdk["Camera and entity math<br/>[sdk.h]"]
  node_matrix["Transform math<br/>[matrix.h]"]
  node_offsets["Game offsets<br/>[offsets.h]"]
  node_settings["Runtime settings<br/>[settings.h]"]
  node_visuals["Visual features<br/>[visuals.h]"]
  node_drawing["Drawing helpers<br/>[draw.h]"]
end

subgraph group_ui["UI Runtime"]
  node_menu["Overlay menu<br/>[menu.h]"]
  node_imgui["Dear ImGui core and support"]
  node_win32["Win32 backend"]
  node_dx11["DirectX 11 backend"]
end

node_user(("Overlay user"))
node_windows(("Windows platform"))
node_fortnite(("Fortnite process"))
node_kernel_service(("Installed driver"))

node_user -->|"starts"| node_entry
node_entry -->|"finds process"| node_process
node_entry -->|"initializes driver"| node_driver
node_entry -->|"starts overlay"| node_overlay
node_process -->|"locates"| node_fortnite
node_driver -->|"sends IOCTLs"| node_kernel_service
node_comms -->|"reads and writes"| node_driver
node_entry -->|"sets process ID"| node_comms
node_cache -->|"reads memory"| node_comms
node_sdk -->|"reads game data"| node_comms
node_sdk -->|"uses transforms"| node_matrix
node_cache -->|"uses offsets"| node_offsets
node_sdk -->|"uses offsets"| node_offsets
node_sdk -->|"uses screen state"| node_settings
node_visuals -.->|"uses helpers"| node_drawing
node_menu -.->|"configures state"| node_settings
node_overlay -->|"uses backend"| node_win32
node_overlay -->|"uses backend"| node_dx11
node_win32 -->|"uses API"| node_imgui
node_dx11 -->|"uses API"| node_imgui
node_overlay -->|"creates window"| node_windows

click node_entry "https://github.com/spongescripts/fn-external-base/blob/main/main.cpp"
click node_overlay "https://github.com/spongescripts/fn-external-base/blob/main/overlay/overlay.h"
click node_process "https://github.com/spongescripts/fn-external-base/blob/main/driver/kernel/drv.h"
click node_driver "https://github.com/spongescripts/fn-external-base/blob/main/driver/kernel/drv.h"
click node_comms "https://github.com/spongescripts/fn-external-base/blob/main/driver/comms.h"
click node_cache "https://github.com/spongescripts/fn-external-base/blob/main/core/loop.h"
click node_sdk "https://github.com/spongescripts/fn-external-base/blob/main/sdk/sdk.h"
click node_matrix "https://github.com/spongescripts/fn-external-base/blob/main/sdk/math/matrix.h"
click node_offsets "https://github.com/spongescripts/fn-external-base/blob/main/sdk/offsets.h"
click node_settings "https://github.com/spongescripts/fn-external-base/blob/main/settings/settings.h"
click node_visuals "https://github.com/spongescripts/fn-external-base/blob/main/core/visuals/visuals.h"
click node_drawing "https://github.com/spongescripts/fn-external-base/blob/main/core/visuals/draw.h"
click node_menu "https://github.com/spongescripts/fn-external-base/blob/main/overlay/menu.h"
click node_imgui "https://github.com/spongescripts/fn-external-base/tree/main/overlay/imgui"
click node_win32 "https://github.com/spongescripts/fn-external-base/blob/main/overlay/imgui/imgui_impl_win32.cpp"
click node_dx11 "https://github.com/spongescripts/fn-external-base/blob/main/overlay/imgui/imgui_impl_dx11.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_entry,node_overlay,node_user toneBlue
class node_process,node_driver,node_comms toneAmber
class node_cache,node_sdk,node_matrix,node_offsets,node_settings,node_visuals,node_drawing toneMint
class node_menu,node_imgui,node_win32,node_dx11 toneRose
class node_windows,node_fortnite,node_kernel_service toneIndigo
```

## Components

### Startup and Overlay

- [Application startup](https://github.com/spongescripts/fn-external-base/blob/main/main.cpp): `main.cpp`
- [Overlay window and loop](https://github.com/spongescripts/fn-external-base/blob/main/overlay/overlay.h): `overlay/overlay.h`

### Process and Memory

- [Process discovery](https://github.com/spongescripts/fn-external-base/blob/main/driver/kernel/drv.h): `driver/kernel/drv.h`
- [Kernel driver access](https://github.com/spongescripts/fn-external-base/blob/main/driver/kernel/drv.h): `driver/kernel/drv.h`
- [Memory access API](https://github.com/spongescripts/fn-external-base/blob/main/driver/comms.h): `driver/comms.h`

### Game Data and Visuals

- [Game-state cache](https://github.com/spongescripts/fn-external-base/blob/main/core/loop.h): `core/loop.h`
- [Camera and entity math](https://github.com/spongescripts/fn-external-base/blob/main/sdk/sdk.h): `sdk/sdk.h`
- [Transform math](https://github.com/spongescripts/fn-external-base/blob/main/sdk/math/matrix.h): `sdk/math/matrix.h`
- [Game offsets](https://github.com/spongescripts/fn-external-base/blob/main/sdk/offsets.h): `sdk/offsets.h`
- [Runtime settings](https://github.com/spongescripts/fn-external-base/blob/main/settings/settings.h): `settings/settings.h`
- [Visual features](https://github.com/spongescripts/fn-external-base/blob/main/core/visuals/visuals.h): `core/visuals/visuals.h`
- [Drawing helpers](https://github.com/spongescripts/fn-external-base/blob/main/core/visuals/draw.h): `core/visuals/draw.h`

### UI Runtime

- [Overlay menu](https://github.com/spongescripts/fn-external-base/blob/main/overlay/menu.h): `overlay/menu.h`
- [Dear ImGui core and support](https://github.com/spongescripts/fn-external-base/tree/main/overlay/imgui): `overlay/imgui`
- [Win32 backend](https://github.com/spongescripts/fn-external-base/blob/main/overlay/imgui/imgui_impl_win32.cpp): `overlay/imgui/imgui_impl_win32.cpp`
- [DirectX 11 backend](https://github.com/spongescripts/fn-external-base/blob/main/overlay/imgui/imgui_impl_dx11.cpp): `overlay/imgui/imgui_impl_dx11.cpp`

### Other components

- **Overlay user**
- **Windows platform**
- **Fortnite process**
- **Installed driver**

## Connections

- Overlay user → Application startup: starts (evidence: `README.md`)
- Application startup → Process discovery: finds process (evidence: `main.cpp`)
- Application startup → Kernel driver access: initializes driver (evidence: `main.cpp`)
- Application startup → Overlay window and loop: starts overlay (evidence: `main.cpp`)
- Process discovery → Fortnite process: locates (evidence: `driver/kernel/drv.h`)
- Kernel driver access → Installed driver: sends IOCTLs (evidence: `driver/kernel/drv.h`)
- Memory access API → Kernel driver access: reads and writes (evidence: `driver/comms.h`)
- Application startup → Memory access API: sets process ID (evidence: `main.cpp`)
- Game-state cache → Memory access API: reads memory (evidence: `core/loop.h`)
- Camera and entity math → Memory access API: reads game data (evidence: `sdk/sdk.h`)
- Camera and entity math → Transform math: uses transforms (evidence: `sdk/sdk.h`)
- Game-state cache → Game offsets: uses offsets (evidence: `core/loop.h`)
- Camera and entity math → Game offsets: uses offsets (evidence: `sdk/sdk.h`)
- Camera and entity math → Runtime settings: uses screen state (evidence: `sdk/sdk.h`)
- Visual features → Drawing helpers: uses helpers
- Overlay menu → Runtime settings: configures state
- Overlay window and loop → Win32 backend: uses backend (evidence: `overlay/overlay.h`)
- Overlay window and loop → DirectX 11 backend: uses backend (evidence: `overlay/overlay.h`)
- Win32 backend → Dear ImGui core and support: uses API (evidence: `overlay/imgui/imgui_impl_win32.cpp`)
- DirectX 11 backend → Dear ImGui core and support: uses API (evidence: `overlay/imgui/imgui_impl_dx11.cpp`)
- Overlay window and loop → Windows platform: creates window (evidence: `overlay/overlay.h`)
