# siwanadsingtong/youtube-clone architecture

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

- Interactive diagram: https://gitdiagram.com/siwanadsingtong/youtube-clone
- Repository: https://github.com/siwanadsingtong/youtube-clone

## Overview

This is a React-based YouTube-style browsing interface. The user-facing flow enters the single-page app, assembles the home screen, and displays navigation, sidebar links, category tags, video cards, Shorts, and breaking-news cards from local sample data. Separate service modules provide each displayed dataset; sidebar subscriptions use their own list. The sampled code shows no backend, persistent store, or functional search/playback. All core modules are represented; edges reflect imports and rendering visible in excerpts, not inferred interactions.

Main entry points: [`src/components/Content/Content.jsx`](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Content/Content.jsx) (Feed renderer), [`src/pages/Home.jsx`](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/pages/Home.jsx) (Home layout), [`src/components/Sidebar/Sidebar.jsx`](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Sidebar/Sidebar.jsx) (Sidebar), [`src/main.jsx`](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/main.jsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["React entry<br/>[main.jsx]"]
  node_router["App router<br/>[App.jsx]"]
  node_home["Home layout<br/>[Home.jsx]"]
end

subgraph group_navigation["Page navigation"]
  node_navbar["Top bar<br/>[Navbar.jsx]"]
  node_sidebar["Sidebar<br/>[Sidebar.jsx]"]
  node_sidebar_items["Sidebar items<br/>[Items.jsx]"]
end

subgraph group_browse["Home feed"]
  node_feed["Feed renderer<br/>[Content.jsx]"]
  node_video_card["Video card<br/>[SkeletonVideo.jsx]"]
  node_short_card["Short card<br/>[SkeletonShort.jsx]"]
  node_loading_card["Loading card"]
end

subgraph group_data["Sample content"]
  node_videos["Video dataset<br/>[videos.jsx]"]
  node_shorts["Shorts dataset<br/>[shorts.jsx]"]
  node_breaking["Breaking dataset<br/>[breaking.jsx]"]
  node_tags["Category tags<br/>[tags.jsx]"]
  node_subscriptions["Subscriptions list<br/>[subscriptions.jsx]"]
end

node_viewer(("Viewer"))

node_entry -->|"renders"| node_router
node_router -->|"routes to"| node_home
node_home -->|"renders"| node_navbar
node_home -->|"renders"| node_sidebar
node_home -->|"renders"| node_feed
node_sidebar -->|"renders"| node_sidebar_items
node_sidebar -->|"reads"| node_subscriptions
node_feed -->|"reads"| node_videos
node_feed -->|"reads"| node_tags
node_feed -->|"reads"| node_shorts
node_feed -->|"reads"| node_breaking
node_feed -->|"renders"| node_video_card
node_feed -->|"renders"| node_short_card
node_feed -->|"renders"| node_loading_card
node_viewer -.->|"views"| node_entry

click node_entry "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/main.jsx"
click node_router "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/App.jsx"
click node_home "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/pages/Home.jsx"
click node_navbar "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Navbar/Navbar.jsx"
click node_sidebar "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Sidebar/Sidebar.jsx"
click node_sidebar_items "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Sidebar/Items/Items.jsx"
click node_feed "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Content/Content.jsx"
click node_video_card "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Skeleton/SkeletonVideo.jsx"
click node_short_card "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Skeleton/SkeletonShort.jsx"
click node_loading_card "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Skeleton/SkeletonLoading.jsx"
click node_videos "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/videos.jsx"
click node_shorts "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/shorts.jsx"
click node_breaking "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/breaking.jsx"
click node_tags "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/tags.jsx"
click node_subscriptions "https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/subscriptions.jsx"

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_entry,node_router,node_home,node_viewer toneBlue
class node_navbar,node_sidebar,node_sidebar_items toneAmber
class node_feed,node_video_card,node_short_card,node_loading_card toneMint
class node_videos,node_shorts,node_breaking,node_tags,node_subscriptions toneRose
```

## Components

### Application shell

- [React entry](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/main.jsx): `src/main.jsx`
- [App router](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/App.jsx): `src/App.jsx`
- [Home layout](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`

### Page navigation

- [Top bar](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Navbar/Navbar.jsx): `src/components/Navbar/Navbar.jsx`
- [Sidebar](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Sidebar/Sidebar.jsx): `src/components/Sidebar/Sidebar.jsx`
- [Sidebar items](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Sidebar/Items/Items.jsx): `src/components/Sidebar/Items/Items.jsx`

### Home feed

- [Feed renderer](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Content/Content.jsx): `src/components/Content/Content.jsx`
- [Video card](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Skeleton/SkeletonVideo.jsx): `src/components/Skeleton/SkeletonVideo.jsx`
- [Short card](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Skeleton/SkeletonShort.jsx): `src/components/Skeleton/SkeletonShort.jsx`
- [Loading card](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/components/Skeleton/SkeletonLoading.jsx): `src/components/Skeleton/SkeletonLoading.jsx`

### Sample content

- [Video dataset](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/videos.jsx): `src/services/videos.jsx`
- [Shorts dataset](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/shorts.jsx): `src/services/shorts.jsx`
- [Breaking dataset](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/breaking.jsx): `src/services/breaking.jsx`
- [Category tags](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/tags.jsx): `src/services/tags.jsx`
- [Subscriptions list](https://github.com/siwanadsingtong/youtube-clone/blob/main/src/services/subscriptions.jsx): `src/services/subscriptions.jsx`

### Other components

- **Viewer**

## Connections

- React entry → App router: renders (evidence: `src/main.jsx`)
- App router → Home layout: routes to (evidence: `src/App.jsx`)
- Home layout → Top bar: renders (evidence: `src/pages/Home.jsx`)
- Home layout → Sidebar: renders (evidence: `src/pages/Home.jsx`)
- Home layout → Feed renderer: renders (evidence: `src/pages/Home.jsx`)
- Sidebar → Sidebar items: renders (evidence: `src/components/Sidebar/Sidebar.jsx`)
- Sidebar → Subscriptions list: reads (evidence: `src/components/Sidebar/Sidebar.jsx`)
- Feed renderer → Video dataset: reads (evidence: `src/components/Content/Content.jsx`)
- Feed renderer → Category tags: reads (evidence: `src/components/Content/Content.jsx`)
- Feed renderer → Shorts dataset: reads (evidence: `src/components/Content/Content.jsx`)
- Feed renderer → Breaking dataset: reads (evidence: `src/components/Content/Content.jsx`)
- Feed renderer → Video card: renders (evidence: `src/components/Content/Content.jsx`)
- Feed renderer → Short card: renders (evidence: `src/components/Content/Content.jsx`)
- Feed renderer → Loading card: renders (evidence: `src/components/Content/Content.jsx`)
- Viewer → React entry: views
