# saidinyanguila/stream architecture

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

- Interactive diagram: https://gitdiagram.com/saidinyanguila/stream
- Repository: https://github.com/saidinyanguila/stream

## Overview

Stream is a client-side movie and TV discovery interface backed by The Movie Database (TMDB). Users browse popular titles, search movies or shows, select a title, and view its details; TV details also expose seasons and episodes. The app routes requests to page components, which fetch data through a small API service and render reusable navigation, sections, and cards. The README describes only a Vite starter, so product capabilities are inferred from the supplied source. Some component and page implementations were not excerpted; their connections are omitted where evidence is unavailable.

Main entry points: [`src/App.tsx`](https://github.com/saidinyanguila/stream/blob/main/src/App.tsx) (Route shell), [`src/pages/Index.tsx`](https://github.com/saidinyanguila/stream/blob/main/src/pages/Index.tsx) (Home page), [`src/pages/Search.tsx`](https://github.com/saidinyanguila/stream/blob/main/src/pages/Search.tsx) (Search page), [`src/pages/WatchTv.tsx`](https://github.com/saidinyanguila/stream/blob/main/src/pages/WatchTv.tsx) (TV details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Routing and pages"]
  node_app["Route shell<br/>[App.tsx]"]
  node_home["Home page<br/>[Index.tsx]"]
  node_category["Category page<br/>[Category.tsx]"]
  node_search["Search page<br/>[Search.tsx]"]
  node_notfound["Not found<br/>[NotFound.tsx]"]
end

subgraph group_discovery["Discovery interface"]
  node_nav["Navigation<br/>[Nav.tsx]"]
  node_banner["Featured banner<br/>[Banner.tsx]"]
  node_continue["Continue watching"]
  node_section["Title carousel<br/>[Section.tsx]"]
  node_moviecard["Movie card<br/>[MovieCard.tsx]"]
  node_tvcard["TV card<br/>[TvCard.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
end

subgraph group_title["Title details"]
  node_moviewatch["Movie details<br/>[Watch.tsx]"]
  node_tvwatch["TV details<br/>[WatchTv.tsx]"]
  node_episodes["Episode selector<br/>[Episodes.tsx]"]
end

subgraph group_data["Catalog data"]
  node_api["TMDB API client<br/>[API.ts]"]
  node_tmdb[("TMDB service")]
end

node_visitor(("Visitor"))

node_visitor -.->|"opens app"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_search
node_app -->|"routes to"| node_category
node_app -->|"routes to"| node_moviewatch
node_app -->|"routes to"| node_tvwatch
node_app -->|"fallback route"| node_notfound
node_home -->|"fetches popular"| node_api
node_category -->|"fetches popular"| node_api
node_search -->|"searches titles"| node_api
node_moviewatch -->|"loads movie"| node_api
node_tvwatch -->|"loads show"| node_api
node_api -->|"requests catalog"| node_tmdb
node_home -->|"renders"| node_nav
node_home -->|"renders"| node_banner
node_home -->|"renders"| node_continue
node_home -->|"renders"| node_section
node_home -->|"renders"| node_footer
node_category -->|"renders"| node_nav
node_category -->|"renders"| node_section
node_category -->|"renders"| node_footer
node_search -->|"renders"| node_nav
node_search -->|"renders results"| node_moviecard
node_search -->|"renders results"| node_tvcard
node_search -->|"renders"| node_footer
node_moviewatch -->|"renders"| node_nav
node_moviewatch -->|"renders"| node_section
node_moviewatch -->|"renders"| node_footer
node_tvwatch -->|"renders"| node_nav
node_tvwatch -->|"renders"| node_episodes
node_tvwatch -->|"renders"| node_section
node_tvwatch -->|"renders"| node_footer
node_section -->|"renders movies"| node_moviecard
node_section -->|"renders shows"| node_tvcard
node_nav -.->|"submits search"| node_search
node_moviecard -.->|"links to details"| node_moviewatch
node_tvcard -.->|"links to details"| node_tvwatch

click node_app "https://github.com/saidinyanguila/stream/blob/main/src/App.tsx"
click node_home "https://github.com/saidinyanguila/stream/blob/main/src/pages/Index.tsx"
click node_category "https://github.com/saidinyanguila/stream/blob/main/src/pages/Category.tsx"
click node_search "https://github.com/saidinyanguila/stream/blob/main/src/pages/Search.tsx"
click node_notfound "https://github.com/saidinyanguila/stream/blob/main/src/pages/NotFound.tsx"
click node_nav "https://github.com/saidinyanguila/stream/blob/main/src/components/Nav.tsx"
click node_banner "https://github.com/saidinyanguila/stream/blob/main/src/components/Banner.tsx"
click node_continue "https://github.com/saidinyanguila/stream/blob/main/src/components/ContinueWatching.tsx"
click node_section "https://github.com/saidinyanguila/stream/blob/main/src/components/Section.tsx"
click node_moviecard "https://github.com/saidinyanguila/stream/blob/main/src/components/MovieCard.tsx"
click node_tvcard "https://github.com/saidinyanguila/stream/blob/main/src/components/TvCard.tsx"
click node_footer "https://github.com/saidinyanguila/stream/blob/main/src/components/Footer.tsx"
click node_moviewatch "https://github.com/saidinyanguila/stream/blob/main/src/pages/Watch.tsx"
click node_tvwatch "https://github.com/saidinyanguila/stream/blob/main/src/pages/WatchTv.tsx"
click node_episodes "https://github.com/saidinyanguila/stream/blob/main/src/components/Episodes.tsx"
click node_api "https://github.com/saidinyanguila/stream/blob/main/src/services/API.ts"

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_home,node_category,node_search,node_notfound toneBlue
class node_nav,node_banner,node_continue,node_section,node_moviecard,node_tvcard,node_footer toneAmber
class node_moviewatch,node_tvwatch,node_episodes toneMint
class node_api,node_tmdb toneRose
class node_visitor toneIndigo
```

## Components

### Routing and pages

- [Route shell](https://github.com/saidinyanguila/stream/blob/main/src/App.tsx): `src/App.tsx`
- [Home page](https://github.com/saidinyanguila/stream/blob/main/src/pages/Index.tsx): `src/pages/Index.tsx`
- [Category page](https://github.com/saidinyanguila/stream/blob/main/src/pages/Category.tsx): `src/pages/Category.tsx`
- [Search page](https://github.com/saidinyanguila/stream/blob/main/src/pages/Search.tsx): `src/pages/Search.tsx`
- [Not found](https://github.com/saidinyanguila/stream/blob/main/src/pages/NotFound.tsx): `src/pages/NotFound.tsx`

### Discovery interface

- [Navigation](https://github.com/saidinyanguila/stream/blob/main/src/components/Nav.tsx): `src/components/Nav.tsx`
- [Featured banner](https://github.com/saidinyanguila/stream/blob/main/src/components/Banner.tsx): `src/components/Banner.tsx`
- [Continue watching](https://github.com/saidinyanguila/stream/blob/main/src/components/ContinueWatching.tsx): `src/components/ContinueWatching.tsx`
- [Title carousel](https://github.com/saidinyanguila/stream/blob/main/src/components/Section.tsx): `src/components/Section.tsx`
- [Movie card](https://github.com/saidinyanguila/stream/blob/main/src/components/MovieCard.tsx): `src/components/MovieCard.tsx`
- [TV card](https://github.com/saidinyanguila/stream/blob/main/src/components/TvCard.tsx): `src/components/TvCard.tsx`
- [Footer](https://github.com/saidinyanguila/stream/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Title details

- [Movie details](https://github.com/saidinyanguila/stream/blob/main/src/pages/Watch.tsx): `src/pages/Watch.tsx`
- [TV details](https://github.com/saidinyanguila/stream/blob/main/src/pages/WatchTv.tsx): `src/pages/WatchTv.tsx`
- [Episode selector](https://github.com/saidinyanguila/stream/blob/main/src/components/Episodes.tsx): `src/components/Episodes.tsx`

### Catalog data

- [TMDB API client](https://github.com/saidinyanguila/stream/blob/main/src/services/API.ts): `src/services/API.ts`
- **TMDB service**

### Other components

- **Visitor**

## Connections

- Visitor → Route shell: opens app
- Route shell → Home page: routes to (evidence: `src/App.tsx`)
- Route shell → Search page: routes to (evidence: `src/App.tsx`)
- Route shell → Category page: routes to (evidence: `src/App.tsx`)
- Route shell → Movie details: routes to (evidence: `src/App.tsx`)
- Route shell → TV details: routes to (evidence: `src/App.tsx`)
- Route shell → Not found: fallback route (evidence: `src/App.tsx`)
- Home page → TMDB API client: fetches popular (evidence: `src/pages/Index.tsx`)
- Category page → TMDB API client: fetches popular (evidence: `src/pages/Category.tsx`)
- Search page → TMDB API client: searches titles (evidence: `src/pages/Search.tsx`)
- Movie details → TMDB API client: loads movie (evidence: `src/pages/Watch.tsx`)
- TV details → TMDB API client: loads show (evidence: `src/pages/WatchTv.tsx`)
- TMDB API client → TMDB service: requests catalog (evidence: `src/services/API.ts`)
- Home page → Navigation: renders (evidence: `src/pages/Index.tsx`)
- Home page → Featured banner: renders (evidence: `src/pages/Index.tsx`)
- Home page → Continue watching: renders (evidence: `src/pages/Index.tsx`)
- Home page → Title carousel: renders (evidence: `src/pages/Index.tsx`)
- Home page → Footer: renders (evidence: `src/pages/Index.tsx`)
- Category page → Navigation: renders (evidence: `src/pages/Category.tsx`)
- Category page → Title carousel: renders (evidence: `src/pages/Category.tsx`)
- Category page → Footer: renders (evidence: `src/pages/Category.tsx`)
- Search page → Navigation: renders (evidence: `src/pages/Search.tsx`)
- Search page → Movie card: renders results (evidence: `src/pages/Search.tsx`)
- Search page → TV card: renders results (evidence: `src/pages/Search.tsx`)
- Search page → Footer: renders (evidence: `src/pages/Search.tsx`)
- Movie details → Navigation: renders (evidence: `src/pages/Watch.tsx`)
- Movie details → Title carousel: renders (evidence: `src/pages/Watch.tsx`)
- Movie details → Footer: renders (evidence: `src/pages/Watch.tsx`)
- TV details → Navigation: renders (evidence: `src/pages/WatchTv.tsx`)
- TV details → Episode selector: renders (evidence: `src/pages/WatchTv.tsx`)
- TV details → Title carousel: renders (evidence: `src/pages/WatchTv.tsx`)
- TV details → Footer: renders (evidence: `src/pages/WatchTv.tsx`)
- Title carousel → Movie card: renders movies (evidence: `src/components/Section.tsx`)
- Title carousel → TV card: renders shows (evidence: `src/components/Section.tsx`)
- Navigation → Search page: submits search (evidence: `src/pages/Search.tsx`)
- Movie card → Movie details: links to details
- TV card → TV details: links to details
