# owngoal-dev/relaxin architecture

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

- Interactive diagram: https://gitdiagram.com/owngoal-dev/relaxin
- Repository: https://github.com/owngoal-dev/relaxin

## Overview

Relaxin is an iOS/iPadOS jailbreak app for RootHide devices. In the main flow, a user starts setup in the app; the UI delegates to an engine session, which runs the jailbreak engine and reports progress or failure back for display. After setup, a post-jailbreak session exposes runtime controls and actions. The tree also shows engine stages for preflight, kernel access, bootstrap, runtime, and removal. Those stage links are shown as unverified because their wiring was not excerpted; edges with evidence cite the README or source-index relationships.

Main entry points: [`Relaxin/Backend/EngineSession/EngineSession.swift`](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/EngineSession/EngineSession.swift) (Engine session), [`RelaxinEngine/Engine/RLXEngine.h`](https://github.com/owngoal-dev/relaxin/blob/main/RelaxinEngine/Engine/RLXEngine.h) (Engine orchestration), [`Relaxin/Interface/Home/HomeView.swift`](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Interface/Home/HomeView.swift) (Setup home), [`Relaxin/main.swift`](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/main.swift) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and UI"]
  node_app_entry["App entry<br/>[main.swift]"]
  node_app_runtime["App runtime"]
  node_root_ui["Root view<br/>[RootView.swift]"]
  node_home_ui["Setup home<br/>[HomeView.swift]"]
  node_terminal_ui["Terminal display"]
end

subgraph group_session["Sessions and output"]
  node_engine_session["Engine session"]
  node_terminal_lines["Output lines"]
end

subgraph group_engine["Jailbreak engine"]
  node_engine["Engine orchestration<br/>[RLXEngine.h]"]
  node_preflight["Preflight"]
  node_kernel["Kernel access"]
  node_bootstrap["Bootstrap"]
  node_runtime_tasks["Runtime handoff"]
  node_removal["Jailbreak removal"]
end

subgraph group_post["Post-jailbreak operations"]
  node_post_session["Post-jailbreak session"]
  node_post_ui["Post-jailbreak UI"]
  node_post_controller["Action controller"]
end

subgraph group_observability["Logging and diagnostics"]
  node_logger["App logging<br/>[AppLog.swift]"]
  node_failure_report["Failure report"]
end

node_user(("User"))
node_external_logs[("Log output")]

node_user -->|"launches"| node_app_entry
node_app_entry -->|"configures"| node_app_runtime
node_app_entry -->|"opens"| node_root_ui
node_root_ui -.->|"shows"| node_home_ui
node_home_ui -->|"reads configuration"| node_app_runtime
node_home_ui -.->|"starts setup"| node_engine_session
node_home_ui -->|"uses presenter"| node_terminal_ui
node_engine_session -->|"runs"| node_engine
node_engine_session -->|"refreshes availability"| node_post_session
node_engine_session -->|"records output"| node_terminal_lines
node_engine_session -->|"logs events"| node_logger
node_engine_session -->|"creates report"| node_failure_report
node_engine -.->|"dispatches stages"| node_preflight
node_engine -.->|"dispatches stages"| node_kernel
node_engine -.->|"dispatches stages"| node_bootstrap
node_engine -.->|"dispatches stages"| node_runtime_tasks
node_engine -.->|"dispatches stages"| node_removal
node_post_session -->|"feeds state"| node_post_ui
node_post_session -->|"performs actions"| node_post_controller
node_logger -.->|"writes logs"| node_external_logs
node_engine_session -->|"bridges engine logs"| node_logger
node_failure_report -->|"displayed by"| node_home_ui

click node_app_entry "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/main.swift"
click node_app_runtime "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Application/RelaxinRuntime.swift"
click node_root_ui "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Interface/Root/RootView.swift"
click node_home_ui "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Interface/Home/HomeView.swift"
click node_terminal_ui "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Interface/Terminal/TerminalPresenter.swift"
click node_engine_session "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/EngineSession/EngineSession.swift"
click node_terminal_lines "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/TerminalOutputLine.swift"
click node_engine "https://github.com/owngoal-dev/relaxin/blob/main/RelaxinEngine/Engine/RLXEngine.h"
click node_preflight "https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Preflight"
click node_kernel "https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Kernel"
click node_bootstrap "https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Bootstrap"
click node_runtime_tasks "https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Runtime"
click node_removal "https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Removal"
click node_post_session "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/PostJailbreakSession/PostJailbreakSession.swift"
click node_post_ui "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Interface/PostJailbreak/PostJailbreakHomeView.swift"
click node_post_controller "https://github.com/owngoal-dev/relaxin/blob/main/RelaxinPostJailbreak/Controller/RLXPostJailbreakController.h"
click node_logger "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/Logging/AppLog.swift"
click node_failure_report "https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/EngineSession/EngineSession%2BFailureReport.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_app_entry,node_app_runtime,node_root_ui,node_home_ui,node_terminal_ui,node_user toneBlue
class node_engine_session,node_terminal_lines,node_external_logs toneAmber
class node_engine,node_preflight,node_kernel,node_bootstrap,node_runtime_tasks,node_removal toneMint
class node_post_session,node_post_ui,node_post_controller toneRose
class node_logger,node_failure_report toneIndigo
```

## Components

### App and UI

- [App entry](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/main.swift): `Relaxin/main.swift`
- [App runtime](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Application/RelaxinRuntime.swift): `Relaxin/Application/RelaxinRuntime.swift`
- [Root view](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Interface/Root/RootView.swift): `Relaxin/Interface/Root/RootView.swift`
- [Setup home](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Interface/Home/HomeView.swift): `Relaxin/Interface/Home/HomeView.swift`
- [Terminal display](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Interface/Terminal/TerminalPresenter.swift): `Relaxin/Interface/Terminal/TerminalPresenter.swift`

### Sessions and output

- [Engine session](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/EngineSession/EngineSession.swift): `Relaxin/Backend/EngineSession/EngineSession.swift`
- [Output lines](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/TerminalOutputLine.swift): `Relaxin/Backend/TerminalOutputLine.swift`

### Jailbreak engine

- [Engine orchestration](https://github.com/owngoal-dev/relaxin/blob/main/RelaxinEngine/Engine/RLXEngine.h): `RelaxinEngine/Engine/RLXEngine.h`
- [Preflight](https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Preflight): `RelaxinEngine/Stages/Preflight`
- [Kernel access](https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Kernel): `RelaxinEngine/Stages/Kernel`
- [Bootstrap](https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Bootstrap): `RelaxinEngine/Stages/Bootstrap`
- [Runtime handoff](https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Runtime): `RelaxinEngine/Stages/Runtime`
- [Jailbreak removal](https://github.com/owngoal-dev/relaxin/tree/main/RelaxinEngine/Stages/Removal): `RelaxinEngine/Stages/Removal`

### Post-jailbreak operations

- [Post-jailbreak session](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/PostJailbreakSession/PostJailbreakSession.swift): `Relaxin/Backend/PostJailbreakSession/PostJailbreakSession.swift`
- [Post-jailbreak UI](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Interface/PostJailbreak/PostJailbreakHomeView.swift): `Relaxin/Interface/PostJailbreak/PostJailbreakHomeView.swift`
- [Action controller](https://github.com/owngoal-dev/relaxin/blob/main/RelaxinPostJailbreak/Controller/RLXPostJailbreakController.h): `RelaxinPostJailbreak/Controller/RLXPostJailbreakController.h`

### Logging and diagnostics

- [App logging](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/Logging/AppLog.swift): `Relaxin/Backend/Logging/AppLog.swift`
- [Failure report](https://github.com/owngoal-dev/relaxin/blob/main/Relaxin/Backend/EngineSession/EngineSession%2BFailureReport.swift): `Relaxin/Backend/EngineSession/EngineSession+FailureReport.swift`

### Other components

- **User**
- **Log output**

## Connections

- User → App entry: launches (evidence: `Relaxin/main.swift`)
- App entry → App runtime: configures
- App entry → Root view: opens
- Root view → Setup home: shows
- Setup home → App runtime: reads configuration (evidence: `Relaxin/Interface/Home/HomeView.swift`)
- Setup home → Engine session: starts setup (evidence: `Relaxin/Interface/Home/HomeView.swift`)
- Setup home → Terminal display: uses presenter (evidence: `Relaxin/Interface/Home/HomeView.swift`)
- Engine session → Engine orchestration: runs (evidence: `Relaxin/Backend/EngineSession/EngineSession.swift`)
- Engine session → Post-jailbreak session: refreshes availability (evidence: `Relaxin/Backend/EngineSession/EngineSession.swift`)
- Engine session → Output lines: records output (evidence: `Relaxin/Backend/EngineSession/EngineSession.swift`)
- Engine session → App logging: logs events (evidence: `Relaxin/Backend/EngineSession/EngineSession.swift`)
- Engine session → Failure report: creates report (evidence: `Relaxin/Backend/EngineSession/EngineSession+FailureReport.swift`)
- Engine orchestration → Preflight: dispatches stages
- Engine orchestration → Kernel access: dispatches stages
- Engine orchestration → Bootstrap: dispatches stages
- Engine orchestration → Runtime handoff: dispatches stages
- Engine orchestration → Jailbreak removal: dispatches stages
- Post-jailbreak session → Post-jailbreak UI: feeds state (evidence: `RelaxinLite/Interface/RelaxinLiteRootView.swift`)
- Post-jailbreak session → Action controller: performs actions (evidence: `Relaxin/Backend/PostJailbreakSession/PostJailbreakSession.swift`)
- App logging → Log output: writes logs
- Engine session → App logging: bridges engine logs (evidence: `Relaxin/Backend/EngineSession/EngineSession.swift`)
- Failure report → Setup home: displayed by
