# githubbozodude/movie-scraper architecture

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

- Interactive diagram: https://gitdiagram.com/githubbozodude/movie-scraper
- Repository: https://github.com/githubbozodude/movie-scraper

## Overview

Zenith Movies is a URL-driven, ad-free movie streaming frontend. A viewer opens a page with a movie ID; the frontend requests a stream URL, then plays the returned HLS stream in the browser. The API resolves stream URLs through a Vidlink-backed token flow and separately proxies HLS playlists and media, rewriting playlist entries back through the proxy. The README documents browser playback and Vercel deployment, but frontend source details beyond the page path are not shown in the excerpts.

Main entry points: [`index.html`](https://github.com/githubbozodude/movie-scraper/blob/main/index.html) (Streaming page), [`api/index.js`](https://github.com/githubbozodude/movie-scraper/blob/main/api/index.js) (API handler), [`api/script.js`](https://github.com/githubbozodude/movie-scraper/blob/main/api/script.js) (Go JS runtime), [`api/fu.wasm`](https://github.com/githubbozodude/movie-scraper/blob/main/api/fu.wasm) (Token WASM)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Playback frontend"]
  node_page["Streaming page<br/>[index.html]"]
end

subgraph group_api["Stream API"]
  node_handler["API handler<br/>[index.js]"]
  node_resolver["Stream resolver<br/>[index.js]"]
  node_proxy["HLS proxy<br/>[index.js]"]
end

subgraph group_runtime["Token runtime"]
  node_wasmboot["WASM bootstrap<br/>[index.js]"]
  node_gojs["Go JS runtime<br/>[script.js]"]
  node_wasm["Token WASM<br/>[fu.wasm]"]
end

node_viewer(("Viewer"))
node_vidlink["Vidlink service"]
node_hls["HLS origin"]

node_viewer -->|"opens"| node_page
node_page -->|"requests stream"| node_handler
node_handler -->|"resolves ID"| node_resolver
node_resolver -->|"boots runtime"| node_wasmboot
node_wasmboot -->|"evaluates"| node_gojs
node_wasmboot -->|"instantiates"| node_wasm
node_resolver -->|"fetches playlist"| node_vidlink
node_handler -->|"routes proxy requests"| node_proxy
node_proxy -->|"fetches upstream"| node_hls
node_proxy -.->|"serves rewritten HLS"| node_page
node_page -->|"plays HLS"| node_viewer

click node_page "https://github.com/githubbozodude/movie-scraper/blob/main/index.html"
click node_handler "https://github.com/githubbozodude/movie-scraper/blob/main/api/index.js"
click node_resolver "https://github.com/githubbozodude/movie-scraper/blob/main/api/index.js"
click node_proxy "https://github.com/githubbozodude/movie-scraper/blob/main/api/index.js"
click node_wasmboot "https://github.com/githubbozodude/movie-scraper/blob/main/api/index.js"
click node_gojs "https://github.com/githubbozodude/movie-scraper/blob/main/api/script.js"
click node_wasm "https://github.com/githubbozodude/movie-scraper/blob/main/api/fu.wasm"

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_page,node_viewer toneBlue
class node_handler,node_resolver,node_proxy toneAmber
class node_wasmboot,node_gojs,node_wasm toneMint
class node_vidlink,node_hls toneIndigo
```

## Components

### Playback frontend

- [Streaming page](https://github.com/githubbozodude/movie-scraper/blob/main/index.html): `index.html`

### Stream API

- [API handler](https://github.com/githubbozodude/movie-scraper/blob/main/api/index.js): `api/index.js`
- [Stream resolver](https://github.com/githubbozodude/movie-scraper/blob/main/api/index.js): `api/index.js`
- [HLS proxy](https://github.com/githubbozodude/movie-scraper/blob/main/api/index.js): `api/index.js`

### Token runtime

- [WASM bootstrap](https://github.com/githubbozodude/movie-scraper/blob/main/api/index.js): `api/index.js`
- [Go JS runtime](https://github.com/githubbozodude/movie-scraper/blob/main/api/script.js): `api/script.js`
- [Token WASM](https://github.com/githubbozodude/movie-scraper/blob/main/api/fu.wasm): `api/fu.wasm`

### Other components

- **Viewer**
- **Vidlink service**
- **HLS origin**

## Connections

- Viewer → Streaming page: opens (evidence: `README.md`)
- Streaming page → API handler: requests stream (evidence: `README.md`)
- API handler → Stream resolver: resolves ID (evidence: `api/index.js`)
- Stream resolver → WASM bootstrap: boots runtime (evidence: `api/index.js`)
- WASM bootstrap → Go JS runtime: evaluates (evidence: `api/index.js`)
- WASM bootstrap → Token WASM: instantiates (evidence: `api/index.js`)
- Stream resolver → Vidlink service: fetches playlist (evidence: `api/index.js`)
- API handler → HLS proxy: routes proxy requests (evidence: `api/index.js`)
- HLS proxy → HLS origin: fetches upstream (evidence: `api/index.js`)
- HLS proxy → Streaming page: serves rewritten HLS
- Streaming page → Viewer: plays HLS (evidence: `README.md`)
