# notprotonnot/notproton architecture

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

- Interactive diagram: https://gitdiagram.com/notprotonnot/notproton
- Repository: https://github.com/notprotonnot/notproton

## Overview

NotProton is a macOS application that enables Steam Play in macOS Steam and ports Proton components to macOS. Users inspect system status, prepare a CrossOver runner and Valve payload, then manage Wine prefixes and launch Windows programs; Steam itself consumes the installed compatibility tool. The dylib resolves Steam internals and installs hooks, while lsteamclient and steam-shim provide ported runtime components. The README documents these capabilities, but several implementation files were not sampled, so some subsystem connections are documented or left unverified rather than inferred from names alone.

Main entry points: [`app/Sources/NotProtonApp/SystemStatus.swift`](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/SystemStatus.swift) (System workflow), [`app/Sources/NotProtonApp/PrefixesModel.swift`](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/PrefixesModel.swift) (Prefix coordinator), [`dylib/hooks/hooks.c`](https://github.com/notprotonnot/notproton/blob/main/dylib/hooks/hooks.c) (Steam hooks), [`app/Sources/NotProtonApp/Model/RunnerInstaller.swift`](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/RunnerInstaller.swift) (Runner installer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["macOS app"]
  node_statusui["Status UI<br/>[StatusView.swift]"]
  node_prefixui["Prefix UI<br/>[PrefixesView.swift]"]
  node_backupui["Backup UI<br/>[BackupsView.swift]"]
  node_status["System workflow<br/>[SystemStatus.swift]"]
end

subgraph group_setup["Runner setup"]
  node_license["CrossOver license"]
  node_source["CrossOver source"]
  node_runner["Runner installer"]
  node_runnerstore[("Runner store<br/>[RunnerStore.swift]")]
  node_runnerpatch["ntdll patching<br/>[NtdllPatcher.swift]"]
  node_payload["Valve payload<br/>[PayloadState.swift]"]
  node_fetcher["Valve fetcher<br/>[ValveFetcher.swift]"]
  node_steaminstall["Steam installer"]
  node_steamrepair["Steam repair<br/>[SteamRepair.swift]"]
  node_uninstall["Uninstall<br/>[Uninstall.swift]"]
end

subgraph group_prefix["Prefix management"]
  node_prefixmodel["Prefix coordinator"]
  node_prefixstore[("Prefix store<br/>[PrefixStore.swift]")]
  node_prefixtools["Prefix tools<br/>[PrefixTools.swift]"]
  node_prefixrebuild["Prefix rebuild"]
end

subgraph group_runtime["Steam runtime"]
  node_lsteam["lsteamclient port<br/>[steamclient_main.c]"]
  node_steamshim["Steam helper shim<br/>[steam.cpp]"]
end

subgraph group_internals["Hook internals"]
  node_loader["Dylib loader<br/>[loader.c]"]
  node_resolver["Signature resolver<br/>[resolver.c]"]
  node_anchor["Anchor matching<br/>[anchor.c]"]
  node_macho["Mach-O reader<br/>[macho.c]"]
  node_hooks["Steam hooks<br/>[hooks.c]"]
  node_compat["Compatibility feature<br/>[compat.c]"]
  node_webpatch["Web patching<br/>[webpatch.c]"]
  node_webui["Web UI feature<br/>[webui.c]"]
end

node_user(("User"))
node_steam["macOS Steam"]

node_user -->|"reviews status"| node_statusui
node_user -->|"manages prefixes"| node_prefixui
node_statusui -->|"requests actions"| node_status
node_prefixui -.->|"invokes management"| node_prefixmodel
node_backupui -.->|"manages backups"| node_prefixmodel
node_status -->|"checks license"| node_license
node_status -->|"selects source"| node_source
node_status -->|"sets up runner"| node_runner
node_status -->|"fetches binaries"| node_fetcher
node_status -->|"installs Steam"| node_steaminstall
node_status -->|"repairs Steam"| node_steamrepair
node_status -->|"removes setup"| node_uninstall
node_status -->|"reads payload state"| node_payload
node_runner -.->|"stages builds"| node_runnerstore
node_runner -.->|"patches runner"| node_runnerpatch
node_prefixmodel -->|"loads prefixes"| node_prefixstore
node_prefixmodel -->|"opens tools"| node_prefixtools
node_prefixmodel -.->|"rebuilds prefixes"| node_prefixrebuild
node_steam -.->|"loads dylib"| node_loader
node_loader -->|"resolves signatures"| node_resolver
node_loader -->|"installs hooks"| node_hooks
node_resolver -.->|"matches anchors"| node_anchor
node_resolver -.->|"inspects image"| node_macho
node_hooks -->|"dispatches compat hooks"| node_compat
node_hooks -.->|"dispatches web hooks"| node_webpatch
node_hooks -.->|"dispatches UI hooks"| node_webui
node_steam -.->|"loads port"| node_lsteam
node_steam -.->|"uses helper"| node_steamshim

click node_statusui "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Views/StatusView.swift"
click node_prefixui "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Views/PrefixesView.swift"
click node_backupui "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Views/BackupsView.swift"
click node_status "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/SystemStatus.swift"
click node_prefixmodel "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/PrefixesModel.swift"
click node_license "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/CrossOverLicense.swift"
click node_source "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/CrossOverSource.swift"
click node_runner "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/RunnerInstaller.swift"
click node_runnerstore "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/RunnerStore.swift"
click node_runnerpatch "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/NtdllPatcher.swift"
click node_payload "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/PayloadState.swift"
click node_fetcher "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/ValveFetcher.swift"
click node_steaminstall "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/SteamInstaller.swift"
click node_steamrepair "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/SteamRepair.swift"
click node_uninstall "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/Uninstall.swift"
click node_prefixstore "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/PrefixStore.swift"
click node_prefixtools "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/PrefixTools.swift"
click node_prefixrebuild "https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/PrefixRebuild.swift"
click node_loader "https://github.com/notprotonnot/notproton/blob/main/dylib/core/loader.c"
click node_resolver "https://github.com/notprotonnot/notproton/blob/main/dylib/resolver/resolver.c"
click node_anchor "https://github.com/notprotonnot/notproton/blob/main/dylib/resolver/anchor.c"
click node_macho "https://github.com/notprotonnot/notproton/blob/main/dylib/core/macho.c"
click node_hooks "https://github.com/notprotonnot/notproton/blob/main/dylib/hooks/hooks.c"
click node_compat "https://github.com/notprotonnot/notproton/blob/main/dylib/feats/compat.c"
click node_webpatch "https://github.com/notprotonnot/notproton/blob/main/dylib/feats/webpatch.c"
click node_webui "https://github.com/notprotonnot/notproton/blob/main/dylib/feats/webui.c"
click node_lsteam "https://github.com/notprotonnot/notproton/blob/main/lsteamclient/steamclient_main.c"
click node_steamshim "https://github.com/notprotonnot/notproton/blob/main/steam-shim/steam.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_statusui,node_prefixui,node_backupui,node_status,node_user toneBlue
class node_license,node_source,node_runner,node_runnerstore,node_runnerpatch,node_payload,node_fetcher,node_steaminstall,node_steamrepair,node_uninstall toneAmber
class node_prefixmodel,node_prefixstore,node_prefixtools,node_prefixrebuild toneMint
class node_lsteam,node_steamshim toneRose
class node_loader,node_resolver,node_anchor,node_macho,node_hooks,node_compat,node_webpatch,node_webui,node_steam toneIndigo
```

## Components

### macOS app

- [Status UI](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Views/StatusView.swift): `app/Sources/NotProtonApp/Views/StatusView.swift`
- [Prefix UI](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Views/PrefixesView.swift): `app/Sources/NotProtonApp/Views/PrefixesView.swift`
- [Backup UI](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Views/BackupsView.swift): `app/Sources/NotProtonApp/Views/BackupsView.swift`
- [System workflow](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/SystemStatus.swift): `app/Sources/NotProtonApp/SystemStatus.swift`

### Runner setup

- [CrossOver license](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/CrossOverLicense.swift): `app/Sources/NotProtonApp/Model/CrossOverLicense.swift`
- [CrossOver source](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/CrossOverSource.swift): `app/Sources/NotProtonApp/Model/CrossOverSource.swift`
- [Runner installer](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/RunnerInstaller.swift): `app/Sources/NotProtonApp/Model/RunnerInstaller.swift`
- [Runner store](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/RunnerStore.swift): `app/Sources/NotProtonApp/Model/RunnerStore.swift`
- [ntdll patching](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/NtdllPatcher.swift): `app/Sources/NotProtonApp/Model/NtdllPatcher.swift`
- [Valve payload](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/PayloadState.swift): `app/Sources/NotProtonApp/Model/PayloadState.swift`
- [Valve fetcher](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/ValveFetcher.swift): `app/Sources/NotProtonApp/Model/ValveFetcher.swift`
- [Steam installer](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/SteamInstaller.swift): `app/Sources/NotProtonApp/Model/SteamInstaller.swift`
- [Steam repair](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/SteamRepair.swift): `app/Sources/NotProtonApp/Model/SteamRepair.swift`
- [Uninstall](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/Uninstall.swift): `app/Sources/NotProtonApp/Model/Uninstall.swift`

### Prefix management

- [Prefix coordinator](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/PrefixesModel.swift): `app/Sources/NotProtonApp/PrefixesModel.swift`
- [Prefix store](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/PrefixStore.swift): `app/Sources/NotProtonApp/Model/PrefixStore.swift`
- [Prefix tools](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/PrefixTools.swift): `app/Sources/NotProtonApp/Model/PrefixTools.swift`
- [Prefix rebuild](https://github.com/notprotonnot/notproton/blob/main/app/Sources/NotProtonApp/Model/PrefixRebuild.swift): `app/Sources/NotProtonApp/Model/PrefixRebuild.swift`

### Steam runtime

- [lsteamclient port](https://github.com/notprotonnot/notproton/blob/main/lsteamclient/steamclient_main.c): `lsteamclient/steamclient_main.c`
- [Steam helper shim](https://github.com/notprotonnot/notproton/blob/main/steam-shim/steam.cpp): `steam-shim/steam.cpp`

### Hook internals

- [Dylib loader](https://github.com/notprotonnot/notproton/blob/main/dylib/core/loader.c): `dylib/core/loader.c`
- [Signature resolver](https://github.com/notprotonnot/notproton/blob/main/dylib/resolver/resolver.c): `dylib/resolver/resolver.c`
- [Anchor matching](https://github.com/notprotonnot/notproton/blob/main/dylib/resolver/anchor.c): `dylib/resolver/anchor.c`
- [Mach-O reader](https://github.com/notprotonnot/notproton/blob/main/dylib/core/macho.c): `dylib/core/macho.c`
- [Steam hooks](https://github.com/notprotonnot/notproton/blob/main/dylib/hooks/hooks.c): `dylib/hooks/hooks.c`
- [Compatibility feature](https://github.com/notprotonnot/notproton/blob/main/dylib/feats/compat.c): `dylib/feats/compat.c`
- [Web patching](https://github.com/notprotonnot/notproton/blob/main/dylib/feats/webpatch.c): `dylib/feats/webpatch.c`
- [Web UI feature](https://github.com/notprotonnot/notproton/blob/main/dylib/feats/webui.c): `dylib/feats/webui.c`

### Other components

- **User**
- **macOS Steam**

## Connections

- User → Status UI: reviews status
- User → Prefix UI: manages prefixes
- Status UI → System workflow: requests actions (evidence: `app/Sources/NotProtonApp/Views/StatusView.swift`)
- Prefix UI → Prefix coordinator: invokes management
- Backup UI → Prefix coordinator: manages backups
- System workflow → CrossOver license: checks license (evidence: `app/Sources/NotProtonApp/SystemStatus.swift`)
- System workflow → CrossOver source: selects source (evidence: `app/Sources/NotProtonApp/SystemStatus.swift`)
- System workflow → Runner installer: sets up runner (evidence: `app/Sources/NotProtonApp/SystemStatus.swift`)
- System workflow → Valve fetcher: fetches binaries (evidence: `app/Sources/NotProtonApp/SystemStatus.swift`)
- System workflow → Steam installer: installs Steam (evidence: `app/Sources/NotProtonApp/SystemStatus.swift`)
- System workflow → Steam repair: repairs Steam (evidence: `app/Sources/NotProtonApp/SystemStatus.swift`)
- System workflow → Uninstall: removes setup (evidence: `app/Sources/NotProtonApp/SystemStatus.swift`)
- System workflow → Valve payload: reads payload state (evidence: `app/Sources/NotProtonApp/SystemStatus.swift`)
- Runner installer → Runner store: stages builds
- Runner installer → ntdll patching: patches runner
- Prefix coordinator → Prefix store: loads prefixes (evidence: `app/Sources/NotProtonApp/PrefixesModel.swift`)
- Prefix coordinator → Prefix tools: opens tools (evidence: `app/Sources/NotProtonApp/PrefixesModel.swift`)
- Prefix coordinator → Prefix rebuild: rebuilds prefixes
- macOS Steam → Dylib loader: loads dylib
- Dylib loader → Signature resolver: resolves signatures (evidence: `dylib/core/loader.c`)
- Dylib loader → Steam hooks: installs hooks (evidence: `dylib/core/loader.c`)
- Signature resolver → Anchor matching: matches anchors
- Signature resolver → Mach-O reader: inspects image
- Steam hooks → Compatibility feature: dispatches compat hooks
- Steam hooks → Web patching: dispatches web hooks
- Steam hooks → Web UI feature: dispatches UI hooks
- macOS Steam → lsteamclient port: loads port
- macOS Steam → Steam helper shim: uses helper
