# kaashdev/tvapp architecture

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

- Interactive diagram: https://gitdiagram.com/kaashdev/tvapp
- Repository: https://github.com/kaashdev/tvapp

## Overview

TVapp is a remote-operated Tizen IPTV app. Viewers manage playlists, browse playlist-separated categories, and play live channels; they can also favorite channels and open a support screen. The main runtime logic is concentrated in `js/main.js`, while `index.html` provides the screens and `css/style.css` styles them. The README documents several capabilities whose implementation details are outside the excerpts, so those links are based on the README rather than sampled calls.

Main entry points: [`js/main.js`](https://github.com/kaashdev/tvapp/blob/main/js/main.js) (Playlist state), [`index.html`](https://github.com/kaashdev/tvapp/blob/main/index.html) (App screens), [`css/style.css`](https://github.com/kaashdev/tvapp/blob/main/css/style.css) (Focus and layout), [`playlists/index.country.m3u`](https://github.com/kaashdev/tvapp/blob/main/playlists/index.country.m3u) (Bundled catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["TV interface"]
  node_screens["App screens<br/>[index.html]"]
  node_styles["Focus and layout<br/>[style.css]"]
  node_navigation["Remote navigation<br/>[main.js]"]
  node_channel_grid["Channel grid<br/>[main.js]"]
end

subgraph group_catalog["Playlist and catalog"]
  node_settings["Playlist settings<br/>[main.js]"]
  node_playlist_state["Playlist state<br/>[main.js]"]
  node_playlist_store[("Browser storage")]
  node_bundled_catalog["Bundled catalog<br/>[index.country.m3u]"]
  node_playlist_fetch["Remote playlist fetch<br/>[main.js]"]
  node_iptv_org["IPTV-ORG catalog"]
  node_m3u_parser["M3U parser<br/>[main.js]"]
  node_category_browse["Category browsing<br/>[main.js]"]
  node_favorites["Favorites<br/>[main.js]"]
end

subgraph group_playback["Playback and support"]
  node_player["HLS playback<br/>[main.js]"]
  node_hlsjs["hls.js"]
  node_tv_media["TV media player"]
  node_donate["Support screen<br/>[index.html]"]
  node_stripe["Stripe payment link"]
end

node_viewer(("TV viewer"))

node_viewer -->|"uses"| node_screens
node_screens -->|"styled by"| node_styles
node_viewer -->|"controls"| node_navigation
node_navigation -->|"navigates"| node_screens
node_screens -->|"invokes"| node_settings
node_settings -->|"manages"| node_playlist_state
node_playlist_state -->|"persists"| node_playlist_store
node_playlist_state -->|"loads default"| node_bundled_catalog
node_settings -->|"requests playlists"| node_playlist_fetch
node_playlist_fetch -.->|"fetches live catalog"| node_iptv_org
node_playlist_fetch -->|"parses response"| node_m3u_parser
node_playlist_state -->|"builds categories"| node_category_browse
node_category_browse -->|"renders channels"| node_channel_grid
node_viewer -->|"favorites channels"| node_favorites
node_favorites -.->|"persists"| node_playlist_store
node_viewer -->|"selects channel"| node_player
node_player -->|"uses when supported"| node_hlsjs
node_player -->|"attaches stream"| node_tv_media
node_viewer -->|"opens"| node_donate
node_donate -->|"links to"| node_stripe

click node_screens "https://github.com/kaashdev/tvapp/blob/main/index.html"
click node_styles "https://github.com/kaashdev/tvapp/blob/main/css/style.css"
click node_navigation "https://github.com/kaashdev/tvapp/blob/main/js/main.js"
click node_settings "https://github.com/kaashdev/tvapp/blob/main/js/main.js"
click node_playlist_state "https://github.com/kaashdev/tvapp/blob/main/js/main.js"
click node_bundled_catalog "https://github.com/kaashdev/tvapp/blob/main/playlists/index.country.m3u"
click node_playlist_fetch "https://github.com/kaashdev/tvapp/blob/main/js/main.js"
click node_m3u_parser "https://github.com/kaashdev/tvapp/blob/main/js/main.js"
click node_category_browse "https://github.com/kaashdev/tvapp/blob/main/js/main.js"
click node_favorites "https://github.com/kaashdev/tvapp/blob/main/js/main.js"
click node_channel_grid "https://github.com/kaashdev/tvapp/blob/main/js/main.js"
click node_player "https://github.com/kaashdev/tvapp/blob/main/js/main.js"
click node_donate "https://github.com/kaashdev/tvapp/blob/main/index.html"

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_screens,node_styles,node_navigation,node_channel_grid,node_viewer toneBlue
class node_settings,node_playlist_state,node_playlist_store,node_bundled_catalog,node_playlist_fetch,node_iptv_org,node_m3u_parser,node_category_browse,node_favorites toneAmber
class node_player,node_hlsjs,node_tv_media,node_donate,node_stripe toneMint
```

## Components

### TV interface

- [App screens](https://github.com/kaashdev/tvapp/blob/main/index.html): `index.html`
- [Focus and layout](https://github.com/kaashdev/tvapp/blob/main/css/style.css): `css/style.css`
- [Remote navigation](https://github.com/kaashdev/tvapp/blob/main/js/main.js): `js/main.js`
- [Channel grid](https://github.com/kaashdev/tvapp/blob/main/js/main.js): `js/main.js`

### Playlist and catalog

- [Playlist settings](https://github.com/kaashdev/tvapp/blob/main/js/main.js): `js/main.js`
- [Playlist state](https://github.com/kaashdev/tvapp/blob/main/js/main.js): `js/main.js`
- **Browser storage**
- [Bundled catalog](https://github.com/kaashdev/tvapp/blob/main/playlists/index.country.m3u): `playlists/index.country.m3u`
- [Remote playlist fetch](https://github.com/kaashdev/tvapp/blob/main/js/main.js): `js/main.js`
- **IPTV-ORG catalog**
- [M3U parser](https://github.com/kaashdev/tvapp/blob/main/js/main.js): `js/main.js`
- [Category browsing](https://github.com/kaashdev/tvapp/blob/main/js/main.js): `js/main.js`
- [Favorites](https://github.com/kaashdev/tvapp/blob/main/js/main.js): `js/main.js`

### Playback and support

- [HLS playback](https://github.com/kaashdev/tvapp/blob/main/js/main.js): `js/main.js`
- **hls.js**
- **TV media player**
- [Support screen](https://github.com/kaashdev/tvapp/blob/main/index.html): `index.html`
- **Stripe payment link**

### Other components

- **TV viewer**

## Connections

- TV viewer → App screens: uses (evidence: `README.md`)
- App screens → Focus and layout: styled by (evidence: `README.md`)
- TV viewer → Remote navigation: controls (evidence: `README.md`)
- Remote navigation → App screens: navigates (evidence: `README.md`)
- App screens → Playlist settings: invokes (evidence: `README.md`)
- Playlist settings → Playlist state: manages (evidence: `README.md`)
- Playlist state → Browser storage: persists (evidence: `js/main.js`)
- Playlist state → Bundled catalog: loads default (evidence: `README.md`)
- Playlist settings → Remote playlist fetch: requests playlists (evidence: `js/main.js`)
- Remote playlist fetch → IPTV-ORG catalog: fetches live catalog (evidence: `README.md`)
- Remote playlist fetch → M3U parser: parses response (evidence: `js/main.js`)
- Playlist state → Category browsing: builds categories (evidence: `js/main.js`)
- Category browsing → Channel grid: renders channels (evidence: `js/main.js`)
- TV viewer → Favorites: favorites channels (evidence: `README.md`)
- Favorites → Browser storage: persists (evidence: `README.md`)
- TV viewer → HLS playback: selects channel (evidence: `README.md`)
- HLS playback → hls.js: uses when supported (evidence: `js/main.js`)
- HLS playback → TV media player: attaches stream (evidence: `js/main.js`)
- TV viewer → Support screen: opens (evidence: `README.md`)
- Support screen → Stripe payment link: links to (evidence: `README.md`)
