# towerstreet/iptv-tvbox architecture

> Architecture diagram of the GitHub repository towerstreet/iptv-tvbox, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/towerstreet/iptv-tvbox
- Repository: https://github.com/towerstreet/iptv-tvbox

## Overview

##### Main Components
- GitHub Repository – The central artifact holding all project files such as IPTV.m3u, ITV.m3u, README, and licensing.
- CI/CD Pipeline – Represented by the .github/workflows/IPTV.yml. This component is responsible for continuous integration (e.g., validating or updating the playlists) or any automated tasks related to the repo.
- Playlist Distribution – Essentially the public files (the .m3u playlists) that serve as the distribution mechanism for IPTV links.
- External Clients – The various IPTV player applications (TVBOX, M3UAndroid, ZyPlayer, Kodi, etc.) and possibly other sources/integrators that consume the playlists.

##### Relationships and Data Flow
- The GitHub Repository is the source of truth for all the playlist data.
- The CI/CD Pipeline (via GitHub Actions) automates checks or updates (if any) and ensures the integrity/availability of the IPTTk playlists.
- The distribution happens when external applications or users consume the playlists directly via provided URLs.
- External clients fetch the m3u files from the repository (or a served endpoint if the repo is mirrored as a website).

##### Architectural Patterns and Key Design Principles
- Simple File-Based Content Distribution – The project is more of a static repository with lightweight automation rather than a dynamic website.
- Use of GitHub Actions for CI/CD indicates a modern development approach that enforces code quality or workflow management even in a relatively static project.

- GitHub Repository: Includes all project files (playlist files, README, LICENSE, configuration files).
- CI/CD Pipeline: Displays the workflow (IPTV.yml) for automated tasks.
- Distribution Mechanism: Represents the publicly accessible m3u files.
- External IPTV Clients: Lists and visually indicates the consumption by TVBOX, M3UAndroid, ZyPlayer, Kodi, etc.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Repository Layer
    subgraph "Repository Layer"
        GR["GitHub Repository (IPTV-TVBOX)"]:::infrastructure
        subgraph "Playlist Distribution"
            IPTV["IPTV.m3u"]:::static
            ITV["ITV.m3u"]:::static
        end
    end

    %% CI/CD Layer
    subgraph "CI/CD Layer"
        CICD["CI/CD Pipeline (GitHub Actions - IPTV.yml)"]:::automation
    end

    %% External Devices
    subgraph "External IPTV Clients"
        TVBOX["TVBOX"]:::client
        M3UAndroid["M3UAndroid"]:::client
        ZyPlayer["ZyPlayer"]:::client
        Kodi["Kodi"]:::client
    end

    %% Relationships
    GR -->|"triggers"| CICD
    GR -->|"contains"| IPTV
    GR -->|"contains"| ITV

    IPTV -->|"consumed_by"| TVBOX
    IPTV -->|"consumed_by"| M3UAndroid
    IPTV -->|"consumed_by"| ZyPlayer
    IPTV -->|"consumed_by"| Kodi

    ITV -->|"consumed_by"| TVBOX
    ITV -->|"consumed_by"| M3UAndroid
    ITV -->|"consumed_by"| ZyPlayer
    ITV -->|"consumed_by"| Kodi

    %% Click Events
    click GR "https://github.com/towerstreet/iptv-tvbox/blob/main/."
    click CICD "https://github.com/towerstreet/iptv-tvbox/blob/main/.github/workflows/IPTV.yml"
    click IPTV "https://github.com/towerstreet/iptv-tvbox/blob/main/IPTV.m3u"
    click ITV "https://github.com/towerstreet/iptv-tvbox/blob/main/ITV.m3u"

    %% Styles
    classDef infrastructure fill:#ffcccc,stroke:#cc0000,stroke-width:2px;
    classDef automation fill:#ccffcc,stroke:#009900,stroke-width:2px;
    classDef static fill:#cce5ff,stroke:#0066cc,stroke-width:2px;
    classDef client fill:#ffffcc,stroke:#999900,stroke-width:2px;
```
