# syedss23/sm-tv- architecture

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

- Interactive diagram: https://gitdiagram.com/syedss23/sm-tv-
- Repository: https://github.com/syedss23/sm-tv-

## Overview

SM-TV Urdu is a browser-based catalog and video-access site for series, episodes, and movies. The main viewer journey is to browse or search the catalog, open a series and select an episode, pass through the optional two-page ad-and-timer gate, then view the episode page with player and download options. Separate catalog data supports schedules and recommendations; premium pages and new-episode push notifications are additional product branches. The excerpts show the catalog, series, episode, gate, and notification calls; unsampled page relationships are omitted where their wiring is not shown.

Main entry points: [`index.js`](https://github.com/syedss23/sm-tv-/blob/main/index.js) (Home catalog), [`episode.js`](https://github.com/syedss23/sm-tv-/blob/main/episode.js) (Episode player), [`series.js`](https://github.com/syedss23/sm-tv-/blob/main/series.js) (Series seasons), [`js/episodeNotifier.js`](https://github.com/syedss23/sm-tv-/blob/main/js/episodeNotifier.js) (Episode notifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Catalog and discovery"]
  node_home["Home catalog<br/>[index.js]"]
  node_serieslist["Series catalog<br/>[series.html]"]
  node_movieslist["Movie catalog<br/>[movies.html]"]
end

subgraph group_watch["Viewing and access"]
  node_seriesview["Series seasons<br/>[series.js]"]
  node_episodeview["Episode player<br/>[episode.js]"]
  node_gateone["Link gate one<br/>[getlink.js]"]
  node_gatetwo["Link gate two<br/>[getlink2.js]"]
  node_config["Feature config<br/>[config.json]"]
  node_premium["Premium pages<br/>[premium.html]"]
end

subgraph group_content["Content data"]
  node_seriesdata["Series records<br/>[series.json]"]
  node_moviedata["Movie records<br/>[movies.json]"]
  node_episodeindex["Episode index<br/>[index.json]"]
  node_episodedata["Episode records"]
  node_schedule["Release schedule<br/>[shedule.json]"]
  node_recommendations["Recommendations<br/>[recommended.json]"]
end

subgraph group_engagement["Notifications and integrations"]
  node_notifier["Episode notifier<br/>[episodeNotifier.js]"]
  node_notifyapi["Notification endpoint<br/>[notify.js]"]
  node_onesignal{{"OneSignal"}}
end

node_visitor(("Viewer"))

node_visitor -->|"opens"| node_home
node_home -->|"fetches"| node_seriesdata
node_home -->|"fetches"| node_moviedata
node_home -->|"fetches"| node_episodeindex
node_home -->|"fetches"| node_schedule
node_home -->|"fetches"| node_recommendations
node_home -.->|"routes to"| node_seriesview
node_serieslist -.->|"routes to"| node_seriesview
node_movieslist -.->|"routes to"| node_episodeview
node_seriesview -->|"loads"| node_config
node_seriesview -->|"loads"| node_episodedata
node_seriesview -->|"opens"| node_episodeview
node_episodeview -->|"loads"| node_seriesdata
node_episodeview -->|"loads"| node_moviedata
node_episodeview -->|"loads"| node_episodedata
node_gateone -->|"continues to"| node_gatetwo
node_gatetwo -->|"unlocks"| node_episodeview
node_episodeview -->|"links to"| node_premium
node_notifier -->|"reads"| node_episodeindex
node_notifier -->|"checks"| node_episodedata
node_notifier -->|"posts to"| node_notifyapi
node_notifyapi -->|"sends to"| node_onesignal

click node_home "https://github.com/syedss23/sm-tv-/blob/main/index.js"
click node_serieslist "https://github.com/syedss23/sm-tv-/blob/main/series.html"
click node_movieslist "https://github.com/syedss23/sm-tv-/blob/main/movies.html"
click node_seriesview "https://github.com/syedss23/sm-tv-/blob/main/series.js"
click node_episodeview "https://github.com/syedss23/sm-tv-/blob/main/episode.js"
click node_gateone "https://github.com/syedss23/sm-tv-/blob/main/getlink.js"
click node_gatetwo "https://github.com/syedss23/sm-tv-/blob/main/getlink2.js"
click node_config "https://github.com/syedss23/sm-tv-/blob/main/config.json"
click node_seriesdata "https://github.com/syedss23/sm-tv-/blob/main/series.json"
click node_moviedata "https://github.com/syedss23/sm-tv-/blob/main/movies.json"
click node_episodeindex "https://github.com/syedss23/sm-tv-/blob/main/episode-data/index.json"
click node_episodedata "https://github.com/syedss23/sm-tv-/tree/main/episode-data"
click node_schedule "https://github.com/syedss23/sm-tv-/blob/main/shedule.json"
click node_recommendations "https://github.com/syedss23/sm-tv-/blob/main/recommended.json"
click node_premium "https://github.com/syedss23/sm-tv-/blob/main/premium.html"
click node_notifier "https://github.com/syedss23/sm-tv-/blob/main/js/episodeNotifier.js"
click node_notifyapi "https://github.com/syedss23/sm-tv-/blob/main/api/notify.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_home,node_serieslist,node_movieslist,node_visitor toneBlue
class node_seriesview,node_episodeview,node_gateone,node_gatetwo,node_config,node_premium toneAmber
class node_seriesdata,node_moviedata,node_episodeindex,node_episodedata,node_schedule,node_recommendations toneMint
class node_notifier,node_notifyapi,node_onesignal toneRose
```

## Components

### Catalog and discovery

- [Home catalog](https://github.com/syedss23/sm-tv-/blob/main/index.js): `index.js`
- [Series catalog](https://github.com/syedss23/sm-tv-/blob/main/series.html): `series.html`
- [Movie catalog](https://github.com/syedss23/sm-tv-/blob/main/movies.html): `movies.html`

### Viewing and access

- [Series seasons](https://github.com/syedss23/sm-tv-/blob/main/series.js): `series.js`
- [Episode player](https://github.com/syedss23/sm-tv-/blob/main/episode.js): `episode.js`
- [Link gate one](https://github.com/syedss23/sm-tv-/blob/main/getlink.js): `getlink.js`
- [Link gate two](https://github.com/syedss23/sm-tv-/blob/main/getlink2.js): `getlink2.js`
- [Feature config](https://github.com/syedss23/sm-tv-/blob/main/config.json): `config.json`
- [Premium pages](https://github.com/syedss23/sm-tv-/blob/main/premium.html): `premium.html`

### Content data

- [Series records](https://github.com/syedss23/sm-tv-/blob/main/series.json): `series.json`
- [Movie records](https://github.com/syedss23/sm-tv-/blob/main/movies.json): `movies.json`
- [Episode index](https://github.com/syedss23/sm-tv-/blob/main/episode-data/index.json): `episode-data/index.json`
- [Episode records](https://github.com/syedss23/sm-tv-/tree/main/episode-data): `episode-data`
- [Release schedule](https://github.com/syedss23/sm-tv-/blob/main/shedule.json): `shedule.json`
- [Recommendations](https://github.com/syedss23/sm-tv-/blob/main/recommended.json): `recommended.json`

### Notifications and integrations

- [Episode notifier](https://github.com/syedss23/sm-tv-/blob/main/js/episodeNotifier.js): `js/episodeNotifier.js`
- [Notification endpoint](https://github.com/syedss23/sm-tv-/blob/main/api/notify.js): `api/notify.js`
- **OneSignal**

### Other components

- **Viewer**

## Connections

- Viewer → Home catalog: opens (evidence: `index.js`)
- Home catalog → Series records: fetches (evidence: `index.js`)
- Home catalog → Movie records: fetches (evidence: `index.js`)
- Home catalog → Episode index: fetches (evidence: `index.js`)
- Home catalog → Release schedule: fetches (evidence: `index.js`)
- Home catalog → Recommendations: fetches (evidence: `index.js`)
- Home catalog → Series seasons: routes to
- Series catalog → Series seasons: routes to
- Movie catalog → Episode player: routes to
- Series seasons → Feature config: loads (evidence: `series.js`)
- Series seasons → Episode records: loads (evidence: `series.js`)
- Series seasons → Episode player: opens (evidence: `series.js`)
- Episode player → Series records: loads (evidence: `episode.js`)
- Episode player → Movie records: loads (evidence: `episode.js`)
- Episode player → Episode records: loads (evidence: `episode.js`)
- Link gate one → Link gate two: continues to (evidence: `getlink.js`)
- Link gate two → Episode player: unlocks (evidence: `getlink2.js`)
- Episode player → Premium pages: links to (evidence: `episode.js`)
- Episode notifier → Episode index: reads (evidence: `js/episodeNotifier.js`)
- Episode notifier → Episode records: checks (evidence: `js/episodeNotifier.js`)
- Episode notifier → Notification endpoint: posts to (evidence: `js/episodeNotifier.js`)
- Notification endpoint → OneSignal: sends to (evidence: `api/notify.js`)
