# sidanimo/bhtiktokplusplus architecture

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

- Interactive diagram: https://gitdiagram.com/sidanimo/bhtiktokplusplus
- Repository: https://github.com/sidanimo/bhtiktokplusplus

## Overview

BHTikTok++ is an iOS tweak that adds controls and content utilities to TikTok. The main workflow is a user interacting with TikTok, where tweak hooks apply configured behavior or expose actions such as copying or downloading media; download progress and completion are surfaced in the interface. Settings cover feature toggles and region, live-action, and playback choices. The README documents broader feed, profile, and safety modifications. Source excerpts are partial, so feature wiring beyond the declared interfaces and product documentation is shown conservatively.

Main entry points: [`Tweak.x`](https://github.com/sidanimo/bhtiktokplusplus/blob/main/Tweak.x) (Tweak hooks), [`Settings/ViewController.m`](https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/ViewController.m) (Settings screen), [`JGProgressHUD/JGProgressHUD.m`](https://github.com/sidanimo/bhtiktokplusplus/blob/main/JGProgressHUD/JGProgressHUD.m) (Progress HUD), [`BHDownload.m`](https://github.com/sidanimo/bhtiktokplusplus/blob/main/BHDownload.m) (Single download)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["TikTok integration"]
  node_hooks["Tweak hooks<br/>[Tweak.x]"]
  node_manager["Feature manager<br/>[BHIManager.m]"]
end

subgraph group_settings["Preferences"]
  node_settings["Settings screen<br/>[ViewController.m]"]
  node_country["Region settings<br/>[CountryTable.m]"]
  node_live["Live actions<br/>[LiveActions.m]"]
  node_speed["Playback speed<br/>[PlaybackSpeed.m]"]
  node_security["App lock"]
  node_countrydata["Country selection<br/>[CountryTable.m]"]
end

subgraph group_media["Media actions"]
  node_download["Single download<br/>[BHDownload.m]"]
  node_multi["Batch download"]
  node_save["Media save/cache<br/>[BHIManager.m]"]
end

subgraph group_interface["User interface"]
  node_hud["Progress HUD<br/>[JGProgressHUD.m]"]
  node_indicator["Progress indicators"]
end

node_user(("TikTok user"))
node_tiktok["TikTok app"]
node_network["URL session"]

node_user -->|"uses"| node_tiktok
node_tiktok -->|"runs hooks"| node_hooks
node_hooks -->|"checks features"| node_manager
node_user -->|"configures"| node_settings
node_settings -->|"sets preferences"| node_manager
node_settings -->|"opens"| node_country
node_settings -->|"opens"| node_live
node_settings -->|"opens"| node_speed
node_hooks -.->|"presents lock"| node_security
node_hooks -->|"starts download"| node_download
node_hooks -->|"starts batch"| node_multi
node_manager -->|"saves media"| node_save
node_download -->|"downloads via"| node_network
node_multi -->|"downloads via"| node_network
node_hooks -->|"shows progress"| node_hud
node_download -.->|"reports progress"| node_hud
node_multi -.->|"reports progress"| node_hud
node_hud -->|"displays progress"| node_indicator
node_country -->|"selects region"| node_countrydata

click node_hooks "https://github.com/sidanimo/bhtiktokplusplus/blob/main/Tweak.x"
click node_manager "https://github.com/sidanimo/bhtiktokplusplus/blob/main/BHIManager.m"
click node_settings "https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/ViewController.m"
click node_country "https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/CountryTable.m"
click node_live "https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/LiveActions.m"
click node_speed "https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/PlaybackSpeed.m"
click node_security "https://github.com/sidanimo/bhtiktokplusplus/blob/main/SecurityViewController.m"
click node_download "https://github.com/sidanimo/bhtiktokplusplus/blob/main/BHDownload.m"
click node_multi "https://github.com/sidanimo/bhtiktokplusplus/blob/main/BHMultipleDownload.m"
click node_save "https://github.com/sidanimo/bhtiktokplusplus/blob/main/BHIManager.m"
click node_hud "https://github.com/sidanimo/bhtiktokplusplus/blob/main/JGProgressHUD/JGProgressHUD.m"
click node_indicator "https://github.com/sidanimo/bhtiktokplusplus/blob/main/JGProgressHUD/JGProgressHUDIndicatorView.m"
click node_countrydata "https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/CountryTable.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_hooks,node_manager,node_user toneBlue
class node_settings,node_country,node_live,node_speed,node_security,node_countrydata toneAmber
class node_download,node_multi,node_save toneMint
class node_hud,node_indicator toneRose
class node_tiktok,node_network toneIndigo
```

## Components

### TikTok integration

- [Tweak hooks](https://github.com/sidanimo/bhtiktokplusplus/blob/main/Tweak.x): `Tweak.x`
- [Feature manager](https://github.com/sidanimo/bhtiktokplusplus/blob/main/BHIManager.m): `BHIManager.m`

### Preferences

- [Settings screen](https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/ViewController.m): `Settings/ViewController.m`
- [Region settings](https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/CountryTable.m): `Settings/CountryTable.m`
- [Live actions](https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/LiveActions.m): `Settings/LiveActions.m`
- [Playback speed](https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/PlaybackSpeed.m): `Settings/PlaybackSpeed.m`
- [App lock](https://github.com/sidanimo/bhtiktokplusplus/blob/main/SecurityViewController.m): `SecurityViewController.m`
- [Country selection](https://github.com/sidanimo/bhtiktokplusplus/blob/main/Settings/CountryTable.m): `Settings/CountryTable.m`

### Media actions

- [Single download](https://github.com/sidanimo/bhtiktokplusplus/blob/main/BHDownload.m): `BHDownload.m`
- [Batch download](https://github.com/sidanimo/bhtiktokplusplus/blob/main/BHMultipleDownload.m): `BHMultipleDownload.m`
- [Media save/cache](https://github.com/sidanimo/bhtiktokplusplus/blob/main/BHIManager.m): `BHIManager.m`

### User interface

- [Progress HUD](https://github.com/sidanimo/bhtiktokplusplus/blob/main/JGProgressHUD/JGProgressHUD.m): `JGProgressHUD/JGProgressHUD.m`
- [Progress indicators](https://github.com/sidanimo/bhtiktokplusplus/blob/main/JGProgressHUD/JGProgressHUDIndicatorView.m): `JGProgressHUD/JGProgressHUDIndicatorView.m`

### Other components

- **TikTok user**
- **TikTok app**
- **URL session**

## Connections

- TikTok user → TikTok app: uses
- TikTok app → Tweak hooks: runs hooks
- Tweak hooks → Feature manager: checks features
- TikTok user → Settings screen: configures
- Settings screen → Feature manager: sets preferences
- Settings screen → Region settings: opens
- Settings screen → Live actions: opens
- Settings screen → Playback speed: opens
- Tweak hooks → App lock: presents lock
- Tweak hooks → Single download: starts download
- Tweak hooks → Batch download: starts batch
- Feature manager → Media save/cache: saves media
- Single download → URL session: downloads via
- Batch download → URL session: downloads via
- Tweak hooks → Progress HUD: shows progress
- Single download → Progress HUD: reports progress
- Batch download → Progress HUD: reports progress
- Progress HUD → Progress indicators: displays progress
- Region settings → Country selection: selects region
