# khanh8249/sidestore architecture

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

- Interactive diagram: https://gitdiagram.com/khanh8249/sidestore
- Repository: https://github.com/khanh8249/sidestore

## Overview

SideStore is an untethered iOS alternative app store: users discover apps from sources, authenticate with an Apple ID, then install and refresh apps signed with their development certificate. The app also manages installed apps, app permissions and IDs, news, widgets, and advanced device services. The graph emphasizes the documented sideloading workflow and the sampled links from app management into the operation runner and persistent models. Several other capabilities are represented from the README and source tree; their internal wiring was not sampled, so uncertain relationships are omitted or marked unverified.

Main entry points: [`AltStore/Managing Apps/AppManager.swift`](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Managing%20Apps/AppManager.swift) (App management), [`SideStore/Core/Operations/PipelineRunner.swift`](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/PipelineRunner.swift) (Operation runner), [`AltStore/Core/Model/DatabaseManager/DatabaseManager.swift`](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Core/Model/DatabaseManager/DatabaseManager.swift) (Core Data store), [`AltStore/Sources/AddSourceViewController.swift`](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Sources/AddSourceViewController.swift) (Manage sources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Store Discovery"]
  node_browse["Browse catalog"]
  node_featured["Featured apps"]
  node_source_ui["Manage sources"]
  node_source_detail["Source details"]
  node_source_fetch["Fetch source"]
  node_catalog_models["Catalog models<br/>[StoreApp.swift]"]
end

subgraph group_account["Account &amp; Signing"]
  node_auth_ui["Sign-in flow"]
  node_auth["Apple account auth<br/>[AuthManager.swift]"]
  node_anisette["Anisette data"]
end

subgraph group_operations["App Operations"]
  node_app_manager["App management<br/>[AppManager.swift]"]
  node_pipeline["Operation runner"]
  node_pipeline_handler["Pipeline interaction"]
  node_signing["Certificate signing"]
  node_install_ops["Install and refresh"]
  node_download["App download"]
  node_background_refresh["Background refresh"]
end

subgraph group_platform["Device &amp; Persistence"]
  node_device_proxy["EM proxy"]
  node_device_muxer["Minimuxer"]
  node_jit["SideJIT"]
  node_database[("Core Data store")]
  node_installed_model["Installed app records<br/>[InstalledApp.swift]"]
  node_source_model["Source records<br/>[Source.swift]"]
  node_backup["Backup and restore<br/>[BackupEngine.swift]"]
end

subgraph group_experience["App Experience"]
  node_installed_ui["Installed apps"]
  node_app_detail["App details"]
  node_permissions["Review permissions"]
  node_news["Store news"]
  node_widgets["App widgets"]
end

node_user(("Device user"))
node_developer_portal{{"Apple Developer Portal"}}
node_vpn{{"LocalDevVPN tunnel"}}

node_user -->|"browses"| node_browse
node_browse -->|"shows"| node_featured
node_user -->|"adds source"| node_source_ui
node_source_ui -->|"fetches"| node_source_fetch
node_source_ui -->|"opens"| node_source_detail
node_source_fetch -.->|"creates"| node_source_model
node_featured -->|"displays"| node_catalog_models
node_user -->|"signs in"| node_auth_ui
node_auth_ui -.->|"authenticates"| node_auth
node_auth -->|"signs in"| node_developer_portal
node_auth -.->|"uses data"| node_anisette
node_user -->|"selects app"| node_app_detail
node_app_detail -.->|"requests action"| node_app_manager
node_app_manager -->|"runs pipeline"| node_pipeline
node_pipeline -->|"executes"| node_install_ops
node_pipeline -->|"uses handler"| node_pipeline_handler
node_pipeline_handler -->|"presents review"| node_permissions
node_pipeline -->|"uses certificates"| node_signing
node_app_manager -.->|"downloads"| node_download
node_user -->|"manages apps"| node_installed_ui
node_installed_ui -->|"requests changes"| node_app_manager
node_installed_ui -->|"opens details"| node_app_detail
node_user -.->|"reads news"| node_news
node_user -.->|"views widgets"| node_widgets
node_background_refresh -.->|"refreshes apps"| node_app_manager
node_pipeline -->|"records results"| node_database
node_app_manager -->|"reads and saves"| node_database
node_database -.->|"persists"| node_installed_model
node_database -.->|"persists"| node_source_model
node_user -.->|"backs up data"| node_backup
node_device_proxy -->|"uses tunnel"| node_vpn
node_device_muxer -->|"supports discovery"| node_vpn
node_user -.->|"enables JIT"| node_jit

click node_browse "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Browse/BrowseViewController.swift"
click node_featured "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Browse/FeaturedViewController.swift"
click node_source_ui "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Sources/AddSourceViewController.swift"
click node_source_detail "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Sources/SourceDetailViewController.swift"
click node_source_fetch "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/StandaloneOperations/FetchSourceOperation.swift"
click node_catalog_models "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Core/Model/StoreApp.swift"
click node_auth_ui "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Authentication/AuthenticationViewController.swift"
click node_auth "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Auth/AuthManager.swift"
click node_anisette "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Anisette/AnisetteProvider.swift"
click node_app_manager "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Managing%20Apps/AppManager.swift"
click node_pipeline "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/PipelineRunner.swift"
click node_pipeline_handler "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Handlers/PipelineHandler.swift"
click node_signing "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Certificates/CertificateManager.swift"
click node_install_ops "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/PipelineOperations/InstallAppOperation.swift"
click node_download "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/StandaloneOperations/DownloadAppOperation.swift"
click node_installed_ui "https://github.com/khanh8249/sidestore/blob/develop/AltStore/My%20Apps/MyAppsViewController.swift"
click node_app_detail "https://github.com/khanh8249/sidestore/blob/develop/AltStore/App%20Detail/AppViewController.swift"
click node_permissions "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Permissions/ReviewPermissionsViewController.swift"
click node_news "https://github.com/khanh8249/sidestore/blob/develop/AltStore/News/NewsViewController.swift"
click node_widgets "https://github.com/khanh8249/sidestore/blob/develop/AltWidget/Providers/AppsTimelineProvider.swift"
click node_background_refresh "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/StandaloneOperations/BackgroundRefreshAppsOperation.swift"
click node_device_proxy "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/DeviceApi/EMProxyWrapper.swift"
click node_device_muxer "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/DeviceApi/MinimuxerWrapper.swift"
click node_jit "https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/JIT/SideJITManager.swift"
click node_database "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Core/Model/DatabaseManager/DatabaseManager.swift"
click node_installed_model "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Core/Model/InstalledApp.swift"
click node_source_model "https://github.com/khanh8249/sidestore/blob/develop/AltStore/Core/Model/Source.swift"
click node_backup "https://github.com/khanh8249/sidestore/blob/develop/SideBackup/BackupEngine.swift"

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_browse,node_featured,node_source_ui,node_source_detail,node_source_fetch,node_catalog_models,node_user toneBlue
class node_auth_ui,node_auth,node_anisette toneAmber
class node_app_manager,node_pipeline,node_pipeline_handler,node_signing,node_install_ops,node_download,node_background_refresh toneMint
class node_device_proxy,node_device_muxer,node_jit,node_database,node_installed_model,node_source_model,node_backup toneRose
class node_installed_ui,node_app_detail,node_permissions,node_news,node_widgets,node_developer_portal,node_vpn toneIndigo
```

## Components

### Store Discovery

- [Browse catalog](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Browse/BrowseViewController.swift): `AltStore/Browse/BrowseViewController.swift`
- [Featured apps](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Browse/FeaturedViewController.swift): `AltStore/Browse/FeaturedViewController.swift`
- [Manage sources](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Sources/AddSourceViewController.swift): `AltStore/Sources/AddSourceViewController.swift`
- [Source details](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Sources/SourceDetailViewController.swift): `AltStore/Sources/SourceDetailViewController.swift`
- [Fetch source](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/StandaloneOperations/FetchSourceOperation.swift): `SideStore/Core/Operations/StandaloneOperations/FetchSourceOperation.swift`
- [Catalog models](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Core/Model/StoreApp.swift): `AltStore/Core/Model/StoreApp.swift`

### Account & Signing

- [Sign-in flow](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Authentication/AuthenticationViewController.swift): `AltStore/Authentication/AuthenticationViewController.swift`
- [Apple account auth](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Auth/AuthManager.swift): `SideStore/Core/Auth/AuthManager.swift`
- [Anisette data](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Anisette/AnisetteProvider.swift): `SideStore/Core/Anisette/AnisetteProvider.swift`

### App Operations

- [App management](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Managing%20Apps/AppManager.swift): `AltStore/Managing Apps/AppManager.swift`
- [Operation runner](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/PipelineRunner.swift): `SideStore/Core/Operations/PipelineRunner.swift`
- [Pipeline interaction](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Handlers/PipelineHandler.swift): `SideStore/Handlers/PipelineHandler.swift`
- [Certificate signing](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Certificates/CertificateManager.swift): `SideStore/Core/Certificates/CertificateManager.swift`
- [Install and refresh](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/PipelineOperations/InstallAppOperation.swift): `SideStore/Core/Operations/PipelineOperations/InstallAppOperation.swift`
- [App download](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/StandaloneOperations/DownloadAppOperation.swift): `SideStore/Core/Operations/StandaloneOperations/DownloadAppOperation.swift`
- [Background refresh](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/Operations/StandaloneOperations/BackgroundRefreshAppsOperation.swift): `SideStore/Core/Operations/StandaloneOperations/BackgroundRefreshAppsOperation.swift`

### Device & Persistence

- [EM proxy](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/DeviceApi/EMProxyWrapper.swift): `SideStore/Core/DeviceApi/EMProxyWrapper.swift`
- [Minimuxer](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/DeviceApi/MinimuxerWrapper.swift): `SideStore/Core/DeviceApi/MinimuxerWrapper.swift`
- [SideJIT](https://github.com/khanh8249/sidestore/blob/develop/SideStore/Core/JIT/SideJITManager.swift): `SideStore/Core/JIT/SideJITManager.swift`
- [Core Data store](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Core/Model/DatabaseManager/DatabaseManager.swift): `AltStore/Core/Model/DatabaseManager/DatabaseManager.swift`
- [Installed app records](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Core/Model/InstalledApp.swift): `AltStore/Core/Model/InstalledApp.swift`
- [Source records](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Core/Model/Source.swift): `AltStore/Core/Model/Source.swift`
- [Backup and restore](https://github.com/khanh8249/sidestore/blob/develop/SideBackup/BackupEngine.swift): `SideBackup/BackupEngine.swift`

### App Experience

- [Installed apps](https://github.com/khanh8249/sidestore/blob/develop/AltStore/My%20Apps/MyAppsViewController.swift): `AltStore/My Apps/MyAppsViewController.swift`
- [App details](https://github.com/khanh8249/sidestore/blob/develop/AltStore/App%20Detail/AppViewController.swift): `AltStore/App Detail/AppViewController.swift`
- [Review permissions](https://github.com/khanh8249/sidestore/blob/develop/AltStore/Permissions/ReviewPermissionsViewController.swift): `AltStore/Permissions/ReviewPermissionsViewController.swift`
- [Store news](https://github.com/khanh8249/sidestore/blob/develop/AltStore/News/NewsViewController.swift): `AltStore/News/NewsViewController.swift`
- [App widgets](https://github.com/khanh8249/sidestore/blob/develop/AltWidget/Providers/AppsTimelineProvider.swift): `AltWidget/Providers/AppsTimelineProvider.swift`

### Other components

- **Device user**
- **Apple Developer Portal**
- **LocalDevVPN tunnel**

## Connections

- Device user → Browse catalog: browses
- Browse catalog → Featured apps: shows (evidence: `AltStore/Browse/FeaturedViewController.swift`)
- Device user → Manage sources: adds source (evidence: `AltStore/Sources/AddSourceViewController.swift`)
- Manage sources → Fetch source: fetches (evidence: `AltStore/Sources/AddSourceViewController.swift`)
- Manage sources → Source details: opens (evidence: `AltStore/Sources/AddSourceViewController.swift`)
- Fetch source → Source records: creates
- Featured apps → Catalog models: displays (evidence: `AltStore/Browse/FeaturedViewController.swift`)
- Device user → Sign-in flow: signs in
- Sign-in flow → Apple account auth: authenticates
- Apple account auth → Apple Developer Portal: signs in (evidence: `SideStore/Core/Auth/AuthManager.swift`)
- Apple account auth → Anisette data: uses data (evidence: `SideStore/Core/Auth/AuthManager.swift`)
- Device user → App details: selects app (evidence: `AltStore/App Detail/AppViewController.swift`)
- App details → App management: requests action (evidence: `AltStore/App Detail/AppViewController.swift`)
- App management → Operation runner: runs pipeline (evidence: `AltStore/Managing Apps/AppManager.swift`)
- Operation runner → Install and refresh: executes (evidence: `SideStore/Core/Operations/PipelineRunner.swift`)
- Operation runner → Pipeline interaction: uses handler (evidence: `SideStore/Core/Operations/PipelineRunner.swift`)
- Pipeline interaction → Review permissions: presents review (evidence: `SideStore/Handlers/PipelineHandler.swift`)
- Operation runner → Certificate signing: uses certificates (evidence: `SideStore/Core/Operations/PipelineRunner.swift`)
- App management → App download: downloads
- Device user → Installed apps: manages apps
- Installed apps → App management: requests changes (evidence: `AltStore/My Apps/MyAppsViewController.swift`)
- Installed apps → App details: opens details (evidence: `AltStore/My Apps/MyAppsViewController.swift`)
- Device user → Store news: reads news
- Device user → App widgets: views widgets
- Background refresh → App management: refreshes apps (evidence: `AltStore/Managing Apps/AppManager.swift`)
- Operation runner → Core Data store: records results (evidence: `SideStore/Core/Operations/PipelineRunner.swift`)
- App management → Core Data store: reads and saves (evidence: `AltStore/Managing Apps/AppManager.swift`)
- Core Data store → Installed app records: persists (evidence: `AltStore/Core/Model/DatabaseManager/DatabaseManager.swift`)
- Core Data store → Source records: persists (evidence: `AltStore/Core/Model/DatabaseManager/DatabaseManager.swift`)
- Device user → Backup and restore: backs up data
- EM proxy → LocalDevVPN tunnel: uses tunnel
- Minimuxer → LocalDevVPN tunnel: supports discovery
- Device user → SideJIT: enables JIT
