# nrn-world/doggy-player architecture

> Architecture diagram of the GitHub repository nrn-world/doggy-player, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nrn-world/doggy-player
- Repository: https://github.com/nrn-world/doggy-player

## Overview

Doggy Player is an Electron desktop video player. The main workflow is selecting media, resolving local playback through Electron when needed, and controlling playback in the React interface. The README also documents playlist management, IPTV, subtitles, and picture/audio controls; the sampled frontend is a single large App module, so those capabilities share its path. Source excerpts support the media and IPTV IPC links, but not detailed wiring for every documented feature.

Main entry points: [`src/App.tsx`](https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx) (Player Interface), [`electron/main.js`](https://github.com/nrn-world/doggy-player/blob/main/electron/main.js) (Media IPC), [`electron/telemetry.js`](https://github.com/nrn-world/doggy-player/blob/main/electron/telemetry.js) (Usage Telemetry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_playback["Playback and Controls"]
  node_app["Player Interface<br/>[App.tsx]"]
  node_controls["Playback Controls<br/>[App.tsx]"]
  node_viewing["Video Display<br/>[App.tsx]"]
  node_picture["Picture Controls<br/>[App.tsx]"]
  node_audio["Audio and Subtitles<br/>[App.tsx]"]
  node_playlist["Playlist Manager<br/>[App.tsx]"]
end

subgraph group_media["Media Handling"]
  node_mediafiles["Local Media"]
  node_mediaipc["Media IPC<br/>[main.js]"]
  node_stream["Stream Server<br/>[main.js]"]
  node_ffmpeg["FFmpeg Processing<br/>[main.js]"]
  node_seekcache[("Seek Optimization<br/>[main.js]")]
end

subgraph group_iptv["IPTV"]
  node_iptvui["IPTV Browser<br/>[App.tsx]"]
  node_iptvapi["IPTV Fetch Handler<br/>[main.js]"]
end

subgraph group_desktop["Desktop Runtime"]
  node_electron["Electron Window<br/>[main.js]"]
  node_updater["App Updater<br/>[main.js]"]
  node_telemetry["Usage Telemetry<br/>[telemetry.js]"]
end

node_user(("Viewer"))
node_iptvservice["IPTV Provider"]

node_user -->|"uses"| node_app
node_user -->|"opens"| node_mediafiles
node_app -->|"operates"| node_controls
node_app -->|"renders"| node_viewing
node_app -->|"controls"| node_picture
node_app -->|"configures"| node_audio
node_app -->|"manages"| node_playlist
node_app -->|"invokes IPC"| node_mediaipc
node_mediaipc -->|"serves media"| node_stream
node_stream -->|"transcodes"| node_ffmpeg
node_mediaipc -->|"optimizes seeking"| node_ffmpeg
node_mediaipc -->|"reads/writes"| node_seekcache
node_app -->|"browses"| node_iptvui
node_iptvui -->|"invokes IPC"| node_iptvapi
node_iptvapi -->|"fetches data"| node_iptvservice
node_electron -->|"hosts"| node_app
node_electron -->|"initializes"| node_updater
node_electron -->|"initializes"| node_telemetry

click node_app "https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx"
click node_controls "https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx"
click node_viewing "https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx"
click node_picture "https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx"
click node_audio "https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx"
click node_playlist "https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx"
click node_mediaipc "https://github.com/nrn-world/doggy-player/blob/main/electron/main.js"
click node_stream "https://github.com/nrn-world/doggy-player/blob/main/electron/main.js"
click node_ffmpeg "https://github.com/nrn-world/doggy-player/blob/main/electron/main.js"
click node_seekcache "https://github.com/nrn-world/doggy-player/blob/main/electron/main.js"
click node_iptvui "https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx"
click node_iptvapi "https://github.com/nrn-world/doggy-player/blob/main/electron/main.js"
click node_electron "https://github.com/nrn-world/doggy-player/blob/main/electron/main.js"
click node_updater "https://github.com/nrn-world/doggy-player/blob/main/electron/main.js"
click node_telemetry "https://github.com/nrn-world/doggy-player/blob/main/electron/telemetry.js"

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,node_controls,node_viewing,node_picture,node_audio,node_playlist,node_user toneBlue
class node_mediafiles,node_mediaipc,node_stream,node_ffmpeg,node_seekcache toneAmber
class node_iptvui,node_iptvapi toneMint
class node_electron,node_updater,node_telemetry toneRose
class node_iptvservice toneIndigo
```

## Components

### Playback and Controls

- [Player Interface](https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx): `src/App.tsx`
- [Playback Controls](https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx): `src/App.tsx`
- [Video Display](https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx): `src/App.tsx`
- [Picture Controls](https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx): `src/App.tsx`
- [Audio and Subtitles](https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx): `src/App.tsx`
- [Playlist Manager](https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx): `src/App.tsx`

### Media Handling

- **Local Media**
- [Media IPC](https://github.com/nrn-world/doggy-player/blob/main/electron/main.js): `electron/main.js`
- [Stream Server](https://github.com/nrn-world/doggy-player/blob/main/electron/main.js): `electron/main.js`
- [FFmpeg Processing](https://github.com/nrn-world/doggy-player/blob/main/electron/main.js): `electron/main.js`
- [Seek Optimization](https://github.com/nrn-world/doggy-player/blob/main/electron/main.js): `electron/main.js`

### IPTV

- [IPTV Browser](https://github.com/nrn-world/doggy-player/blob/main/src/App.tsx): `src/App.tsx`
- [IPTV Fetch Handler](https://github.com/nrn-world/doggy-player/blob/main/electron/main.js): `electron/main.js`

### Desktop Runtime

- [Electron Window](https://github.com/nrn-world/doggy-player/blob/main/electron/main.js): `electron/main.js`
- [App Updater](https://github.com/nrn-world/doggy-player/blob/main/electron/main.js): `electron/main.js`
- [Usage Telemetry](https://github.com/nrn-world/doggy-player/blob/main/electron/telemetry.js): `electron/telemetry.js`

### Other components

- **Viewer**
- **IPTV Provider**

## Connections

- Viewer → Player Interface: uses
- Viewer → Local Media: opens
- Player Interface → Playback Controls: operates
- Player Interface → Video Display: renders
- Player Interface → Picture Controls: controls
- Player Interface → Audio and Subtitles: configures
- Player Interface → Playlist Manager: manages
- Player Interface → Media IPC: invokes IPC
- Media IPC → Stream Server: serves media
- Stream Server → FFmpeg Processing: transcodes
- Media IPC → FFmpeg Processing: optimizes seeking
- Media IPC → Seek Optimization: reads/writes
- Player Interface → IPTV Browser: browses
- IPTV Browser → IPTV Fetch Handler: invokes IPC
- IPTV Fetch Handler → IPTV Provider: fetches data
- Electron Window → Player Interface: hosts
- Electron Window → App Updater: initializes
- Electron Window → Usage Telemetry: initializes
