# dadoum/sideloader architecture

> Architecture diagram of the GitHub repository dadoum/sideloader, 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/dadoum/sideloader
- Repository: https://github.com/dadoum/sideloader

## Overview

Sideloader installs third-party iOS apps by obtaining developer credentials from Apple, preparing and signing an app bundle, then deploying it to a connected device. The CLI exposes installation, signing, account-management, device-management, and pairing-file tools; GTK and Qt frontends provide GUI paths. The README documents the user workflow and broad capabilities, but most D implementation files were not sampled, so internal calls among those subsystems are not asserted.

Main entry points: [`frontends/cli/source/install.d`](https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/install.d) (Install workflow), [`frontends/cli/source/cli_frontend.d`](https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/cli_frontend.d) (CLI commands), [`source/server/appleaccount.d`](https://github.com/dadoum/sideloader/blob/main/source/server/appleaccount.d) (Apple account sessions), [`frontends/cli/source/certificate.d`](https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/certificate.d) (Certificate management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontends["User interfaces"]
  node_cli["CLI commands<br/>[cli_frontend.d]"]
  node_gtk["GTK interface"]
  node_qt["Qt interface"]
  node_swiftui["SwiftUI scaffold"]
  node_install["Install workflow<br/>[install.d]"]
end

subgraph group_account["Account and credentials"]
  node_appids["App ID management<br/>[app_id.d]"]
  node_certs["Certificate management<br/>[certificate.d]"]
  node_teams["Team management<br/>[team.d]"]
  node_appleauth["Apple account sessions<br/>[appleaccount.d]"]
  node_devsession["Developer sessions<br/>[developersession.d]"]
  node_certidentity["Certificate identity"]
end

subgraph group_signing["App preparation and signing"]
  node_bundle["Bundle preparation<br/>[bundle.d]"]
  node_signingcore["App signing<br/>[sign.d]"]
  node_trollsign["CoreTrust bypass<br/>[ct_bypass.d]"]
end

subgraph group_device["Device communication"]
  node_tools["Pairing tools"]
  node_idevice["iOS device APIs"]
  node_installation["Device installation"]
end

subgraph group_support["Shared services"]
  node_keyring["Credential storage<br/>[keyring.d]"]
end

node_user(("User"))
node_apple["Apple services"]
node_iosdevice(("iOS device"))

node_user -->|"runs commands"| node_cli
node_user -->|"uses interface"| node_gtk
node_user -->|"uses interface"| node_qt
node_cli -.->|"dispatches install"| node_install
node_install -->|"registers identifier"| node_appids
node_install -.->|"uses certificate"| node_certs
node_install -->|"prepares app"| node_bundle
node_install -->|"signs bundle"| node_signingcore
node_install -->|"installs app"| node_installation
node_appleauth -->|"authenticates with"| node_apple
node_devsession -->|"requests credentials"| node_apple
node_teams -.->|"manages account"| node_appleauth
node_certs -.->|"manages identity"| node_certidentity
node_tools -->|"sends pairing file"| node_iosdevice
node_installation -->|"deploys app"| node_iosdevice
node_idevice -->|"communicates with"| node_iosdevice
node_cli -->|"runs tools"| node_tools
node_keyring -.->|"stores credentials"| node_appleauth
node_user -->|"requests bypass"| node_trollsign
node_swiftui -.->|"shares backend"| node_cli

click node_cli "https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/cli_frontend.d"
click node_gtk "https://github.com/dadoum/sideloader/tree/main/frontends/gtk/source/ui"
click node_qt "https://github.com/dadoum/sideloader/tree/main/frontends/qt/source/ui"
click node_swiftui "https://github.com/dadoum/sideloader/tree/main/frontends/swiftui/source"
click node_install "https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/install.d"
click node_appids "https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/app_id.d"
click node_certs "https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/certificate.d"
click node_teams "https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/team.d"
click node_appleauth "https://github.com/dadoum/sideloader/blob/main/source/server/appleaccount.d"
click node_devsession "https://github.com/dadoum/sideloader/blob/main/source/server/developersession.d"
click node_certidentity "https://github.com/dadoum/sideloader/blob/main/source/sideload/certificateidentity.d"
click node_bundle "https://github.com/dadoum/sideloader/blob/main/source/sideload/bundle.d"
click node_signingcore "https://github.com/dadoum/sideloader/blob/main/source/sideload/sign.d"
click node_trollsign "https://github.com/dadoum/sideloader/blob/main/source/sideload/ct_bypass.d"
click node_tools "https://github.com/dadoum/sideloader/blob/main/source/tools/sidestorepairingfile.d"
click node_idevice "https://github.com/dadoum/sideloader/tree/main/source/imobiledevice"
click node_installation "https://github.com/dadoum/sideloader/blob/main/source/imobiledevice/installation_proxy.d"
click node_keyring "https://github.com/dadoum/sideloader/blob/main/keyring/source/keyring.d"

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_cli,node_gtk,node_qt,node_swiftui,node_install,node_user toneBlue
class node_appids,node_certs,node_teams,node_appleauth,node_devsession,node_certidentity toneAmber
class node_bundle,node_signingcore,node_trollsign toneMint
class node_tools,node_idevice,node_installation toneRose
class node_keyring,node_apple,node_iosdevice toneIndigo
```

## Components

### User interfaces

- [CLI commands](https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/cli_frontend.d): `frontends/cli/source/cli_frontend.d`
- [GTK interface](https://github.com/dadoum/sideloader/tree/main/frontends/gtk/source/ui): `frontends/gtk/source/ui`
- [Qt interface](https://github.com/dadoum/sideloader/tree/main/frontends/qt/source/ui): `frontends/qt/source/ui`
- [SwiftUI scaffold](https://github.com/dadoum/sideloader/tree/main/frontends/swiftui/source): `frontends/swiftui/source`
- [Install workflow](https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/install.d): `frontends/cli/source/install.d`

### Account and credentials

- [App ID management](https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/app_id.d): `frontends/cli/source/app_id.d`
- [Certificate management](https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/certificate.d): `frontends/cli/source/certificate.d`
- [Team management](https://github.com/dadoum/sideloader/blob/main/frontends/cli/source/team.d): `frontends/cli/source/team.d`
- [Apple account sessions](https://github.com/dadoum/sideloader/blob/main/source/server/appleaccount.d): `source/server/appleaccount.d`
- [Developer sessions](https://github.com/dadoum/sideloader/blob/main/source/server/developersession.d): `source/server/developersession.d`
- [Certificate identity](https://github.com/dadoum/sideloader/blob/main/source/sideload/certificateidentity.d): `source/sideload/certificateidentity.d`

### App preparation and signing

- [Bundle preparation](https://github.com/dadoum/sideloader/blob/main/source/sideload/bundle.d): `source/sideload/bundle.d`
- [App signing](https://github.com/dadoum/sideloader/blob/main/source/sideload/sign.d): `source/sideload/sign.d`
- [CoreTrust bypass](https://github.com/dadoum/sideloader/blob/main/source/sideload/ct_bypass.d): `source/sideload/ct_bypass.d`

### Device communication

- [Pairing tools](https://github.com/dadoum/sideloader/blob/main/source/tools/sidestorepairingfile.d): `source/tools/sidestorepairingfile.d`
- [iOS device APIs](https://github.com/dadoum/sideloader/tree/main/source/imobiledevice): `source/imobiledevice`
- [Device installation](https://github.com/dadoum/sideloader/blob/main/source/imobiledevice/installation_proxy.d): `source/imobiledevice/installation_proxy.d`

### Shared services

- [Credential storage](https://github.com/dadoum/sideloader/blob/main/keyring/source/keyring.d): `keyring/source/keyring.d`

### Other components

- **User**
- **Apple services**
- **iOS device**

## Connections

- User → CLI commands: runs commands (evidence: `README.md`)
- User → GTK interface: uses interface (evidence: `README.md`)
- User → Qt interface: uses interface (evidence: `README.md`)
- CLI commands → Install workflow: dispatches install
- Install workflow → App ID management: registers identifier (evidence: `README.md`)
- Install workflow → Certificate management: uses certificate
- Install workflow → Bundle preparation: prepares app (evidence: `README.md`)
- Install workflow → App signing: signs bundle (evidence: `README.md`)
- Install workflow → Device installation: installs app (evidence: `README.md`)
- Apple account sessions → Apple services: authenticates with (evidence: `README.md`)
- Developer sessions → Apple services: requests credentials (evidence: `README.md`)
- Team management → Apple account sessions: manages account
- Certificate management → Certificate identity: manages identity
- Pairing tools → iOS device: sends pairing file (evidence: `README.md`)
- Device installation → iOS device: deploys app (evidence: `README.md`)
- iOS device APIs → iOS device: communicates with (evidence: `README.md`)
- CLI commands → Pairing tools: runs tools (evidence: `README.md`)
- Credential storage → Apple account sessions: stores credentials
- User → CoreTrust bypass: requests bypass (evidence: `README.md`)
- SwiftUI scaffold → CLI commands: shares backend
