# kkkk79/jio architecture

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

- Interactive diagram: https://gitdiagram.com/kkkk79/jio
- Repository: https://github.com/kkkk79/jio

## Overview

This repository is a collection of IPTV and streaming tools rather than one unified application: it includes a Chaupal browser app, a Plusbox live-TV engine, a JioTV credential/cookie utility, a Zee5 browsing app, and playlist assets and refreshers. The visible user workflows are browsing/searching and playing content, or requesting live-channel stream URLs and playlists. Edges below reflect only relationships shown in excerpts or documented in the README; several substantial modules and the README are too sparse to establish their internal behavior.

Main entry points: [`main.py`](https://github.com/kkkk79/jio/blob/main/main.py) (JioTV fetcher), [`api.php`](https://github.com/kkkk79/jio/blob/main/api.php) (Stream API), [`Chaupal.php`](https://github.com/kkkk79/jio/blob/main/Chaupal.php) (Chaupal app), [`update_po.py`](https://github.com/kkkk79/jio/blob/main/update_po.py) (URL updater)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_chaupal["Chaupal streaming"]
  node_chaupal_app["Chaupal app<br/>[Chaupal.php]"]
  node_chaupal_session[("Session state<br/>[Chaupal.php]")]
end

subgraph group_plusbox["Plusbox live TV"]
  node_plusbox_api["Stream API<br/>[api.php]"]
  node_plusbox_upstream["Plusbox services"]
  node_channel_catalog["Channel catalog<br/>[api.php]"]
end

subgraph group_jiotv["JioTV access"]
  node_jiotv_tool["JioTV fetcher<br/>[main.py]"]
  node_cookie_store[("Cookie file<br/>[main.py]")]
  node_jio_services["JioTV services"]
  node_proxy_list["Proxy service"]
end

subgraph group_zee5["Zee5 browsing"]
  node_zee5_app["Zee5 browser<br/>[refresh.py]"]
  node_zee5_search["Zee5 search<br/>[refresh.py]"]
  node_kaltura_assets["Kaltura assets"]
  node_sony_stream["Sony stream module<br/>[Sonydai.php]"]
end

subgraph group_playlists["Playlist assets"]
  node_playlist_files["M3U playlists"]
  node_playlist_token_updater["Token updater<br/>[update_m3u.py]"]
  node_playlist_url_updater["URL updater<br/>[update_po.py]"]
  node_playlist_map["Channel URL map<br/>[po.json]"]
end

node_viewer(("Viewer"))

node_viewer -->|"uses"| node_chaupal_app
node_chaupal_app -->|"saves session"| node_chaupal_session
node_chaupal_app -->|"requests search"| node_chaupal_app
node_viewer -->|"requests streams"| node_plusbox_api
node_plusbox_api -->|"loads channels"| node_channel_catalog
node_plusbox_api -->|"fetches tokens"| node_plusbox_upstream
node_plusbox_api -->|"probes streams"| node_plusbox_upstream
node_viewer -->|"runs fetcher"| node_jiotv_tool
node_jiotv_tool -->|"requests playback"| node_jio_services
node_jiotv_tool -->|"fetches credentials"| node_jio_services
node_jiotv_tool -->|"fetches proxies"| node_proxy_list
node_jiotv_tool -->|"reads and writes"| node_cookie_store
node_viewer -->|"browses content"| node_zee5_app
node_zee5_app -->|"searches catalog"| node_zee5_search
node_zee5_search -->|"loads assets"| node_kaltura_assets
node_playlist_token_updater -->|"updates tokens"| node_playlist_files
node_playlist_url_updater -->|"reads URLs"| node_playlist_map
node_playlist_url_updater -->|"writes playlist"| node_playlist_files

click node_chaupal_app "https://github.com/kkkk79/jio/blob/main/Chaupal.php"
click node_chaupal_session "https://github.com/kkkk79/jio/blob/main/Chaupal.php"
click node_plusbox_api "https://github.com/kkkk79/jio/blob/main/api.php"
click node_channel_catalog "https://github.com/kkkk79/jio/blob/main/api.php"
click node_jiotv_tool "https://github.com/kkkk79/jio/blob/main/main.py"
click node_cookie_store "https://github.com/kkkk79/jio/blob/main/main.py"
click node_zee5_app "https://github.com/kkkk79/jio/blob/main/refresh.py"
click node_zee5_search "https://github.com/kkkk79/jio/blob/main/refresh.py"
click node_sony_stream "https://github.com/kkkk79/jio/blob/main/Sonydai.php"
click node_playlist_files "https://github.com/kkkk79/jio/blob/main/Zio_1122_Fallback_m3u8_with_hdnea.m3u"
click node_playlist_token_updater "https://github.com/kkkk79/jio/blob/main/update_m3u.py"
click node_playlist_url_updater "https://github.com/kkkk79/jio/blob/main/update_po.py"
click node_playlist_map "https://github.com/kkkk79/jio/blob/main/po.json"

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_chaupal_app,node_chaupal_session,node_viewer toneBlue
class node_plusbox_api,node_plusbox_upstream,node_channel_catalog toneAmber
class node_jiotv_tool,node_cookie_store,node_jio_services,node_proxy_list toneMint
class node_zee5_app,node_zee5_search,node_kaltura_assets,node_sony_stream toneRose
class node_playlist_files,node_playlist_token_updater,node_playlist_url_updater,node_playlist_map toneIndigo
```

## Components

### Chaupal streaming

- [Chaupal app](https://github.com/kkkk79/jio/blob/main/Chaupal.php): `Chaupal.php`
- [Session state](https://github.com/kkkk79/jio/blob/main/Chaupal.php): `Chaupal.php`

### Plusbox live TV

- [Stream API](https://github.com/kkkk79/jio/blob/main/api.php): `api.php`
- **Plusbox services**
- [Channel catalog](https://github.com/kkkk79/jio/blob/main/api.php): `api.php`

### JioTV access

- [JioTV fetcher](https://github.com/kkkk79/jio/blob/main/main.py): `main.py`
- [Cookie file](https://github.com/kkkk79/jio/blob/main/main.py): `main.py`
- **JioTV services**
- **Proxy service**

### Zee5 browsing

- [Zee5 browser](https://github.com/kkkk79/jio/blob/main/refresh.py): `refresh.py`
- [Zee5 search](https://github.com/kkkk79/jio/blob/main/refresh.py): `refresh.py`
- **Kaltura assets**
- [Sony stream module](https://github.com/kkkk79/jio/blob/main/Sonydai.php): `Sonydai.php`

### Playlist assets

- [M3U playlists](https://github.com/kkkk79/jio/blob/main/Zio_1122_Fallback_m3u8_with_hdnea.m3u): `Zio_1122_Fallback_m3u8_with_hdnea.m3u`
- [Token updater](https://github.com/kkkk79/jio/blob/main/update_m3u.py): `update_m3u.py`
- [URL updater](https://github.com/kkkk79/jio/blob/main/update_po.py): `update_po.py`
- [Channel URL map](https://github.com/kkkk79/jio/blob/main/po.json): `po.json`

### Other components

- **Viewer**

## Connections

- Viewer → Chaupal app: uses (evidence: `Chaupal.php`)
- Chaupal app → Session state: saves session (evidence: `Chaupal.php`)
- Chaupal app → Chaupal app: requests search (evidence: `Chaupal.php`)
- Viewer → Stream API: requests streams (evidence: `api.php`)
- Stream API → Channel catalog: loads channels (evidence: `api.php`)
- Stream API → Plusbox services: fetches tokens (evidence: `api.php`)
- Stream API → Plusbox services: probes streams (evidence: `api.php`)
- Viewer → JioTV fetcher: runs fetcher (evidence: `main.py`)
- JioTV fetcher → JioTV services: requests playback (evidence: `main.py`)
- JioTV fetcher → JioTV services: fetches credentials (evidence: `main.py`)
- JioTV fetcher → Proxy service: fetches proxies (evidence: `main.py`)
- JioTV fetcher → Cookie file: reads and writes (evidence: `main.py`)
- Viewer → Zee5 browser: browses content (evidence: `refresh.py`)
- Zee5 browser → Zee5 search: searches catalog (evidence: `refresh.py`)
- Zee5 search → Kaltura assets: loads assets (evidence: `refresh.py`)
- Token updater → M3U playlists: updates tokens (evidence: `update_m3u.py`)
- URL updater → Channel URL map: reads URLs (evidence: `update_po.py`)
- URL updater → M3U playlists: writes playlist (evidence: `update_po.py`)
