# neofreebird/app architecture

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

- Interactive diagram: https://gitdiagram.com/neofreebird/app
- Repository: https://github.com/neofreebird/app

## Overview

NeoFreeBird is an iOS Twitter/X tweak with a settings interface and optional app branding for sideloaded builds. The principal documented workflow is a user long-pressing the app icon in the home timeline to open NeoFreeBird settings, where configurable pages expose tweak options. Runtime capabilities are organized here by their hook directories; branding is a separate IPA/TIPA modification path. Source excerpts show declarations rather than most hook implementations, so capability membership is supported by the tree, but unshown calls between those subsystems are intentionally omitted.

Main entry points: [`branding/ipa_branding.py`](https://github.com/neofreebird/app/blob/v7/branding/ipa_branding.py) (IPA branding), [`src/Settings/ModernSettingsViewController.h`](https://github.com/neofreebird/app/blob/v7/src/Settings/ModernSettingsViewController.h) (Settings interface), [`branding/scar_merge.py`](https://github.com/neofreebird/app/blob/v7/branding/scar_merge.py) (Asset catalog merge), [`branding/svg_merge.py`](https://github.com/neofreebird/app/blob/v7/branding/svg_merge.py) (SVG merge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_settings["Settings"]
  node_settings_root["Settings interface"]
  node_settings_pages["Settings pages"]
  node_appearance["Appearance controls"]
  node_theme["Color themes"]
  node_profiles["Profiles and presets"]
  node_timeline_settings["Timeline settings"]
  node_experimental["Experimental settings"]
end

subgraph group_tweak["App Tweaks"]
  node_timeline_hooks["Timeline behavior"]
  node_chat_hooks["Chat behavior<br/>[Chat.h]"]
  node_media_hooks["Media tools"]
  node_post_hooks["Post interactions<br/>[PostInteractions.h]"]
  node_web_hooks["Web features"]
  node_feature_switches["Feature switches<br/>[FeatureSwitches.h]"]
end

subgraph group_runtime["Runtime Foundation"]
  node_manager["Tweak manager<br/>[BHTManager.h]"]
  node_settings_state["Settings state<br/>[BHTSettings.h]"]
  node_host_headers["Twitter host interfaces<br/>[T1Headers.h]"]
  node_network_headers["Network interfaces<br/>[TFNHeaders.h]"]
end

subgraph group_branding["App Branding"]
  node_ipa_branding["IPA branding<br/>[ipa_branding.py]"]
  node_asset_merge["Asset catalog merge<br/>[scar_merge.py]"]
  node_svg_merge["SVG merge<br/>[svg_merge.py]"]
  node_bundle_icons["Bundle icons"]
  node_loose_icons["Loose icons"]
  node_appearance_svgs["Appearance glyphs"]
end

node_user(("Twitter/X user"))
node_home["Home timeline"]

node_user -->|"long-presses icon"| node_home
node_home -->|"opens settings"| node_settings_root
node_ipa_branding -->|"merges catalog"| node_asset_merge
node_ipa_branding -->|"updates icons"| node_bundle_icons
node_ipa_branding -->|"syncs icons"| node_loose_icons
node_ipa_branding -->|"overrides glyphs"| node_appearance_svgs
node_ipa_branding -.->|"uses SVG merge"| node_svg_merge

click node_settings_root "https://github.com/neofreebird/app/blob/v7/src/Settings/ModernSettingsViewController.h"
click node_settings_pages "https://github.com/neofreebird/app/tree/v7/src/Settings/Pages"
click node_appearance "https://github.com/neofreebird/app/blob/v7/src/Settings/Pages/AppearanceSettingsViewController.h"
click node_theme "https://github.com/neofreebird/app/blob/v7/src/ThemeColor/ColorThemeViewController.h"
click node_profiles "https://github.com/neofreebird/app/blob/v7/src/Settings/Pages/ProfilesSettingsViewController.h"
click node_timeline_settings "https://github.com/neofreebird/app/blob/v7/src/Settings/Pages/TimelinesSettingsViewController.h"
click node_experimental "https://github.com/neofreebird/app/blob/v7/src/Settings/Pages/ExperimentalSettingsViewController.h"
click node_timeline_hooks "https://github.com/neofreebird/app/tree/v7/src/Hooks/Timeline"
click node_chat_hooks "https://github.com/neofreebird/app/blob/v7/src/Hooks/Chat/Chat.h"
click node_media_hooks "https://github.com/neofreebird/app/tree/v7/src/Hooks/MediaDownloads"
click node_post_hooks "https://github.com/neofreebird/app/blob/v7/src/Hooks/PostInteractions/PostInteractions.h"
click node_web_hooks "https://github.com/neofreebird/app/tree/v7/src/Hooks/WebCreateTweet"
click node_feature_switches "https://github.com/neofreebird/app/blob/v7/src/Hooks/FeatureSwitches/FeatureSwitches.h"
click node_manager "https://github.com/neofreebird/app/blob/v7/src/Core/BHTManager.h"
click node_settings_state "https://github.com/neofreebird/app/blob/v7/src/Core/BHTSettings.h"
click node_host_headers "https://github.com/neofreebird/app/blob/v7/src/Headers/T1Headers.h"
click node_network_headers "https://github.com/neofreebird/app/blob/v7/src/Headers/TFNHeaders.h"
click node_ipa_branding "https://github.com/neofreebird/app/blob/v7/branding/ipa_branding.py"
click node_asset_merge "https://github.com/neofreebird/app/blob/v7/branding/scar_merge.py"
click node_svg_merge "https://github.com/neofreebird/app/blob/v7/branding/svg_merge.py"
click node_bundle_icons "https://github.com/neofreebird/app/blob/v7/branding/update_bundle_icons.py"
click node_loose_icons "https://github.com/neofreebird/app/blob/v7/branding/overwrite_loose_icons.py"
click node_appearance_svgs "https://github.com/neofreebird/app/blob/v7/branding/override_appearance_svgs.py"

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_settings_root,node_settings_pages,node_appearance,node_theme,node_profiles,node_timeline_settings,node_experimental,node_user toneBlue
class node_timeline_hooks,node_chat_hooks,node_media_hooks,node_post_hooks,node_web_hooks,node_feature_switches toneAmber
class node_manager,node_settings_state,node_host_headers,node_network_headers toneMint
class node_ipa_branding,node_asset_merge,node_svg_merge,node_bundle_icons,node_loose_icons,node_appearance_svgs toneRose
class node_home toneIndigo
```

## Components

### Settings

- [Settings interface](https://github.com/neofreebird/app/blob/v7/src/Settings/ModernSettingsViewController.h): `src/Settings/ModernSettingsViewController.h`
- [Settings pages](https://github.com/neofreebird/app/tree/v7/src/Settings/Pages): `src/Settings/Pages`
- [Appearance controls](https://github.com/neofreebird/app/blob/v7/src/Settings/Pages/AppearanceSettingsViewController.h): `src/Settings/Pages/AppearanceSettingsViewController.h`
- [Color themes](https://github.com/neofreebird/app/blob/v7/src/ThemeColor/ColorThemeViewController.h): `src/ThemeColor/ColorThemeViewController.h`
- [Profiles and presets](https://github.com/neofreebird/app/blob/v7/src/Settings/Pages/ProfilesSettingsViewController.h): `src/Settings/Pages/ProfilesSettingsViewController.h`
- [Timeline settings](https://github.com/neofreebird/app/blob/v7/src/Settings/Pages/TimelinesSettingsViewController.h): `src/Settings/Pages/TimelinesSettingsViewController.h`
- [Experimental settings](https://github.com/neofreebird/app/blob/v7/src/Settings/Pages/ExperimentalSettingsViewController.h): `src/Settings/Pages/ExperimentalSettingsViewController.h`

### App Tweaks

- [Timeline behavior](https://github.com/neofreebird/app/tree/v7/src/Hooks/Timeline): `src/Hooks/Timeline`
- [Chat behavior](https://github.com/neofreebird/app/blob/v7/src/Hooks/Chat/Chat.h): `src/Hooks/Chat/Chat.h`
- [Media tools](https://github.com/neofreebird/app/tree/v7/src/Hooks/MediaDownloads): `src/Hooks/MediaDownloads`
- [Post interactions](https://github.com/neofreebird/app/blob/v7/src/Hooks/PostInteractions/PostInteractions.h): `src/Hooks/PostInteractions/PostInteractions.h`
- [Web features](https://github.com/neofreebird/app/tree/v7/src/Hooks/WebCreateTweet): `src/Hooks/WebCreateTweet`
- [Feature switches](https://github.com/neofreebird/app/blob/v7/src/Hooks/FeatureSwitches/FeatureSwitches.h): `src/Hooks/FeatureSwitches/FeatureSwitches.h`

### Runtime Foundation

- [Tweak manager](https://github.com/neofreebird/app/blob/v7/src/Core/BHTManager.h): `src/Core/BHTManager.h`
- [Settings state](https://github.com/neofreebird/app/blob/v7/src/Core/BHTSettings.h): `src/Core/BHTSettings.h`
- [Twitter host interfaces](https://github.com/neofreebird/app/blob/v7/src/Headers/T1Headers.h): `src/Headers/T1Headers.h`
- [Network interfaces](https://github.com/neofreebird/app/blob/v7/src/Headers/TFNHeaders.h): `src/Headers/TFNHeaders.h`

### App Branding

- [IPA branding](https://github.com/neofreebird/app/blob/v7/branding/ipa_branding.py): `branding/ipa_branding.py`
- [Asset catalog merge](https://github.com/neofreebird/app/blob/v7/branding/scar_merge.py): `branding/scar_merge.py`
- [SVG merge](https://github.com/neofreebird/app/blob/v7/branding/svg_merge.py): `branding/svg_merge.py`
- [Bundle icons](https://github.com/neofreebird/app/blob/v7/branding/update_bundle_icons.py): `branding/update_bundle_icons.py`
- [Loose icons](https://github.com/neofreebird/app/blob/v7/branding/overwrite_loose_icons.py): `branding/overwrite_loose_icons.py`
- [Appearance glyphs](https://github.com/neofreebird/app/blob/v7/branding/override_appearance_svgs.py): `branding/override_appearance_svgs.py`

### Other components

- **Twitter/X user**
- **Home timeline**

## Connections

- Twitter/X user → Home timeline: long-presses icon
- Home timeline → Settings interface: opens settings
- IPA branding → Asset catalog merge: merges catalog (evidence: `branding/ipa_branding.py`)
- IPA branding → Bundle icons: updates icons (evidence: `branding/ipa_branding.py`)
- IPA branding → Loose icons: syncs icons (evidence: `branding/ipa_branding.py`)
- IPA branding → Appearance glyphs: overrides glyphs (evidence: `branding/ipa_branding.py`)
- IPA branding → SVG merge: uses SVG merge
