# sainath8910/youtube_note architecture

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

- Interactive diagram: https://gitdiagram.com/sainath8910/youtube_note
- Repository: https://github.com/sainath8910/youtube_note

## Overview

YouTube Notes is a learning workspace spanning a Chrome extension/dashboard and a Django API backed by Supabase. The main workflow is capturing timestamped video notes or web-page notes, saving them to the account, then revisiting and organizing them in the dashboard. Distinct supporting capabilities include video-library browsing, transcripts and local translation, folders, playlists, trash recovery, account management, and cross-device sync. The README documents the product flow; several backend routes and frontend pages are indexed but not excerpted, so their internal call details are not inferred.

Main entry points: [`extension/src/Dashboard.tsx`](https://github.com/sainath8910/youtube_note/blob/main/extension/src/Dashboard.tsx) (Dashboard workspace), [`backend/sync_bridge/services.py`](https://github.com/sainath8910/youtube_note/blob/main/backend/sync_bridge/services.py) (Sync engine), [`backend/notes/views.py`](https://github.com/sainath8910/youtube_note/blob/main/backend/notes/views.py) (Notes API), [`backend/notes/models.py`](https://github.com/sainath8910/youtube_note/blob/main/backend/notes/models.py) (Notes and trash)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and dashboard"]
  node_extension_sidebar["Capture sidebar<br/>[Sidebar.tsx]"]
  node_extension_auth["Extension auth<br/>[authFlow.ts]"]
  node_dashboard["Dashboard workspace<br/>[Dashboard.tsx]"]
  node_dashboard_app["Dashboard entry<br/>[App.tsx]"]
  node_web_sources["Source browsing<br/>[SourcesPage.tsx]"]
  node_video_ui["Video library UI<br/>[VideosPage.tsx]"]
  node_transcript_ui["Transcript translation"]
  node_folder_ui["Folder organizer"]
  node_folder_pages["Folder pages<br/>[FolderPages.tsx]"]
  node_playlist_ui["Playlist browser<br/>[PlaylistsPage.tsx]"]
  node_trash_ui["Trash recovery UI<br/>[TrashPage.tsx]"]
  node_profile_ui["Account profile UI<br/>[ProfilePage.tsx]"]
end

subgraph group_api["Learning API"]
  node_notes_api["Notes API<br/>[views.py]"]
  node_folders_api["Folders API<br/>[views.py]"]
  node_videos_api["Videos API<br/>[views.py]"]
  node_playlists_api["Playlists API<br/>[views.py]"]
  node_sync_api["Sync API<br/>[views.py]"]
end

subgraph group_domain["Learning data"]
  node_note_store[("Notes and trash<br/>[models.py]")]
  node_folder_store[("Folder records<br/>[models.py]")]
  node_video_store[("Videos and sessions<br/>[models.py]")]
  node_playlist_store[("Playlists<br/>[models.py]")]
  node_transcript_fetch["Transcript retrieval<br/>[transcript.py]"]
end

subgraph group_identity["Identity and sync"]
  node_sync_service["Sync engine<br/>[services.py]"]
  node_auth_service["JWT authentication<br/>[authentication.py]"]
end

node_learner(("Learner"))
node_supabase_auth["Supabase Auth"]
node_youtube["YouTube"]
node_postgres[("Supabase PostgreSQL")]

node_learner -->|"captures notes"| node_extension_sidebar
node_learner -->|"organizes library"| node_dashboard
node_extension_sidebar -->|"saves notes"| node_notes_api
node_dashboard -->|"browses notes"| node_notes_api
node_dashboard_app -->|"renders"| node_dashboard
node_dashboard -->|"browses sources"| node_web_sources
node_dashboard -->|"opens library"| node_video_ui
node_dashboard -->|"organizes folders"| node_folder_ui
node_dashboard -->|"opens folders"| node_folder_pages
node_dashboard -->|"opens playlists"| node_playlist_ui
node_dashboard -->|"opens trash"| node_trash_ui
node_dashboard -->|"opens profile"| node_profile_ui
node_extension_auth -->|"authenticates"| node_supabase_auth
node_extension_auth -->|"sends JWT"| node_auth_service
node_notes_api -->|"reads and writes"| node_note_store
node_folders_api -->|"reads and writes"| node_folder_store
node_videos_api -->|"reads and writes"| node_video_store
node_videos_api -->|"fetches transcript"| node_transcript_fetch
node_playlist_ui -->|"manages playlists"| node_playlists_api
node_playlists_api -.->|"reads and writes"| node_playlist_store
node_folder_ui -->|"manages folders"| node_folders_api
node_trash_ui -->|"recovers items"| node_notes_api
node_sync_api -.->|"dispatches sync"| node_sync_service
node_sync_service -->|"synchronizes records"| node_note_store
node_sync_service -->|"synchronizes records"| node_folder_store
node_sync_service -->|"synchronizes records"| node_playlist_store
node_sync_service -->|"synchronizes records"| node_video_store
node_note_store -->|"persists"| node_postgres
node_folder_store -->|"persists"| node_postgres
node_video_store -->|"persists"| node_postgres
node_playlist_store -->|"persists"| node_postgres
node_transcript_fetch -->|"retrieves captions"| node_youtube
node_video_ui -->|"translates locally"| node_transcript_ui

click node_extension_sidebar "https://github.com/sainath8910/youtube_note/blob/main/extension/src/Sidebar.tsx"
click node_extension_auth "https://github.com/sainath8910/youtube_note/blob/main/extension/src/authFlow.ts"
click node_dashboard "https://github.com/sainath8910/youtube_note/blob/main/extension/src/Dashboard.tsx"
click node_dashboard_app "https://github.com/sainath8910/youtube_note/blob/main/extension/src/App.tsx"
click node_web_sources "https://github.com/sainath8910/youtube_note/blob/main/extension/src/SourcesPage.tsx"
click node_video_ui "https://github.com/sainath8910/youtube_note/blob/main/extension/src/VideosPage.tsx"
click node_transcript_ui "https://github.com/sainath8910/youtube_note/blob/main/extension/src/TranscriptTranslator.tsx"
click node_folder_ui "https://github.com/sainath8910/youtube_note/blob/main/extension/src/FolderOrganizerDialog.tsx"
click node_folder_pages "https://github.com/sainath8910/youtube_note/blob/main/extension/src/FolderPages.tsx"
click node_playlist_ui "https://github.com/sainath8910/youtube_note/blob/main/extension/src/PlaylistsPage.tsx"
click node_trash_ui "https://github.com/sainath8910/youtube_note/blob/main/extension/src/TrashPage.tsx"
click node_profile_ui "https://github.com/sainath8910/youtube_note/blob/main/extension/src/ProfilePage.tsx"
click node_notes_api "https://github.com/sainath8910/youtube_note/blob/main/backend/notes/views.py"
click node_folders_api "https://github.com/sainath8910/youtube_note/blob/main/backend/folders/views.py"
click node_videos_api "https://github.com/sainath8910/youtube_note/blob/main/backend/videos/views.py"
click node_playlists_api "https://github.com/sainath8910/youtube_note/blob/main/backend/playlists/views.py"
click node_sync_api "https://github.com/sainath8910/youtube_note/blob/main/backend/sync_bridge/views.py"
click node_note_store "https://github.com/sainath8910/youtube_note/blob/main/backend/notes/models.py"
click node_folder_store "https://github.com/sainath8910/youtube_note/blob/main/backend/folders/models.py"
click node_video_store "https://github.com/sainath8910/youtube_note/blob/main/backend/videos/models.py"
click node_playlist_store "https://github.com/sainath8910/youtube_note/blob/main/backend/playlists/models.py"
click node_transcript_fetch "https://github.com/sainath8910/youtube_note/blob/main/backend/videos/services/transcript.py"
click node_sync_service "https://github.com/sainath8910/youtube_note/blob/main/backend/sync_bridge/services.py"
click node_auth_service "https://github.com/sainath8910/youtube_note/blob/main/backend/users/authentication.py"

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_extension_sidebar,node_extension_auth,node_dashboard,node_dashboard_app,node_web_sources,node_video_ui,node_transcript_ui,node_folder_ui,node_folder_pages,node_playlist_ui,node_trash_ui,node_profile_ui toneBlue
class node_notes_api,node_folders_api,node_videos_api,node_playlists_api,node_sync_api,node_postgres toneAmber
class node_note_store,node_folder_store,node_video_store,node_playlist_store,node_transcript_fetch toneMint
class node_sync_service,node_auth_service toneRose
class node_learner,node_supabase_auth,node_youtube toneIndigo
```

## Components

### Capture and dashboard

- [Capture sidebar](https://github.com/sainath8910/youtube_note/blob/main/extension/src/Sidebar.tsx): `extension/src/Sidebar.tsx`
- [Extension auth](https://github.com/sainath8910/youtube_note/blob/main/extension/src/authFlow.ts): `extension/src/authFlow.ts`
- [Dashboard workspace](https://github.com/sainath8910/youtube_note/blob/main/extension/src/Dashboard.tsx): `extension/src/Dashboard.tsx`
- [Dashboard entry](https://github.com/sainath8910/youtube_note/blob/main/extension/src/App.tsx): `extension/src/App.tsx`
- [Source browsing](https://github.com/sainath8910/youtube_note/blob/main/extension/src/SourcesPage.tsx): `extension/src/SourcesPage.tsx`
- [Video library UI](https://github.com/sainath8910/youtube_note/blob/main/extension/src/VideosPage.tsx): `extension/src/VideosPage.tsx`
- [Transcript translation](https://github.com/sainath8910/youtube_note/blob/main/extension/src/TranscriptTranslator.tsx): `extension/src/TranscriptTranslator.tsx`
- [Folder organizer](https://github.com/sainath8910/youtube_note/blob/main/extension/src/FolderOrganizerDialog.tsx): `extension/src/FolderOrganizerDialog.tsx`
- [Folder pages](https://github.com/sainath8910/youtube_note/blob/main/extension/src/FolderPages.tsx): `extension/src/FolderPages.tsx`
- [Playlist browser](https://github.com/sainath8910/youtube_note/blob/main/extension/src/PlaylistsPage.tsx): `extension/src/PlaylistsPage.tsx`
- [Trash recovery UI](https://github.com/sainath8910/youtube_note/blob/main/extension/src/TrashPage.tsx): `extension/src/TrashPage.tsx`
- [Account profile UI](https://github.com/sainath8910/youtube_note/blob/main/extension/src/ProfilePage.tsx): `extension/src/ProfilePage.tsx`

### Learning API

- [Notes API](https://github.com/sainath8910/youtube_note/blob/main/backend/notes/views.py): `backend/notes/views.py`
- [Folders API](https://github.com/sainath8910/youtube_note/blob/main/backend/folders/views.py): `backend/folders/views.py`
- [Videos API](https://github.com/sainath8910/youtube_note/blob/main/backend/videos/views.py): `backend/videos/views.py`
- [Playlists API](https://github.com/sainath8910/youtube_note/blob/main/backend/playlists/views.py): `backend/playlists/views.py`
- [Sync API](https://github.com/sainath8910/youtube_note/blob/main/backend/sync_bridge/views.py): `backend/sync_bridge/views.py`

### Learning data

- [Notes and trash](https://github.com/sainath8910/youtube_note/blob/main/backend/notes/models.py): `backend/notes/models.py`
- [Folder records](https://github.com/sainath8910/youtube_note/blob/main/backend/folders/models.py): `backend/folders/models.py`
- [Videos and sessions](https://github.com/sainath8910/youtube_note/blob/main/backend/videos/models.py): `backend/videos/models.py`
- [Playlists](https://github.com/sainath8910/youtube_note/blob/main/backend/playlists/models.py): `backend/playlists/models.py`
- [Transcript retrieval](https://github.com/sainath8910/youtube_note/blob/main/backend/videos/services/transcript.py): `backend/videos/services/transcript.py`

### Identity and sync

- [Sync engine](https://github.com/sainath8910/youtube_note/blob/main/backend/sync_bridge/services.py): `backend/sync_bridge/services.py`
- [JWT authentication](https://github.com/sainath8910/youtube_note/blob/main/backend/users/authentication.py): `backend/users/authentication.py`

### Other components

- **Learner**
- **Supabase Auth**
- **YouTube**
- **Supabase PostgreSQL**

## Connections

- Learner → Capture sidebar: captures notes
- Learner → Dashboard workspace: organizes library
- Capture sidebar → Notes API: saves notes
- Dashboard workspace → Notes API: browses notes
- Dashboard entry → Dashboard workspace: renders (evidence: `extension/src/App.tsx`)
- Dashboard workspace → Source browsing: browses sources (evidence: `extension/src/Dashboard.tsx`)
- Dashboard workspace → Video library UI: opens library (evidence: `extension/src/Dashboard.tsx`)
- Dashboard workspace → Folder organizer: organizes folders (evidence: `extension/src/Dashboard.tsx`)
- Dashboard workspace → Folder pages: opens folders (evidence: `extension/src/Dashboard.tsx`)
- Dashboard workspace → Playlist browser: opens playlists (evidence: `extension/src/Dashboard.tsx`)
- Dashboard workspace → Trash recovery UI: opens trash (evidence: `extension/src/Dashboard.tsx`)
- Dashboard workspace → Account profile UI: opens profile (evidence: `extension/src/Dashboard.tsx`)
- Extension auth → Supabase Auth: authenticates
- Extension auth → JWT authentication: sends JWT
- Notes API → Notes and trash: reads and writes (evidence: `backend/notes/models.py`)
- Folders API → Folder records: reads and writes (evidence: `backend/folders/views.py`)
- Videos API → Videos and sessions: reads and writes (evidence: `backend/videos/views.py`)
- Videos API → Transcript retrieval: fetches transcript (evidence: `backend/videos/views.py`)
- Playlist browser → Playlists API: manages playlists
- Playlists API → Playlists: reads and writes
- Folder organizer → Folders API: manages folders
- Trash recovery UI → Notes API: recovers items
- Sync API → Sync engine: dispatches sync
- Sync engine → Notes and trash: synchronizes records (evidence: `backend/sync_bridge/services.py`)
- Sync engine → Folder records: synchronizes records (evidence: `backend/sync_bridge/services.py`)
- Sync engine → Playlists: synchronizes records (evidence: `backend/sync_bridge/services.py`)
- Sync engine → Videos and sessions: synchronizes records (evidence: `backend/sync_bridge/services.py`)
- Notes and trash → Supabase PostgreSQL: persists
- Folder records → Supabase PostgreSQL: persists
- Videos and sessions → Supabase PostgreSQL: persists
- Playlists → Supabase PostgreSQL: persists
- Transcript retrieval → YouTube: retrieves captions
- Video library UI → Transcript translation: translates locally
