# parthas25/my-tube architecture

> Architecture diagram of the GitHub repository parthas25/my-tube, 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/parthas25/my-tube
- Repository: https://github.com/parthas25/my-tube

## Overview

MeowTube is a cat-video browsing and watch experience. Users arrive at a searchable, category- and section-filtered catalog, open a video in a dialog or its watch route, and use the watch page’s player and related-video rail. The catalog and watch-detail helpers provide the main internal data and presentation logic; the supplied excerpts show no persistent store or external video service. Some component links are supported by the SOURCE INDEX rather than full excerpts, so the graph avoids inferring unshown behavior.

Main entry points: [`components/home-page.tsx`](https://github.com/parthas25/my-tube/blob/main/components/home-page.tsx) (Home Page), [`components/watch-page.tsx`](https://github.com/parthas25/my-tube/blob/main/components/watch-page.tsx) (Watch Page), [`lib/catalog.ts`](https://github.com/parthas25/my-tube/blob/main/lib/catalog.ts) (Video Catalog), [`app/watch/[id]/page.tsx`](https://github.com/parthas25/my-tube/blob/main/app/watch/%5Bid%5D/page.tsx) (Watch Route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routes["Routes and Shell"]
  node_home_route["Home Route<br/>[page.tsx]"]
  node_watch_route["Watch Route<br/>[page.tsx]"]
  node_site_header["Site Header<br/>[site-header.tsx]"]
  node_cat_logo["Cat Logo<br/>[cat-logo.tsx]"]
  node_theme_toggle["Theme Toggle<br/>[theme-toggle.tsx]"]
end

subgraph group_discovery["Video Discovery"]
  node_home_page["Home Page<br/>[home-page.tsx]"]
  node_sidebar["Section Sidebar<br/>[sidebar.tsx]"]
  node_category_chips["Category Chips<br/>[category-chips.tsx]"]
  node_hero_banner["Hero Banner<br/>[hero-banner.tsx]"]
  node_video_section["Video Shelves<br/>[video-section.tsx]"]
  node_watch_dialog["Watch Dialog<br/>[watch-dialog.tsx]"]
  node_catalog["Video Catalog<br/>[catalog.ts]"]
end

subgraph group_watch["Watch Experience"]
  node_watch_page["Watch Page<br/>[watch-page.tsx]"]
  node_video_player["Video Player<br/>[video-player.tsx]"]
  node_watch_details["Watch Details<br/>[watch.ts]"]
  node_cat_image["Cat Image<br/>[cat-image.tsx]"]
end

node_visitor(("Viewer"))

node_visitor -->|"opens catalog"| node_home_route
node_visitor -->|"opens video"| node_watch_route
node_home_route -->|"renders"| node_home_page
node_home_route -->|"validates section"| node_catalog
node_watch_route -->|"looks up video"| node_catalog
node_watch_route -->|"builds metadata"| node_watch_details
node_watch_route -->|"renders"| node_watch_page
node_home_page -->|"filters videos"| node_catalog
node_home_page -->|"renders"| node_site_header
node_home_page -->|"renders"| node_sidebar
node_home_page -->|"renders"| node_category_chips
node_home_page -->|"renders"| node_hero_banner
node_home_page -->|"renders"| node_video_section
node_home_page -->|"opens dialog"| node_watch_dialog
node_site_header -->|"renders"| node_cat_logo
node_site_header -->|"renders"| node_theme_toggle
node_category_chips -->|"reads categories"| node_catalog
node_video_section -->|"renders thumbnails"| node_cat_image
node_watch_dialog -->|"renders thumbnail"| node_cat_image
node_watch_page -->|"looks up video"| node_catalog
node_watch_page -->|"formats details"| node_watch_details
node_watch_page -->|"renders player"| node_video_player
node_watch_page -->|"renders thumbnails"| node_cat_image
node_video_player -->|"formats time"| node_watch_details

click node_home_route "https://github.com/parthas25/my-tube/blob/main/app/page.tsx"
click node_watch_route "https://github.com/parthas25/my-tube/blob/main/app/watch/%5Bid%5D/page.tsx"
click node_home_page "https://github.com/parthas25/my-tube/blob/main/components/home-page.tsx"
click node_site_header "https://github.com/parthas25/my-tube/blob/main/components/site-header.tsx"
click node_cat_logo "https://github.com/parthas25/my-tube/blob/main/components/cat-logo.tsx"
click node_theme_toggle "https://github.com/parthas25/my-tube/blob/main/components/theme-toggle.tsx"
click node_sidebar "https://github.com/parthas25/my-tube/blob/main/components/sidebar.tsx"
click node_category_chips "https://github.com/parthas25/my-tube/blob/main/components/category-chips.tsx"
click node_hero_banner "https://github.com/parthas25/my-tube/blob/main/components/hero-banner.tsx"
click node_video_section "https://github.com/parthas25/my-tube/blob/main/components/video-section.tsx"
click node_watch_dialog "https://github.com/parthas25/my-tube/blob/main/components/watch-dialog.tsx"
click node_catalog "https://github.com/parthas25/my-tube/blob/main/lib/catalog.ts"
click node_watch_page "https://github.com/parthas25/my-tube/blob/main/components/watch-page.tsx"
click node_video_player "https://github.com/parthas25/my-tube/blob/main/components/video-player.tsx"
click node_watch_details "https://github.com/parthas25/my-tube/blob/main/lib/watch.ts"
click node_cat_image "https://github.com/parthas25/my-tube/blob/main/components/cat-image.tsx"

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_route,node_watch_route,node_site_header,node_cat_logo,node_theme_toggle,node_visitor toneBlue
class node_home_page,node_sidebar,node_category_chips,node_hero_banner,node_video_section,node_watch_dialog,node_catalog toneAmber
class node_watch_page,node_video_player,node_watch_details,node_cat_image toneMint
```

## Components

### Routes and Shell

- [Home Route](https://github.com/parthas25/my-tube/blob/main/app/page.tsx): `app/page.tsx`
- [Watch Route](https://github.com/parthas25/my-tube/blob/main/app/watch/%5Bid%5D/page.tsx): `app/watch/[id]/page.tsx`
- [Site Header](https://github.com/parthas25/my-tube/blob/main/components/site-header.tsx): `components/site-header.tsx`
- [Cat Logo](https://github.com/parthas25/my-tube/blob/main/components/cat-logo.tsx): `components/cat-logo.tsx`
- [Theme Toggle](https://github.com/parthas25/my-tube/blob/main/components/theme-toggle.tsx): `components/theme-toggle.tsx`

### Video Discovery

- [Home Page](https://github.com/parthas25/my-tube/blob/main/components/home-page.tsx): `components/home-page.tsx`
- [Section Sidebar](https://github.com/parthas25/my-tube/blob/main/components/sidebar.tsx): `components/sidebar.tsx`
- [Category Chips](https://github.com/parthas25/my-tube/blob/main/components/category-chips.tsx): `components/category-chips.tsx`
- [Hero Banner](https://github.com/parthas25/my-tube/blob/main/components/hero-banner.tsx): `components/hero-banner.tsx`
- [Video Shelves](https://github.com/parthas25/my-tube/blob/main/components/video-section.tsx): `components/video-section.tsx`
- [Watch Dialog](https://github.com/parthas25/my-tube/blob/main/components/watch-dialog.tsx): `components/watch-dialog.tsx`
- [Video Catalog](https://github.com/parthas25/my-tube/blob/main/lib/catalog.ts): `lib/catalog.ts`

### Watch Experience

- [Watch Page](https://github.com/parthas25/my-tube/blob/main/components/watch-page.tsx): `components/watch-page.tsx`
- [Video Player](https://github.com/parthas25/my-tube/blob/main/components/video-player.tsx): `components/video-player.tsx`
- [Watch Details](https://github.com/parthas25/my-tube/blob/main/lib/watch.ts): `lib/watch.ts`
- [Cat Image](https://github.com/parthas25/my-tube/blob/main/components/cat-image.tsx): `components/cat-image.tsx`

### Other components

- **Viewer**

## Connections

- Viewer → Home Route: opens catalog
- Viewer → Watch Route: opens video
- Home Route → Home Page: renders (evidence: `app/page.tsx`)
- Home Route → Video Catalog: validates section (evidence: `app/page.tsx`)
- Watch Route → Video Catalog: looks up video (evidence: `app/watch/[id]/page.tsx`)
- Watch Route → Watch Details: builds metadata (evidence: `app/watch/[id]/page.tsx`)
- Watch Route → Watch Page: renders (evidence: `app/watch/[id]/page.tsx`)
- Home Page → Video Catalog: filters videos (evidence: `components/home-page.tsx`)
- Home Page → Site Header: renders (evidence: `components/home-page.tsx`)
- Home Page → Section Sidebar: renders (evidence: `components/home-page.tsx`)
- Home Page → Category Chips: renders (evidence: `components/home-page.tsx`)
- Home Page → Hero Banner: renders (evidence: `components/home-page.tsx`)
- Home Page → Video Shelves: renders (evidence: `components/home-page.tsx`)
- Home Page → Watch Dialog: opens dialog (evidence: `components/home-page.tsx`)
- Site Header → Cat Logo: renders (evidence: `components/site-header.tsx`)
- Site Header → Theme Toggle: renders (evidence: `components/site-header.tsx`)
- Category Chips → Video Catalog: reads categories (evidence: `components/category-chips.tsx`)
- Video Shelves → Cat Image: renders thumbnails (evidence: `components/video-section.tsx`)
- Watch Dialog → Cat Image: renders thumbnail (evidence: `components/watch-dialog.tsx`)
- Watch Page → Video Catalog: looks up video (evidence: `components/watch-page.tsx`)
- Watch Page → Watch Details: formats details (evidence: `components/watch-page.tsx`)
- Watch Page → Video Player: renders player (evidence: `components/watch-page.tsx`)
- Watch Page → Cat Image: renders thumbnails (evidence: `components/watch-page.tsx`)
- Video Player → Watch Details: formats time (evidence: `components/video-player.tsx`)
