# langshiyunyi/repokit architecture

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

- Interactive diagram: https://gitdiagram.com/langshiyunyi/repokit
- Repository: https://github.com/langshiyunyi/repokit
- Video tour (about a minute): https://gitdiagram.com/langshiyunyi/repokit/video

## Overview

RepoKit is an on-device jailbreak repository manager: users create or import a source, manage its Debian packages, build and validate publishable indexes, then optionally back up or publish it. The UIKit app invokes the command-line helper; the README documents the helper’s domain operations and external tools. Helper internals were not sampled, so the operation nodes share the documented helper source path and the graph avoids asserting finer internal call structure.

Main entry points: [`repokit-helper/Sources/main.m`](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m) (Helper command), [`RepoKitApp/Sources/RKRootViewController.m`](https://github.com/langshiyunyi/repokit/blob/main/RepoKitApp/Sources/RKRootViewController.m) (RepoKit interface), [`RepoKitApp/Sources/RKHelperClient.m`](https://github.com/langshiyunyi/repokit/blob/main/RepoKitApp/Sources/RKHelperClient.m) (Helper client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["iOS app"]
  node_app_ui["RepoKit interface"]
  node_helper_client["Helper client<br/>[RKHelperClient.m]"]
end

subgraph group_repo["Repository management"]
  node_helper["Helper command<br/>[main.m]"]
  node_source_ops["Source create/import<br/>[main.m]"]
  node_package_ops["Package management<br/>[main.m]"]
  node_installed_import["Installed package import<br/>[main.m]"]
  node_repo_store["Local repository data"]
end

subgraph group_publish["Build and publish"]
  node_index_build["Index and Release build<br/>[main.m]"]
  node_checks["Integrity checks<br/>[main.m]"]
  node_github_config["GitHub configuration<br/>[main.m]"]
  node_push["Git publish<br/>[main.m]"]
end

subgraph group_maintenance["Recovery and audit"]
  node_backup_restore["Backup and restore<br/>[main.m]"]
  node_history_rollback["History and rollback<br/>[main.m]"]
end

node_user(("Device user"))
node_cli_user(("CLI user"))
node_dpkg_tools["dpkg tools"]
node_git_ssh["Git and SSH"]
node_github["GitHub Pages"]

node_user -->|"uses"| node_app_ui
node_app_ui -->|"requests operations"| node_helper_client
node_helper_client -->|"spawns"| node_helper
node_cli_user -->|"runs commands"| node_helper
node_helper -->|"dispatches"| node_source_ops
node_helper -->|"dispatches"| node_package_ops
node_helper -->|"dispatches"| node_installed_import
node_helper -->|"dispatches"| node_index_build
node_helper -->|"dispatches"| node_checks
node_helper -->|"dispatches"| node_backup_restore
node_helper -->|"dispatches"| node_history_rollback
node_helper -->|"dispatches"| node_github_config
node_helper -->|"dispatches"| node_push
node_source_ops -->|"creates or imports"| node_repo_store
node_package_ops -->|"updates packages"| node_repo_store
node_installed_import -->|"adds packages"| node_repo_store
node_index_build -->|"writes indexes"| node_repo_store
node_index_build -->|"runs scanpackages"| node_dpkg_tools
node_checks -->|"checks contents"| node_repo_store
node_checks -->|"checks dependencies"| node_dpkg_tools
node_backup_restore -->|"archives or restores"| node_repo_store
node_history_rollback -->|"reads or rolls back"| node_repo_store
node_github_config -->|"saves settings"| node_repo_store
node_push -->|"publishes directory"| node_repo_store
node_push -->|"runs Git"| node_git_ssh
node_git_ssh -->|"pushes commits"| node_github

click node_app_ui "https://github.com/langshiyunyi/repokit/blob/main/RepoKitApp/Sources/RKRootViewController.m"
click node_helper_client "https://github.com/langshiyunyi/repokit/blob/main/RepoKitApp/Sources/RKHelperClient.m"
click node_helper "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m"
click node_source_ops "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m"
click node_package_ops "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m"
click node_installed_import "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m"
click node_index_build "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m"
click node_checks "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m"
click node_backup_restore "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m"
click node_history_rollback "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m"
click node_github_config "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m"
click node_push "https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.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_ui,node_helper_client,node_user,node_cli_user toneBlue
class node_helper,node_source_ops,node_package_ops,node_installed_import,node_repo_store toneAmber
class node_index_build,node_checks,node_github_config,node_push toneMint
class node_backup_restore,node_history_rollback toneRose
class node_dpkg_tools,node_git_ssh,node_github toneIndigo
```

## Components

### iOS app

- [RepoKit interface](https://github.com/langshiyunyi/repokit/blob/main/RepoKitApp/Sources/RKRootViewController.m): `RepoKitApp/Sources/RKRootViewController.m`
- [Helper client](https://github.com/langshiyunyi/repokit/blob/main/RepoKitApp/Sources/RKHelperClient.m): `RepoKitApp/Sources/RKHelperClient.m`

### Repository management

- [Helper command](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`
- [Source create/import](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`
- [Package management](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`
- [Installed package import](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`
- **Local repository data**

### Build and publish

- [Index and Release build](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`
- [Integrity checks](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`
- [GitHub configuration](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`
- [Git publish](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`

### Recovery and audit

- [Backup and restore](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`
- [History and rollback](https://github.com/langshiyunyi/repokit/blob/main/repokit-helper/Sources/main.m): `repokit-helper/Sources/main.m`

### Other components

- **Device user**
- **CLI user**
- **dpkg tools**
- **Git and SSH**
- **GitHub Pages**

## Connections

- Device user → RepoKit interface: uses
- RepoKit interface → Helper client: requests operations
- Helper client → Helper command: spawns
- CLI user → Helper command: runs commands
- Helper command → Source create/import: dispatches
- Helper command → Package management: dispatches
- Helper command → Installed package import: dispatches
- Helper command → Index and Release build: dispatches
- Helper command → Integrity checks: dispatches
- Helper command → Backup and restore: dispatches
- Helper command → History and rollback: dispatches
- Helper command → GitHub configuration: dispatches
- Helper command → Git publish: dispatches
- Source create/import → Local repository data: creates or imports
- Package management → Local repository data: updates packages
- Installed package import → Local repository data: adds packages
- Index and Release build → Local repository data: writes indexes
- Index and Release build → dpkg tools: runs scanpackages
- Integrity checks → Local repository data: checks contents
- Integrity checks → dpkg tools: checks dependencies
- Backup and restore → Local repository data: archives or restores
- History and rollback → Local repository data: reads or rolls back
- GitHub configuration → Local repository data: saves settings
- Git publish → Local repository data: publishes directory
- Git publish → Git and SSH: runs Git
- Git and SSH → GitHub Pages: pushes commits
