# taylorcox75/qremote architecture

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

- Interactive diagram: https://gitdiagram.com/taylorcox75/qremote
- Repository: https://github.com/taylorcox75/qremote

## Overview

qRemote is a native-feeling iOS client for managing qBittorrent servers. Users configure or select a server, connect, then monitor and control torrents, add torrents from links/files or search results, and manage transfers, RSS, and server preferences. The graph separates connection/API infrastructure from the user-facing feature areas. README statements support documented capabilities whose implementation was not sampled; source-index import references support only the cited module relationships, so unsampled wiring is not inferred.

Main entry points: [`services/api/client.ts`](https://github.com/taylorcox75/qremote/blob/main/services/api/client.ts) (HTTP client), [`app/(tabs)/search.tsx`](https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/search.tsx) (Search indexers), [`services/server-manager.ts`](https://github.com/taylorcox75/qremote/blob/main/services/server-manager.ts) (Server lifecycle), [`services/storage.ts`](https://github.com/taylorcox75/qremote/blob/main/services/storage.ts) (Server storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_connection["Servers and connection"]
  node_server_ui["Server setup<br/>[add.tsx]"]
  node_server_context["Connection state<br/>[ServerContext.tsx]"]
  node_server_manager["Server lifecycle<br/>[server-manager.ts]"]
  node_server_storage[("Server storage<br/>[storage.ts]")]
  node_api_client["HTTP client<br/>[client.ts]"]
  node_connectivity_log["Connectivity logs"]
  node_api_types["WebUI data types<br/>[api.ts]"]
  node_proxy_config["Proxy configuration<br/>[quiProxy.ts]"]
end

subgraph group_torrent["Torrent management"]
  node_torrent_list["Torrent list<br/>[index.tsx]"]
  node_torrent_detail["Torrent controls<br/>[&#91;hash&#93;.tsx]"]
  node_torrent_actions["Torrent actions"]
  node_torrent_context["Torrent sync state<br/>[TorrentContext.tsx]"]
  node_torrent_api["Torrent API<br/>[torrents.ts]"]
  node_torrent_add["Add torrent<br/>[add.tsx]"]
end

subgraph group_search["Search and add"]
  node_search_screen["Search indexers<br/>[search.tsx]"]
  node_search_job["Search job polling<br/>[useSearchJob.ts]"]
  node_search_api["Search API<br/>[search.ts]"]
  node_hash_resolver["Result hash lookup"]
  node_search_results["Result normalization<br/>[searchResult.ts]"]
  node_plugins_screen["Plugin management<br/>[plugins.tsx]"]
  node_api_version["API version helpers<br/>[apiVersion.ts]"]
end

subgraph group_activity["Transfers and RSS"]
  node_transfer_screen["Transfer dashboard<br/>[transfer.tsx]"]
  node_transfer_state["Transfer state"]
  node_rss_screen["RSS feeds and rules<br/>[index.tsx]"]
  node_rss_feed["RSS feed view<br/>[feed.tsx]"]
  node_rss_api["RSS API<br/>[rss.ts]"]
end

subgraph group_preferences["Settings and app state"]
  node_settings_screen["App settings<br/>[index.tsx]"]
  node_torrent_defaults["Torrent defaults"]
  node_theme_context["Theme state<br/>[ThemeContext.tsx]"]
  node_theme_manager["Theme preferences"]
  node_app_preferences["Preference storage<br/>[preferences.ts]"]
  node_design_tokens["Design tokens<br/>[shadows.ts]"]
end

node_user(("User"))
node_qbittorrent["qBittorrent WebUI"]

node_user -->|"adds server"| node_server_ui
node_server_ui -->|"configures"| node_server_manager
node_server_manager -->|"reads and writes"| node_server_storage
node_server_manager -->|"connects through"| node_api_client
node_server_context -->|"connects via"| node_server_manager
node_server_context -->|"loads settings"| node_server_storage
node_api_client -.->|"sends requests"| node_qbittorrent
node_api_client -->|"records requests"| node_connectivity_log
node_server_manager -->|"records connection events"| node_connectivity_log
node_user -->|"monitors torrents"| node_torrent_list
node_torrent_list -.->|"shows synced state"| node_torrent_context
node_torrent_context -->|"checks connection"| node_server_context
node_torrent_context -.->|"syncs updates"| node_torrent_api
node_torrent_detail -.->|"invokes actions"| node_torrent_actions
node_torrent_actions -->|"calls"| node_torrent_api
node_torrent_api -->|"sends API calls"| node_api_client
node_user -->|"adds torrent"| node_torrent_add
node_user -->|"searches indexers"| node_search_screen
node_search_screen -->|"starts and polls"| node_search_job
node_search_job -->|"controls job"| node_search_api
node_search_api -->|"sends API calls"| node_api_client
node_search_screen -->|"resolves results"| node_hash_resolver
node_hash_resolver -->|"requests metadata"| node_torrent_api
node_hash_resolver -->|"identifies sites"| node_search_results
node_search_screen -->|"renders results"| node_search_results
node_search_screen -->|"adds selected result"| node_torrent_add
node_user -->|"manages plugins"| node_plugins_screen
node_user -->|"monitors transfers"| node_transfer_screen
node_transfer_screen -.->|"shows live state"| node_transfer_state
node_user -->|"manages RSS"| node_rss_screen
node_rss_screen -.->|"opens feed"| node_rss_feed
node_rss_screen -.->|"manages feeds"| node_rss_api
node_user -->|"configures app"| node_settings_screen
node_settings_screen -.->|"sets behavior"| node_torrent_defaults
node_settings_screen -.->|"changes appearance"| node_theme_context
node_theme_context -->|"loads and saves colors"| node_theme_manager
node_theme_context -->|"uses preference types"| node_app_preferences
node_theme_context -->|"persists preferences"| node_server_storage
node_server_storage -->|"stores server configs"| node_api_types
node_server_storage -->|"stores preferences"| node_app_preferences
node_api_client -->|"uses API types"| node_api_types
node_search_screen -.->|"checks capabilities"| node_api_version
node_api_client -->|"supports proxy mode"| node_proxy_config

click node_server_ui "https://github.com/taylorcox75/qremote/blob/main/app/server/add.tsx"
click node_server_context "https://github.com/taylorcox75/qremote/blob/main/context/ServerContext.tsx"
click node_server_manager "https://github.com/taylorcox75/qremote/blob/main/services/server-manager.ts"
click node_server_storage "https://github.com/taylorcox75/qremote/blob/main/services/storage.ts"
click node_api_client "https://github.com/taylorcox75/qremote/blob/main/services/api/client.ts"
click node_connectivity_log "https://github.com/taylorcox75/qremote/blob/main/services/connectivity-log.ts"
click node_torrent_list "https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/(torrents)/index.tsx"
click node_torrent_detail "https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/(torrents)/torrent/%5Bhash%5D.tsx"
click node_torrent_actions "https://github.com/taylorcox75/qremote/blob/main/hooks/useTorrentActions.ts"
click node_torrent_context "https://github.com/taylorcox75/qremote/blob/main/context/TorrentContext.tsx"
click node_torrent_api "https://github.com/taylorcox75/qremote/blob/main/services/api/torrents.ts"
click node_torrent_add "https://github.com/taylorcox75/qremote/blob/main/app/torrents/add.tsx"
click node_search_screen "https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/search.tsx"
click node_search_job "https://github.com/taylorcox75/qremote/blob/main/hooks/useSearchJob.ts"
click node_search_api "https://github.com/taylorcox75/qremote/blob/main/services/api/search.ts"
click node_hash_resolver "https://github.com/taylorcox75/qremote/blob/main/hooks/useSearchHashResolver.ts"
click node_search_results "https://github.com/taylorcox75/qremote/blob/main/utils/searchResult.ts"
click node_plugins_screen "https://github.com/taylorcox75/qremote/blob/main/app/search/plugins.tsx"
click node_transfer_screen "https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/transfer.tsx"
click node_transfer_state "https://github.com/taylorcox75/qremote/blob/main/context/TransferContext.tsx"
click node_rss_screen "https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/rss/index.tsx"
click node_rss_feed "https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/rss/feed.tsx"
click node_rss_api "https://github.com/taylorcox75/qremote/blob/main/services/api/rss.ts"
click node_settings_screen "https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/settings/index.tsx"
click node_torrent_defaults "https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/settings/torrent-defaults.tsx"
click node_theme_context "https://github.com/taylorcox75/qremote/blob/main/context/ThemeContext.tsx"
click node_theme_manager "https://github.com/taylorcox75/qremote/blob/main/services/color-theme-manager.ts"
click node_app_preferences "https://github.com/taylorcox75/qremote/blob/main/types/preferences.ts"
click node_api_types "https://github.com/taylorcox75/qremote/blob/main/types/api.ts"
click node_api_version "https://github.com/taylorcox75/qremote/blob/main/utils/apiVersion.ts"
click node_proxy_config "https://github.com/taylorcox75/qremote/blob/main/utils/quiProxy.ts"
click node_design_tokens "https://github.com/taylorcox75/qremote/blob/main/constants/shadows.ts"

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_server_ui,node_server_context,node_server_manager,node_server_storage,node_api_client,node_connectivity_log,node_api_types,node_proxy_config,node_user,node_qbittorrent toneBlue
class node_torrent_list,node_torrent_detail,node_torrent_actions,node_torrent_context,node_torrent_api,node_torrent_add toneAmber
class node_search_screen,node_search_job,node_search_api,node_hash_resolver,node_search_results,node_plugins_screen,node_api_version toneMint
class node_transfer_screen,node_transfer_state,node_rss_screen,node_rss_feed,node_rss_api toneRose
class node_settings_screen,node_torrent_defaults,node_theme_context,node_theme_manager,node_app_preferences,node_design_tokens toneIndigo
```

## Components

### Servers and connection

- [Server setup](https://github.com/taylorcox75/qremote/blob/main/app/server/add.tsx): `app/server/add.tsx`
- [Connection state](https://github.com/taylorcox75/qremote/blob/main/context/ServerContext.tsx): `context/ServerContext.tsx`
- [Server lifecycle](https://github.com/taylorcox75/qremote/blob/main/services/server-manager.ts): `services/server-manager.ts`
- [Server storage](https://github.com/taylorcox75/qremote/blob/main/services/storage.ts): `services/storage.ts`
- [HTTP client](https://github.com/taylorcox75/qremote/blob/main/services/api/client.ts): `services/api/client.ts`
- [Connectivity logs](https://github.com/taylorcox75/qremote/blob/main/services/connectivity-log.ts): `services/connectivity-log.ts`
- [WebUI data types](https://github.com/taylorcox75/qremote/blob/main/types/api.ts): `types/api.ts`
- [Proxy configuration](https://github.com/taylorcox75/qremote/blob/main/utils/quiProxy.ts): `utils/quiProxy.ts`

### Torrent management

- [Torrent list](https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/(torrents)/index.tsx): `app/(tabs)/(torrents)/index.tsx`
- [Torrent controls](https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/(torrents)/torrent/%5Bhash%5D.tsx): `app/(tabs)/(torrents)/torrent/[hash].tsx`
- [Torrent actions](https://github.com/taylorcox75/qremote/blob/main/hooks/useTorrentActions.ts): `hooks/useTorrentActions.ts`
- [Torrent sync state](https://github.com/taylorcox75/qremote/blob/main/context/TorrentContext.tsx): `context/TorrentContext.tsx`
- [Torrent API](https://github.com/taylorcox75/qremote/blob/main/services/api/torrents.ts): `services/api/torrents.ts`
- [Add torrent](https://github.com/taylorcox75/qremote/blob/main/app/torrents/add.tsx): `app/torrents/add.tsx`

### Search and add

- [Search indexers](https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/search.tsx): `app/(tabs)/search.tsx`
- [Search job polling](https://github.com/taylorcox75/qremote/blob/main/hooks/useSearchJob.ts): `hooks/useSearchJob.ts`
- [Search API](https://github.com/taylorcox75/qremote/blob/main/services/api/search.ts): `services/api/search.ts`
- [Result hash lookup](https://github.com/taylorcox75/qremote/blob/main/hooks/useSearchHashResolver.ts): `hooks/useSearchHashResolver.ts`
- [Result normalization](https://github.com/taylorcox75/qremote/blob/main/utils/searchResult.ts): `utils/searchResult.ts`
- [Plugin management](https://github.com/taylorcox75/qremote/blob/main/app/search/plugins.tsx): `app/search/plugins.tsx`
- [API version helpers](https://github.com/taylorcox75/qremote/blob/main/utils/apiVersion.ts): `utils/apiVersion.ts`

### Transfers and RSS

- [Transfer dashboard](https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/transfer.tsx): `app/(tabs)/transfer.tsx`
- [Transfer state](https://github.com/taylorcox75/qremote/blob/main/context/TransferContext.tsx): `context/TransferContext.tsx`
- [RSS feeds and rules](https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/rss/index.tsx): `app/(tabs)/rss/index.tsx`
- [RSS feed view](https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/rss/feed.tsx): `app/(tabs)/rss/feed.tsx`
- [RSS API](https://github.com/taylorcox75/qremote/blob/main/services/api/rss.ts): `services/api/rss.ts`

### Settings and app state

- [App settings](https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/settings/index.tsx): `app/(tabs)/settings/index.tsx`
- [Torrent defaults](https://github.com/taylorcox75/qremote/blob/main/app/(tabs)/settings/torrent-defaults.tsx): `app/(tabs)/settings/torrent-defaults.tsx`
- [Theme state](https://github.com/taylorcox75/qremote/blob/main/context/ThemeContext.tsx): `context/ThemeContext.tsx`
- [Theme preferences](https://github.com/taylorcox75/qremote/blob/main/services/color-theme-manager.ts): `services/color-theme-manager.ts`
- [Preference storage](https://github.com/taylorcox75/qremote/blob/main/types/preferences.ts): `types/preferences.ts`
- [Design tokens](https://github.com/taylorcox75/qremote/blob/main/constants/shadows.ts): `constants/shadows.ts`

### Other components

- **User**
- **qBittorrent WebUI**

## Connections

- User → Server setup: adds server (evidence: `README.md`)
- Server setup → Server lifecycle: configures
- Server lifecycle → Server storage: reads and writes (evidence: `services/server-manager.ts`)
- Server lifecycle → HTTP client: connects through (evidence: `services/server-manager.ts`)
- Connection state → Server lifecycle: connects via (evidence: `context/ServerContext.tsx`)
- Connection state → Server storage: loads settings (evidence: `context/ServerContext.tsx`)
- HTTP client → qBittorrent WebUI: sends requests
- HTTP client → Connectivity logs: records requests (evidence: `services/api/client.ts`)
- Server lifecycle → Connectivity logs: records connection events (evidence: `services/server-manager.ts`)
- User → Torrent list: monitors torrents (evidence: `README.md`)
- Torrent list → Torrent sync state: shows synced state
- Torrent sync state → Connection state: checks connection (evidence: `context/TorrentContext.tsx`)
- Torrent sync state → Torrent API: syncs updates
- Torrent controls → Torrent actions: invokes actions
- Torrent actions → Torrent API: calls (evidence: `hooks/useTorrentActions.ts`)
- Torrent API → HTTP client: sends API calls (evidence: `services/api/torrents.ts`)
- User → Add torrent: adds torrent (evidence: `README.md`)
- User → Search indexers: searches indexers (evidence: `README.md`)
- Search indexers → Search job polling: starts and polls (evidence: `app/(tabs)/search.tsx`)
- Search job polling → Search API: controls job (evidence: `hooks/useSearchJob.ts`)
- Search API → HTTP client: sends API calls (evidence: `services/api/search.ts`)
- Search indexers → Result hash lookup: resolves results (evidence: `app/(tabs)/search.tsx`)
- Result hash lookup → Torrent API: requests metadata (evidence: `hooks/useSearchHashResolver.ts`)
- Result hash lookup → Result normalization: identifies sites (evidence: `hooks/useSearchHashResolver.ts`)
- Search indexers → Result normalization: renders results (evidence: `app/(tabs)/search.tsx`)
- Search indexers → Add torrent: adds selected result (evidence: `README.md`)
- User → Plugin management: manages plugins (evidence: `README.md`)
- User → Transfer dashboard: monitors transfers (evidence: `README.md`)
- Transfer dashboard → Transfer state: shows live state
- User → RSS feeds and rules: manages RSS (evidence: `README.md`)
- RSS feeds and rules → RSS feed view: opens feed
- RSS feeds and rules → RSS API: manages feeds
- User → App settings: configures app (evidence: `README.md`)
- App settings → Torrent defaults: sets behavior
- App settings → Theme state: changes appearance
- Theme state → Theme preferences: loads and saves colors (evidence: `context/ThemeContext.tsx`)
- Theme state → Preference storage: uses preference types (evidence: `context/ThemeContext.tsx`)
- Theme state → Server storage: persists preferences (evidence: `context/ThemeContext.tsx`)
- Server storage → WebUI data types: stores server configs (evidence: `services/storage.ts`)
- Server storage → Preference storage: stores preferences (evidence: `services/storage.ts`)
- HTTP client → WebUI data types: uses API types (evidence: `services/api/client.ts`)
- Search indexers → API version helpers: checks capabilities
- HTTP client → Proxy configuration: supports proxy mode (evidence: `services/api/client.ts`)
