# protasiojr/proton-telas architecture

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

- Interactive diagram: https://gitdiagram.com/protasiojr/proton-telas
- Repository: https://github.com/protasiojr/proton-telas

## Overview

Próton Telas is a browser-based multi-screen video player. Users choose screen cards, paste video links, and apply them; the app renders supported platform embeds or direct video, with controls to refresh and hide playback. The main runtime is concentrated in `js/app.js`, with platform-specific URL handling and embed generation in four small modules. The README also documents configuration-independent platform support. The excerpts do not expose all event wiring or configuration persistence details, so those internal relationships are not expanded.

Main entry points: [`js/app.js`](https://github.com/protasiojr/proton-telas/blob/main/js/app.js) (Video rendering), [`js/youtube.js`](https://github.com/protasiojr/proton-telas/blob/main/js/youtube.js) (YouTube adapter), [`js/vimeo.js`](https://github.com/protasiojr/proton-telas/blob/main/js/vimeo.js) (Vimeo adapter), [`js/twitch.js`](https://github.com/protasiojr/proton-telas/blob/main/js/twitch.js) (Twitch adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Player application"]
  node_screens["Screen management<br/>[app.js]"]
  node_render["Video rendering<br/>[app.js]"]
  node_controls["Playback controls<br/>[app.js]"]
  node_config["Configuration import/export<br/>[app.js]"]
end

subgraph group_platforms["Platform adapters"]
  node_youtube["YouTube adapter<br/>[youtube.js]"]
  node_vimeo["Vimeo adapter<br/>[vimeo.js]"]
  node_twitch["Twitch adapter<br/>[twitch.js]"]
  node_kick["Kick adapter<br/>[kick.js]"]
end

subgraph group_media["Playback services"]
  node_direct["Direct video<br/>[app.js]"]
  node_youtube_service["YouTube embeds"]
  node_vimeo_service["Vimeo embeds"]
  node_twitch_service["Twitch embeds"]
  node_kick_service["Kick embeds"]
end

node_user(("Viewer"))

node_user -->|"chooses screens"| node_screens
node_user -->|"applies link"| node_render
node_screens -->|"renders screens"| node_render
node_render -->|"uses adapter"| node_youtube
node_render -->|"uses adapter"| node_vimeo
node_render -->|"uses adapter"| node_twitch
node_render -->|"uses adapter"| node_kick
node_render -->|"renders source"| node_direct
node_controls -->|"refreshes player"| node_render
node_controls -->|"hides video"| node_render
node_youtube -->|"builds embed"| node_youtube_service
node_vimeo -->|"builds embed"| node_vimeo_service
node_twitch -->|"builds embed"| node_twitch_service
node_kick -->|"builds embed"| node_kick_service

click node_screens "https://github.com/protasiojr/proton-telas/blob/main/js/app.js"
click node_render "https://github.com/protasiojr/proton-telas/blob/main/js/app.js"
click node_controls "https://github.com/protasiojr/proton-telas/blob/main/js/app.js"
click node_config "https://github.com/protasiojr/proton-telas/blob/main/js/app.js"
click node_youtube "https://github.com/protasiojr/proton-telas/blob/main/js/youtube.js"
click node_vimeo "https://github.com/protasiojr/proton-telas/blob/main/js/vimeo.js"
click node_twitch "https://github.com/protasiojr/proton-telas/blob/main/js/twitch.js"
click node_kick "https://github.com/protasiojr/proton-telas/blob/main/js/kick.js"
click node_direct "https://github.com/protasiojr/proton-telas/blob/main/js/app.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_screens,node_render,node_controls,node_config,node_user toneBlue
class node_youtube,node_vimeo,node_twitch,node_kick toneAmber
class node_direct,node_youtube_service,node_vimeo_service,node_twitch_service,node_kick_service toneMint
```

## Components

### Player application

- [Screen management](https://github.com/protasiojr/proton-telas/blob/main/js/app.js): `js/app.js`
- [Video rendering](https://github.com/protasiojr/proton-telas/blob/main/js/app.js): `js/app.js`
- [Playback controls](https://github.com/protasiojr/proton-telas/blob/main/js/app.js): `js/app.js`
- [Configuration import/export](https://github.com/protasiojr/proton-telas/blob/main/js/app.js): `js/app.js`

### Platform adapters

- [YouTube adapter](https://github.com/protasiojr/proton-telas/blob/main/js/youtube.js): `js/youtube.js`
- [Vimeo adapter](https://github.com/protasiojr/proton-telas/blob/main/js/vimeo.js): `js/vimeo.js`
- [Twitch adapter](https://github.com/protasiojr/proton-telas/blob/main/js/twitch.js): `js/twitch.js`
- [Kick adapter](https://github.com/protasiojr/proton-telas/blob/main/js/kick.js): `js/kick.js`

### Playback services

- [Direct video](https://github.com/protasiojr/proton-telas/blob/main/js/app.js): `js/app.js`
- **YouTube embeds**
- **Vimeo embeds**
- **Twitch embeds**
- **Kick embeds**

### Other components

- **Viewer**

## Connections

- Viewer → Screen management: chooses screens (evidence: `README.md`)
- Viewer → Video rendering: applies link (evidence: `README.md`)
- Screen management → Video rendering: renders screens (evidence: `js/app.js`)
- Video rendering → YouTube adapter: uses adapter (evidence: `README.md`)
- Video rendering → Vimeo adapter: uses adapter (evidence: `README.md`)
- Video rendering → Twitch adapter: uses adapter (evidence: `js/app.js`)
- Video rendering → Kick adapter: uses adapter (evidence: `js/app.js`)
- Video rendering → Direct video: renders source (evidence: `js/app.js`)
- Playback controls → Video rendering: refreshes player (evidence: `README.md`)
- Playback controls → Video rendering: hides video (evidence: `README.md`)
- YouTube adapter → YouTube embeds: builds embed (evidence: `js/youtube.js`)
- Vimeo adapter → Vimeo embeds: builds embed (evidence: `js/vimeo.js`)
- Twitch adapter → Twitch embeds: builds embed (evidence: `js/twitch.js`)
- Kick adapter → Kick embeds: builds embed (evidence: `js/kick.js`)
