# huamidev/gestaltx architecture

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

- Interactive diagram: https://gitdiagram.com/huamidev/gestaltx
- Repository: https://github.com/huamidev/gestaltx

## Overview

GestaltX is an iPhone/iPad MobileGestalt editor. Users review capability presets or typed plist edits, stage changes, then apply verified writes with backups and can restore recorded originals. Plists can also enter through the share extension, be checked against device identity, and open as local documents for editing or verified restoration. The README documents these capabilities; the graph also uses sampled source for concrete calls. Several feature implementations were not sampled, so their internal links are omitted rather than inferred.

Main entry points: [`GestaltX/ContentView.swift`](https://github.com/huamidev/gestaltx/blob/main/GestaltX/ContentView.swift) (Editor interface), [`GestaltX/GestaltManager.swift`](https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltManager.swift) (Workflow manager), [`GestaltX/GestaltDocument.swift`](https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltDocument.swift) (Plist document), [`Shared/SharedPlistInbox.swift`](https://github.com/huamidev/gestaltx/blob/main/Shared/SharedPlistInbox.swift) (Shared plist inbox)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App experience"]
  node_app["App entry<br/>[GestaltXApp.swift]"]
  node_interface["Editor interface<br/>[ContentView.swift]"]
  node_about["About and support<br/>[AboutView.swift]"]
  node_welcome["Welcome view<br/>[WelcomeView.swift]"]
end

subgraph group_editing["Editing and device access"]
  node_manager["Workflow manager"]
  node_capabilities["Capability presets<br/>[Capabilities.swift]"]
  node_document["Plist document"]
  node_cacheoptions["Cache options"]
  node_cachelayout["Cache layout"]
  node_identity["Device identity"]
  node_deviceproof["Device-bound proof"]
end

subgraph group_imports["Plist import"]
  node_shareextension["Share extension"]
  node_provider["Provider loading"]
  node_appgroups["App Group discovery"]
  node_inbox[("Shared plist inbox")]
  node_importqueue["Import queue"]
  node_directimport["Direct file imports"]
end

subgraph group_state["Backups and state"]
  node_backups[("Backup and restore")]
  node_tempexport["Temporary export"]
end

subgraph group_system["System integration"]
  node_respring["NeoSpring"]
  node_worsequery["worse_query access<br/>[worse_query.m]"]
end

node_user(("Device owner"))
node_device(("iOS device"))

node_user -->|"edits or imports"| node_interface
node_app -->|"shows"| node_interface
node_interface -->|"requests actions"| node_manager
node_interface -->|"opens"| node_about
node_interface -->|"presents"| node_welcome
node_interface -->|"presents"| node_respring
node_interface -->|"checks pending imports"| node_importqueue
node_manager -->|"loads and commits"| node_document
node_manager -->|"checks identifiers"| node_identity
node_manager -->|"verifies imports"| node_deviceproof
node_manager -->|"manages backups"| node_backups
node_manager -->|"runs exploit"| node_worsequery
node_capabilities -->|"defines presets"| node_document
node_document -->|"validates cache edits"| node_cacheoptions
node_document -->|"resolves layout"| node_cachelayout
node_cacheoptions -->|"resolves offsets"| node_cachelayout
node_shareextension -->|"loads shared file"| node_provider
node_shareextension -->|"finds shared inbox"| node_appgroups
node_shareextension -->|"stores plist"| node_inbox
node_appgroups -->|"creates inboxes"| node_inbox
node_interface -->|"discovers imports"| node_appgroups
node_interface -->|"captures file imports"| node_directimport
node_importqueue -->|"selects pending entry"| node_inbox
node_manager -->|"prepares shared plist"| node_inbox
node_manager -->|"creates export"| node_tempexport
node_worsequery -->|"accesses MobileGestalt"| node_device
node_respring -->|"attempts refresh"| node_device
node_backups -->|"stores plist copies"| node_document
node_deviceproof -->|"validates shared file"| node_inbox

click node_app "https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltXApp.swift"
click node_interface "https://github.com/huamidev/gestaltx/blob/main/GestaltX/ContentView.swift"
click node_about "https://github.com/huamidev/gestaltx/blob/main/GestaltX/AboutView.swift"
click node_welcome "https://github.com/huamidev/gestaltx/blob/main/GestaltX/WelcomeView.swift"
click node_manager "https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltManager.swift"
click node_capabilities "https://github.com/huamidev/gestaltx/blob/main/GestaltX/Capabilities.swift"
click node_document "https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltDocument.swift"
click node_cacheoptions "https://github.com/huamidev/gestaltx/blob/main/GestaltX/DeviceCacheOptions.swift"
click node_cachelayout "https://github.com/huamidev/gestaltx/blob/main/GestaltX/MobileGestaltCacheLayout.swift"
click node_identity "https://github.com/huamidev/gestaltx/blob/main/GestaltX/DevicePlistIdentity.swift"
click node_deviceproof "https://github.com/huamidev/gestaltx/blob/main/GestaltX/DeviceBoundPlist.swift"
click node_shareextension "https://github.com/huamidev/gestaltx/blob/main/ShareExtension/ShareViewController.swift"
click node_provider "https://github.com/huamidev/gestaltx/blob/main/ShareExtension/ItemProviderLoad.swift"
click node_appgroups "https://github.com/huamidev/gestaltx/blob/main/Shared/SharedAppGroups.swift"
click node_inbox "https://github.com/huamidev/gestaltx/blob/main/Shared/SharedPlistInbox.swift"
click node_importqueue "https://github.com/huamidev/gestaltx/blob/main/GestaltX/SharedImportQueue.swift"
click node_directimport "https://github.com/huamidev/gestaltx/blob/main/GestaltX/DirectFileImports.swift"
click node_backups "https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltDocument.swift"
click node_tempexport "https://github.com/huamidev/gestaltx/blob/main/GestaltX/TemporaryExport.swift"
click node_respring "https://github.com/huamidev/gestaltx/blob/main/GestaltX/NeoSpringView.swift"
click node_worsequery "https://github.com/huamidev/gestaltx/blob/main/GestaltX/worse_query.m"

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_interface,node_about,node_welcome toneBlue
class node_manager,node_capabilities,node_document,node_cacheoptions,node_cachelayout,node_identity,node_deviceproof toneAmber
class node_shareextension,node_provider,node_appgroups,node_inbox,node_importqueue,node_directimport toneMint
class node_backups,node_tempexport toneRose
class node_respring,node_worsequery,node_user,node_device toneIndigo
```

## Components

### App experience

- [App entry](https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltXApp.swift): `GestaltX/GestaltXApp.swift`
- [Editor interface](https://github.com/huamidev/gestaltx/blob/main/GestaltX/ContentView.swift): `GestaltX/ContentView.swift`
- [About and support](https://github.com/huamidev/gestaltx/blob/main/GestaltX/AboutView.swift): `GestaltX/AboutView.swift`
- [Welcome view](https://github.com/huamidev/gestaltx/blob/main/GestaltX/WelcomeView.swift): `GestaltX/WelcomeView.swift`

### Editing and device access

- [Workflow manager](https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltManager.swift): `GestaltX/GestaltManager.swift`
- [Capability presets](https://github.com/huamidev/gestaltx/blob/main/GestaltX/Capabilities.swift): `GestaltX/Capabilities.swift`
- [Plist document](https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltDocument.swift): `GestaltX/GestaltDocument.swift`
- [Cache options](https://github.com/huamidev/gestaltx/blob/main/GestaltX/DeviceCacheOptions.swift): `GestaltX/DeviceCacheOptions.swift`
- [Cache layout](https://github.com/huamidev/gestaltx/blob/main/GestaltX/MobileGestaltCacheLayout.swift): `GestaltX/MobileGestaltCacheLayout.swift`
- [Device identity](https://github.com/huamidev/gestaltx/blob/main/GestaltX/DevicePlistIdentity.swift): `GestaltX/DevicePlistIdentity.swift`
- [Device-bound proof](https://github.com/huamidev/gestaltx/blob/main/GestaltX/DeviceBoundPlist.swift): `GestaltX/DeviceBoundPlist.swift`

### Plist import

- [Share extension](https://github.com/huamidev/gestaltx/blob/main/ShareExtension/ShareViewController.swift): `ShareExtension/ShareViewController.swift`
- [Provider loading](https://github.com/huamidev/gestaltx/blob/main/ShareExtension/ItemProviderLoad.swift): `ShareExtension/ItemProviderLoad.swift`
- [App Group discovery](https://github.com/huamidev/gestaltx/blob/main/Shared/SharedAppGroups.swift): `Shared/SharedAppGroups.swift`
- [Shared plist inbox](https://github.com/huamidev/gestaltx/blob/main/Shared/SharedPlistInbox.swift): `Shared/SharedPlistInbox.swift`
- [Import queue](https://github.com/huamidev/gestaltx/blob/main/GestaltX/SharedImportQueue.swift): `GestaltX/SharedImportQueue.swift`
- [Direct file imports](https://github.com/huamidev/gestaltx/blob/main/GestaltX/DirectFileImports.swift): `GestaltX/DirectFileImports.swift`

### Backups and state

- [Backup and restore](https://github.com/huamidev/gestaltx/blob/main/GestaltX/GestaltDocument.swift): `GestaltX/GestaltDocument.swift`
- [Temporary export](https://github.com/huamidev/gestaltx/blob/main/GestaltX/TemporaryExport.swift): `GestaltX/TemporaryExport.swift`

### System integration

- [NeoSpring](https://github.com/huamidev/gestaltx/blob/main/GestaltX/NeoSpringView.swift): `GestaltX/NeoSpringView.swift`
- [worse_query access](https://github.com/huamidev/gestaltx/blob/main/GestaltX/worse_query.m): `GestaltX/worse_query.m`

### Other components

- **Device owner**
- **iOS device**

## Connections

- Device owner → Editor interface: edits or imports (evidence: `README.md`)
- App entry → Editor interface: shows (evidence: `GestaltX/GestaltXApp.swift`)
- Editor interface → Workflow manager: requests actions (evidence: `GestaltX/ContentView.swift`)
- Editor interface → About and support: opens (evidence: `GestaltX/ContentView.swift`)
- Editor interface → Welcome view: presents (evidence: `GestaltX/ContentView.swift`)
- Editor interface → NeoSpring: presents (evidence: `GestaltX/ContentView.swift`)
- Editor interface → Import queue: checks pending imports (evidence: `GestaltX/ContentView.swift`)
- Workflow manager → Plist document: loads and commits (evidence: `GestaltX/GestaltManager.swift`)
- Workflow manager → Device identity: checks identifiers (evidence: `GestaltX/GestaltManager.swift`)
- Workflow manager → Device-bound proof: verifies imports (evidence: `GestaltX/GestaltManager.swift`)
- Workflow manager → Backup and restore: manages backups (evidence: `README.md`)
- Workflow manager → worse_query access: runs exploit (evidence: `GestaltX/GestaltManager.swift`)
- Capability presets → Plist document: defines presets (evidence: `GestaltX/Capabilities.swift`)
- Plist document → Cache options: validates cache edits (evidence: `GestaltX/GestaltDocument.swift`)
- Plist document → Cache layout: resolves layout (evidence: `GestaltX/GestaltDocument.swift`)
- Cache options → Cache layout: resolves offsets (evidence: `GestaltX/DeviceCacheOptions.swift`)
- Share extension → Provider loading: loads shared file (evidence: `ShareExtension/ShareViewController.swift`)
- Share extension → App Group discovery: finds shared inbox (evidence: `ShareExtension/ShareViewController.swift`)
- Share extension → Shared plist inbox: stores plist (evidence: `README.md`)
- App Group discovery → Shared plist inbox: creates inboxes (evidence: `Shared/SharedAppGroups.swift`)
- Editor interface → App Group discovery: discovers imports (evidence: `GestaltX/ContentView.swift`)
- Editor interface → Direct file imports: captures file imports (evidence: `GestaltX/ContentView.swift`)
- Import queue → Shared plist inbox: selects pending entry (evidence: `GestaltX/SharedImportQueue.swift`)
- Workflow manager → Shared plist inbox: prepares shared plist (evidence: `GestaltX/GestaltManager.swift`)
- Workflow manager → Temporary export: creates export (evidence: `GestaltX/ContentView.swift`)
- worse_query access → iOS device: accesses MobileGestalt (evidence: `README.md`)
- NeoSpring → iOS device: attempts refresh (evidence: `README.md`)
- Backup and restore → Plist document: stores plist copies (evidence: `GestaltX/GestaltDocument.swift`)
- Device-bound proof → Shared plist inbox: validates shared file (evidence: `GestaltX/DeviceBoundPlist.swift`)
