# ahxn00/owntv_mobile architecture

> Architecture diagram of the GitHub repository ahxn00/owntv_mobile, 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/ahxn00/owntv_mobile
- Repository: https://github.com/ahxn00/owntv_mobile

## Overview

OwnTV Mobile is an Android IPTV client: users configure their own provider or playlist, browse live and on-demand content, then play, record, download, or sync it. The app is primarily a Compose phone/tablet interface; the README assigns parsing, persistence, EPG, sync, backup, and playback decisions to the shared OwnTV core library. The map preserves those documented capabilities, but their internal wiring is outside this repository and was not sampled.

Main entry points: [`app/src/main/java/tv/own/owntv/mobile/ui/nav/MobileNavHost.kt`](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/nav/MobileNavHost.kt) (Navigation host), [`app/src/main/java/tv/own/owntv/mobile/ui/player/PlayerScreen.kt`](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/player/PlayerScreen.kt) (Player screen), [`app/src/main/java/tv/own/owntv/mobile/ui/screens/guide/GuideScreen.kt`](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/guide/GuideScreen.kt) (TV guide), [`app/src/main/java/tv/own/owntv/mobile/ui/screens/live/LiveScreen.kt`](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/live/LiveScreen.kt) (Live channels)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_activity["Android activity<br/>[MainActivity.kt]"]
  node_app_root["App root<br/>[OwnTVMobileApp.kt]"]
  node_shell_ui["Mobile shell<br/>[MobileShell.kt]"]
  node_navigation["Navigation host<br/>[MobileNavHost.kt]"]
end

subgraph group_sources["Sources and guide"]
  node_setup["Source setup<br/>[SetupFlow.kt]"]
  node_guide["TV guide<br/>[GuideScreen.kt]"]
end

subgraph group_browse["Browse and library"]
  node_live["Live channels<br/>[LiveScreen.kt]"]
  node_home["Home rows<br/>[HomeScreen.kt]"]
  node_library["Movies and series<br/>[LibraryScreen.kt]"]
  node_details["Content details<br/>[DetailScreen.kt]"]
  node_search["Unified search<br/>[SearchScreen.kt]"]
end

subgraph group_playback["Playback"]
  node_player_ui["Player screen<br/>[PlayerScreen.kt]"]
  node_tuning["Playback tuners<br/>[LiveTuner.kt]"]
  node_cast["Cast handoff<br/>[CastController.kt]"]
  node_playback_service["Playback service<br/>[PlaybackService.kt]"]
  node_multiview["Multiview<br/>[MultiviewScreen.kt]"]
end

subgraph group_account["Profiles and utilities"]
  node_downloads["Downloads<br/>[DownloadsScreen.kt]"]
  node_recordings["Recordings"]
  node_profiles["Profiles"]
  node_settings["Settings and sync<br/>[SettingsScreen.kt]"]
end

node_viewer(("Viewer"))
node_core["OwnTV core"]
node_cast_receiver["Cast receiver"]

node_viewer -->|"opens app"| node_activity
node_activity -->|"hosts UI"| node_app_root
node_app_root -->|"starts shell"| node_shell_ui
node_shell_ui -->|"routes screens"| node_navigation
node_navigation -->|"opens setup"| node_setup
node_navigation -->|"opens home"| node_home
node_navigation -->|"opens channels"| node_live
node_navigation -->|"opens guide"| node_guide
node_navigation -->|"opens library"| node_library
node_navigation -->|"opens details"| node_details
node_navigation -->|"opens search"| node_search
node_navigation -->|"opens player"| node_player_ui
node_navigation -->|"opens multiview"| node_multiview
node_navigation -->|"opens downloads"| node_downloads
node_navigation -->|"opens recordings"| node_recordings
node_navigation -->|"opens profiles"| node_profiles
node_navigation -->|"opens settings"| node_settings
node_setup -->|"imports sources"| node_core
node_home -->|"loads rows"| node_core
node_live -->|"loads channels"| node_core
node_guide -->|"loads guide data"| node_core
node_library -->|"loads catalog"| node_core
node_details -->|"loads details"| node_core
node_search -->|"searches catalog"| node_core
node_live -->|"selects stream"| node_player_ui
node_guide -->|"selects programme"| node_player_ui
node_details -->|"starts playback"| node_player_ui
node_player_ui -->|"controls playback"| node_tuning
node_tuning -->|"uses playback engine"| node_core
node_tuning -->|"offers stream"| node_cast
node_cast -.->|"loads media"| node_cast_receiver
node_cast -->|"starts service"| node_playback_service
node_player_ui -->|"opens tiles"| node_multiview
node_downloads -->|"manages downloads"| node_core
node_recordings -->|"manages recordings"| node_core
node_profiles -->|"loads profiles"| node_core
node_settings -->|"configures sync and backup"| node_core

