# erdinckaya97/multi-tv architecture

> Architecture diagram of the GitHub repository erdinckaya97/multi-tv, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/erdinckaya97/multi-tv
- Repository: https://github.com/erdinckaya97/multi-tv

## Overview

##### Project type and purpose
- From the file tree and README, this is a lightweight, front-end-only, static web application (“multi-tv”) that lets users display multiple YouTube channels/videos in one view.
- It is deployed (per the README link) via GitHub Pages or another static-site host.
- There is no custom backend; all logic lives in script.js, styling in style.css, and markup in index.html.

##### File structure
- index.html: the entry point, defines the container elements (video frames, input controls).
- script.js: contains all the client-side logic (YouTube API calls, dynamic DOM updates, multi-channel management).
- style.css: controls layout (grid/flex for multiple videos), responsive behavior.
- README.md: project description and live demo link.
- No server or build scripts → this is a pure SPA (single-page application) served as static assets.

##### Key interactions and architectural pattern
- Client-heavy SPA: the browser loads three assets (HTML/CSS/JS) from a static host (GitHub Pages or CDN).
- script.js calls the YouTube Data API (external REST endpoints) to fetch video/channel data.
- DOM manipulation: script.js updates index.html with video embeds or thumbnails.
- No database or custom backend; state is ephemeral in the page (JavaScript memory or localStorage if implemented).

3. Inside the Browser node, show three sub-components: index.html, style.css, script.js.
7. Component with its technology (e.g., “Vanilla JS”, “GitHub Pages”).

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser("User Browser"):::frontend
    subgraph "Browser (Runtime)"
        HTML["index.html"]:::frontend
        CSS["style.css"]:::frontend
        JS["script.js"]:::frontend
    end
    Static["Static Hosting / CDN"]:::hosting
    subgraph "Static Hosting / CDN"
        Doc["README.md"]:::frontend
    end
    External["YouTube Data API"]:::external

    Browser -->|GET /index.html, /style.css, /script.js| Static
    Static -->|serves assets| Browser
    JS -->|HTTPS GET /playlistItems, /videos| External
    External -->|JSON data| JS
    JS -->|"DOM API updates"| HTML

    click HTML "https://github.com/erdinckaya97/multi-tv/blob/main/index.html"
    click CSS "https://github.com/erdinckaya97/multi-tv/blob/main/style.css"
    click JS "https://github.com/erdinckaya97/multi-tv/blob/main/script.js"
    click Doc "https://github.com/erdinckaya97/multi-tv/blob/main/README.md"

    classDef frontend fill:#ADD8E6,stroke:#000;
    classDef hosting fill:#90EE90,stroke:#000;
    classDef external fill:#FFA500,stroke:#000;
```
