# pulkitpareek18/netflix architecture

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

- Interactive diagram: https://gitdiagram.com/pulkitpareek18/netflix
- Repository: https://github.com/pulkitpareek18/netflix

## Overview

Netflix Ke Pitaji is a static, single-page streaming-style catalog and player. A user searches or opens a shared URL; client-side logic resolves titles, presents results, and can select a movie or a TV episode for playback. The README also advertises URL sharing, while the sampled script shows URL-driven restoration, TMDB lookups, and iframe playback. A browser service worker caches the root page for offline/PWA behavior. The script excerpts omit parts of search and player configuration, so only directly visible or README-documented relationships are shown.

Main entry points: [`index.html`](https://github.com/pulkitpareek18/netflix/blob/main/index.html) (Single-page interface), [`script.js`](https://github.com/pulkitpareek18/netflix/blob/main/script.js) (URL sharing and restoration), [`sw.js`](https://github.com/pulkitpareek18/netflix/blob/main/sw.js) (Cache request handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["Single-page interface<br/>[index.html]"]
  node_jquery["jQuery utilities<br/>[jquery.js]"]
  node_urlstate["URL sharing and restoration<br/>[script.js]"]
end

subgraph group_catalog["Discovery and metadata"]
  node_search["Search and results<br/>[script.js]"]
  node_imdb["IMDb title lookup<br/>[script.js]"]
  node_tmdb["TMDB metadata API"]
end

subgraph group_playback["Playback"]
  node_episode["TV season and episode selection<br/>[script.js]"]
  node_player["Embedded video player<br/>[script.js]"]
end

subgraph group_offline["Offline support"]
  node_serviceworker["Cache request handler<br/>[sw.js]"]
  node_cache[("Browser Cache API")]
end

node_viewer(("Viewer"))
node_stream["Streaming embed provider"]

node_viewer -->|"uses"| node_app
node_app -->|"searches"| node_search
node_app -->|"shares URLs"| node_urlstate
node_urlstate -->|"restores search"| node_search
node_search -->|"looks up title"| node_imdb
node_urlstate -->|"resolves title"| node_imdb
node_episode -->|"resolves show"| node_tmdb
node_player -->|"loads episodes"| node_tmdb
node_episode -->|"selects episode"| node_player
node_player -.->|"embeds playback"| node_stream
node_serviceworker -->|"reads and writes"| node_cache

click node_app "https://github.com/pulkitpareek18/netflix/blob/main/index.html"
click node_jquery "https://github.com/pulkitpareek18/netflix/blob/main/jquery.js"
click node_urlstate "https://github.com/pulkitpareek18/netflix/blob/main/script.js"
click node_search "https://github.com/pulkitpareek18/netflix/blob/main/script.js"
click node_imdb "https://github.com/pulkitpareek18/netflix/blob/main/script.js"
click node_episode "https://github.com/pulkitpareek18/netflix/blob/main/script.js"
click node_player "https://github.com/pulkitpareek18/netflix/blob/main/script.js"
click node_serviceworker "https://github.com/pulkitpareek18/netflix/blob/main/sw.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_app,node_jquery,node_urlstate,node_viewer toneBlue
class node_search,node_imdb,node_tmdb toneAmber
class node_episode,node_player toneMint
class node_serviceworker,node_cache toneRose
class node_stream toneIndigo
```

## Components

### App experience

- [Single-page interface](https://github.com/pulkitpareek18/netflix/blob/main/index.html): `index.html`
- [jQuery utilities](https://github.com/pulkitpareek18/netflix/blob/main/jquery.js): `jquery.js`
- [URL sharing and restoration](https://github.com/pulkitpareek18/netflix/blob/main/script.js): `script.js`

### Discovery and metadata

- [Search and results](https://github.com/pulkitpareek18/netflix/blob/main/script.js): `script.js`
- [IMDb title lookup](https://github.com/pulkitpareek18/netflix/blob/main/script.js): `script.js`
- **TMDB metadata API**

### Playback

- [TV season and episode selection](https://github.com/pulkitpareek18/netflix/blob/main/script.js): `script.js`
- [Embedded video player](https://github.com/pulkitpareek18/netflix/blob/main/script.js): `script.js`

### Offline support

- [Cache request handler](https://github.com/pulkitpareek18/netflix/blob/main/sw.js): `sw.js`
- **Browser Cache API**

### Other components

- **Viewer**
- **Streaming embed provider**

## Connections

- Viewer → Single-page interface: uses (evidence: `README.md`)
- Single-page interface → Search and results: searches (evidence: `script.js`)
- Single-page interface → URL sharing and restoration: shares URLs (evidence: `README.md`)
- URL sharing and restoration → Search and results: restores search (evidence: `script.js`)
- Search and results → IMDb title lookup: looks up title (evidence: `script.js`)
- URL sharing and restoration → IMDb title lookup: resolves title (evidence: `script.js`)
- TV season and episode selection → TMDB metadata API: resolves show (evidence: `script.js`)
- Embedded video player → TMDB metadata API: loads episodes (evidence: `script.js`)
- TV season and episode selection → Embedded video player: selects episode (evidence: `script.js`)
- Embedded video player → Streaming embed provider: embeds playback
- Cache request handler → Browser Cache API: reads and writes (evidence: `sw.js`)