click node_activity "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/MainActivity.kt"
click node_app_root "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/OwnTVMobileApp.kt"
click node_shell_ui "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/shell/MobileShell.kt"
click node_navigation "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/nav/MobileNavHost.kt"
click node_setup "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/setup/SetupFlow.kt"
click node_guide "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/guide/GuideScreen.kt"
click node_live "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/live/LiveScreen.kt"
click node_home "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/home/HomeScreen.kt"
click node_library "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/library/LibraryScreen.kt"
click node_details "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/library/DetailScreen.kt"
click node_search "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/search/SearchScreen.kt"
click node_player_ui "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/player/PlayerScreen.kt"
click node_tuning "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/live/LiveTuner.kt"
click node_cast "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/cast/CastController.kt"
click node_playback_service "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/playback/PlaybackService.kt"
click node_multiview "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/multiview/MultiviewScreen.kt"
click node_downloads "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/downloads/DownloadsScreen.kt"
click node_recordings "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/recordings/RecordingsScreen.kt"
click node_profiles "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/profiles/ProfilesViewModel.kt"
click node_settings "https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/settings/SettingsScreen.kt"

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_activity,node_app_root,node_shell_ui,node_navigation,node_viewer toneBlue
class node_setup,node_guide toneAmber
class node_live,node_home,node_library,node_details,node_search toneMint
class node_player_ui,node_tuning,node_cast,node_playback_service,node_multiview toneRose
class node_downloads,node_recordings,node_profiles,node_settings,node_core,node_cast_receiver toneIndigo
```

## Components

### App shell

- [Android activity](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/MainActivity.kt): `app/src/main/java/tv/own/owntv/mobile/MainActivity.kt`
- [App root](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/OwnTVMobileApp.kt): `app/src/main/java/tv/own/owntv/mobile/OwnTVMobileApp.kt`
- [Mobile shell](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/shell/MobileShell.kt): `app/src/main/java/tv/own/owntv/mobile/ui/shell/MobileShell.kt`
- [Navigation host](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/nav/MobileNavHost.kt): `app/src/main/java/tv/own/owntv/mobile/ui/nav/MobileNavHost.kt`

### Sources and guide

- [Source setup](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/setup/SetupFlow.kt): `app/src/main/java/tv/own/owntv/mobile/ui/setup/SetupFlow.kt`
- [TV guide](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/guide/GuideScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/guide/GuideScreen.kt`

### Browse and library

- [Live channels](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/live/LiveScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/live/LiveScreen.kt`
- [Home rows](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/home/HomeScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/home/HomeScreen.kt`
- [Movies and series](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/library/LibraryScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/library/LibraryScreen.kt`
- [Content details](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/library/DetailScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/library/DetailScreen.kt`
- [Unified search](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/search/SearchScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/search/SearchScreen.kt`

### Playback

- [Player screen](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/player/PlayerScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/player/PlayerScreen.kt`
- [Playback tuners](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/live/LiveTuner.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/live/LiveTuner.kt`
- [Cast handoff](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/cast/CastController.kt): `app/src/main/java/tv/own/owntv/mobile/cast/CastController.kt`
- [Playback service](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/playback/PlaybackService.kt): `app/src/main/java/tv/own/owntv/mobile/playback/PlaybackService.kt`
- [Multiview](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/multiview/MultiviewScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/multiview/MultiviewScreen.kt`

### Profiles and utilities

- [Downloads](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/downloads/DownloadsScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/downloads/DownloadsScreen.kt`
- [Recordings](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/recordings/RecordingsScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/recordings/RecordingsScreen.kt`
- [Profiles](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/profiles/ProfilesViewModel.kt): `app/src/main/java/tv/own/owntv/mobile/ui/profiles/ProfilesViewModel.kt`
- [Settings and sync](https://github.com/ahxn00/owntv_mobile/blob/main/app/src/main/java/tv/own/owntv/mobile/ui/screens/settings/SettingsScreen.kt): `app/src/main/java/tv/own/owntv/mobile/ui/screens/settings/SettingsScreen.kt`

### Other components

- **Viewer**
- **OwnTV core**
- **Cast receiver**

## Connections

- Viewer → Android activity: opens app
- Android activity → App root: hosts UI
- App root → Mobile shell: starts shell
- Mobile shell → Navigation host: routes screens
- Navigation host → Source setup: opens setup
- Navigation host → Home rows: opens home
- Navigation host → Live channels: opens channels
- Navigation host → TV guide: opens guide
- Navigation host → Movies and series: opens library
- Navigation host → Content details: opens details
- Navigation host → Unified search: opens search
- Navigation host → Player screen: opens player
- Navigation host → Multiview: opens multiview
- Navigation host → Downloads: opens downloads
- Navigation host → Recordings: opens recordings
- Navigation host → Profiles: opens profiles
- Navigation host → Settings and sync: opens settings
- Source setup → OwnTV core: imports sources
- Home rows → OwnTV core: loads rows
- Live channels → OwnTV core: loads channels
- TV guide → OwnTV core: loads guide data
- Movies and series → OwnTV core: loads catalog
- Content details → OwnTV core: loads details
- Unified search → OwnTV core: searches catalog
- Live channels → Player screen: selects stream
- TV guide → Player screen: selects programme
- Content details → Player screen: starts playback
- Player screen → Playback tuners: controls playback
- Playback tuners → OwnTV core: uses playback engine
- Playback tuners → Cast handoff: offers stream
- Cast handoff → Cast receiver: loads media
- Cast handoff → Playback service: starts service
- Player screen → Multiview: opens tiles
- Downloads → OwnTV core: manages downloads
- Recordings → OwnTV core: manages recordings
- Profiles → OwnTV core: loads profiles
- Settings and sync → OwnTV core: configures sync and backup
