# samyak00005/retrotoonz architecture

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

## Overview

RetroToonz is a React cartoon-streaming frontend. Viewers browse curated and searchable shows, open a show, and navigate to an episode player; signed-in users can manage a watchlist and resume playback. Admin routes expose catalog, episode, homepage-section, user, analytics, and content-health tools. The graph reflects documented routes and the sampled module references; source for several page implementations and integrations was not inspected, so uncertain connections are omitted.

Main entry points: [`src/app/routes/AppRoutes.jsx`](https://github.com/samyak00005/retrotoonz/blob/main/src/app/routes/AppRoutes.jsx) (Route map), [`src/layouts/AdminLayout.jsx`](https://github.com/samyak00005/retrotoonz/blob/main/src/layouts/AdminLayout.jsx) (Admin layout), [`src/services/contentService.js`](https://github.com/samyak00005/retrotoonz/blob/main/src/services/contentService.js) (Catalog service), [`src/services/libraryService.js`](https://github.com/samyak00005/retrotoonz/blob/main/src/services/libraryService.js) (Watchlist & playback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App &amp; routing"]
  node_app["App shell<br/>[App.jsx]"]
  node_routes["Route map<br/>[AppRoutes.jsx]"]
  node_admin_gate["Admin gate<br/>[RequireAdmin.jsx]"]
end

subgraph group_browse["Discovery &amp; catalog"]
  node_home["Home page<br/>[HomePage.jsx]"]
  node_search_page["Search results"]
  node_show_page["Show details"]
  node_search_bar["Search bar<br/>[SearchBar.jsx]"]
  node_discovery["Discovery logic<br/>[showDiscovery.js]"]
  node_catalog["Catalog service<br/>[contentService.js]"]
  node_show_grid["Show grid<br/>[ShowGrid.jsx]"]
end

subgraph group_view["Viewing &amp; library"]
  node_video_page["Player page"]
  node_player["Video player<br/>[VideoPlayer.jsx]"]
  node_watch_routes["Watch routes<br/>[watchRoutes.js]"]
  node_library["Watchlist &amp; playback<br/>[libraryService.js]"]
  node_profile["Profile page"]
  node_watchlist_page["Watchlist page<br/>[WatchlistPage.jsx]"]
  node_media["Media URL resolver<br/>[mediaService.js]"]
end

subgraph group_identity["Identity &amp; feedback"]
  node_auth_pages["Login &amp; signup<br/>[LoginPage.jsx]"]
  node_auth_service["Account service<br/>[authService.js]"]
  node_toast["Toast service<br/>[toastService.js]"]
end

subgraph group_admin["Administration"]
  node_admin_layout["Admin layout<br/>[AdminLayout.jsx]"]
  node_admin_catalog["Catalog management<br/>[ShowsPage.jsx]"]
  node_admin_episodes["Episode management<br/>[EpisodesPage.jsx]"]
  node_admin_sections["Homepage sections"]
  node_admin_users["User management<br/>[UsersPage.jsx]"]
  node_admin_insights["Admin insights<br/>[AnalyticsPage.jsx]"]
  node_admin_health["Content health"]
end

node_viewer(("Viewer"))

node_viewer -->|"opens"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_search_page
node_routes -->|"routes to"| node_show_page
node_routes -->|"routes to"| node_video_page
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_watchlist_page
node_routes -->|"guards admin"| node_admin_gate
node_admin_gate -->|"checks role"| node_auth_service
node_routes -->|"routes to"| node_admin_layout
node_admin_layout -.-> node_admin_catalog
node_admin_layout -.-> node_admin_episodes
node_admin_layout -.-> node_admin_sections
node_admin_layout -.-> node_admin_users
node_admin_layout -.-> node_admin_insights
node_admin_layout -.-> node_admin_health
node_search_page -->|"loads shows"| node_catalog
node_search_page -->|"searches and sorts"| node_discovery
node_search_page -->|"renders results"| node_show_grid
node_search_bar -->|"queries"| node_catalog
node_search_bar -->|"filters results"| node_discovery
node_search_bar -.->|"navigates"| node_search_page
node_show_page -->|"loads show"| node_catalog
node_show_page -->|"updates library"| node_library
node_show_page -->|"resolves media"| node_media
node_home -->|"loads sections"| node_catalog
node_home -->|"reads playback"| node_library
node_home -->|"builds watch path"| node_watch_routes
node_profile -->|"reads and clears"| node_library
node_profile -->|"builds watch path"| node_watch_routes
node_profile -->|"renders recommendations"| node_show_grid
node_watchlist_page -->|"reads watchlist"| node_library
node_video_page -.->|"renders player"| node_player
node_player -->|"saves playback"| node_library
node_player -->|"resolves media"| node_media
node_player -.->|"loads episodes"| node_catalog
node_auth_pages -->|"authenticates account"| node_auth_service
node_auth_pages -->|"shows feedback"| node_toast
node_library -->|"scopes by user"| node_auth_service
node_catalog -->|"resolves media URLs"| node_media
node_admin_catalog -.->|"uses catalog"| node_catalog
node_admin_episodes -->|"uses catalog"| node_catalog
node_admin_users -->|"manages accounts"| node_auth_service

click node_app "https://github.com/samyak00005/retrotoonz/blob/main/src/app/App.jsx"
click node_routes "https://github.com/samyak00005/retrotoonz/blob/main/src/app/routes/AppRoutes.jsx"
click node_admin_gate "https://github.com/samyak00005/retrotoonz/blob/main/src/app/routes/RequireAdmin.jsx"
click node_home "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/public/HomePage.jsx"
click node_search_page "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/public/SearchResultsPage.jsx"
click node_show_page "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/public/ShowDetailsPage.jsx"
click node_search_bar "https://github.com/samyak00005/retrotoonz/blob/main/src/components/common/SearchBar.jsx"
click node_discovery "https://github.com/samyak00005/retrotoonz/blob/main/src/utils/showDiscovery.js"
click node_catalog "https://github.com/samyak00005/retrotoonz/blob/main/src/services/contentService.js"
click node_show_grid "https://github.com/samyak00005/retrotoonz/blob/main/src/components/show/ShowGrid.jsx"
click node_video_page "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/public/VideoPlayerPage.jsx"
click node_player "https://github.com/samyak00005/retrotoonz/blob/main/src/components/video/VideoPlayer.jsx"
click node_watch_routes "https://github.com/samyak00005/retrotoonz/blob/main/src/utils/watchRoutes.js"
click node_library "https://github.com/samyak00005/retrotoonz/blob/main/src/services/libraryService.js"
click node_profile "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/account/UserProfilePage.jsx"
click node_watchlist_page "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/account/WatchlistPage.jsx"
click node_media "https://github.com/samyak00005/retrotoonz/blob/main/src/services/mediaService.js"
click node_auth_pages "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/auth/LoginPage.jsx"
click node_auth_service "https://github.com/samyak00005/retrotoonz/blob/main/src/services/authService.js"
click node_toast "https://github.com/samyak00005/retrotoonz/blob/main/src/services/toastService.js"
click node_admin_layout "https://github.com/samyak00005/retrotoonz/blob/main/src/layouts/AdminLayout.jsx"
click node_admin_catalog "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/ShowsPage.jsx"
click node_admin_episodes "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/EpisodesPage.jsx"
click node_admin_sections "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/HomepageSectionsPage.jsx"
click node_admin_users "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/UsersPage.jsx"
click node_admin_insights "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/AnalyticsPage.jsx"
click node_admin_health "https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/ContentHealthPage.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_app,node_routes,node_admin_gate,node_viewer toneBlue
class node_home,node_search_page,node_show_page,node_search_bar,node_discovery,node_catalog,node_show_grid toneAmber
class node_video_page,node_player,node_watch_routes,node_library,node_profile,node_watchlist_page,node_media toneMint
class node_auth_pages,node_auth_service,node_toast toneRose
class node_admin_layout,node_admin_catalog,node_admin_episodes,node_admin_sections,node_admin_users,node_admin_insights,node_admin_health toneIndigo
```

## Components

### App & routing

- [App shell](https://github.com/samyak00005/retrotoonz/blob/main/src/app/App.jsx): `src/app/App.jsx`
- [Route map](https://github.com/samyak00005/retrotoonz/blob/main/src/app/routes/AppRoutes.jsx): `src/app/routes/AppRoutes.jsx`
- [Admin gate](https://github.com/samyak00005/retrotoonz/blob/main/src/app/routes/RequireAdmin.jsx): `src/app/routes/RequireAdmin.jsx`

### Discovery & catalog

- [Home page](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/public/HomePage.jsx): `src/pages/public/HomePage.jsx`
- [Search results](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/public/SearchResultsPage.jsx): `src/pages/public/SearchResultsPage.jsx`
- [Show details](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/public/ShowDetailsPage.jsx): `src/pages/public/ShowDetailsPage.jsx`
- [Search bar](https://github.com/samyak00005/retrotoonz/blob/main/src/components/common/SearchBar.jsx): `src/components/common/SearchBar.jsx`
- [Discovery logic](https://github.com/samyak00005/retrotoonz/blob/main/src/utils/showDiscovery.js): `src/utils/showDiscovery.js`
- [Catalog service](https://github.com/samyak00005/retrotoonz/blob/main/src/services/contentService.js): `src/services/contentService.js`
- [Show grid](https://github.com/samyak00005/retrotoonz/blob/main/src/components/show/ShowGrid.jsx): `src/components/show/ShowGrid.jsx`

### Viewing & library

- [Player page](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/public/VideoPlayerPage.jsx): `src/pages/public/VideoPlayerPage.jsx`
- [Video player](https://github.com/samyak00005/retrotoonz/blob/main/src/components/video/VideoPlayer.jsx): `src/components/video/VideoPlayer.jsx`
- [Watch routes](https://github.com/samyak00005/retrotoonz/blob/main/src/utils/watchRoutes.js): `src/utils/watchRoutes.js`
- [Watchlist & playback](https://github.com/samyak00005/retrotoonz/blob/main/src/services/libraryService.js): `src/services/libraryService.js`
- [Profile page](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/account/UserProfilePage.jsx): `src/pages/account/UserProfilePage.jsx`
- [Watchlist page](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/account/WatchlistPage.jsx): `src/pages/account/WatchlistPage.jsx`
- [Media URL resolver](https://github.com/samyak00005/retrotoonz/blob/main/src/services/mediaService.js): `src/services/mediaService.js`

### Identity & feedback

- [Login & signup](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/auth/LoginPage.jsx): `src/pages/auth/LoginPage.jsx`
- [Account service](https://github.com/samyak00005/retrotoonz/blob/main/src/services/authService.js): `src/services/authService.js`
- [Toast service](https://github.com/samyak00005/retrotoonz/blob/main/src/services/toastService.js): `src/services/toastService.js`

### Administration

- [Admin layout](https://github.com/samyak00005/retrotoonz/blob/main/src/layouts/AdminLayout.jsx): `src/layouts/AdminLayout.jsx`
- [Catalog management](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/ShowsPage.jsx): `src/pages/admin/ShowsPage.jsx`
- [Episode management](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/EpisodesPage.jsx): `src/pages/admin/EpisodesPage.jsx`
- [Homepage sections](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/HomepageSectionsPage.jsx): `src/pages/admin/HomepageSectionsPage.jsx`
- [User management](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/UsersPage.jsx): `src/pages/admin/UsersPage.jsx`
- [Admin insights](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/AnalyticsPage.jsx): `src/pages/admin/AnalyticsPage.jsx`
- [Content health](https://github.com/samyak00005/retrotoonz/blob/main/src/pages/admin/ContentHealthPage.jsx): `src/pages/admin/ContentHealthPage.jsx`

### Other components

- **Viewer**

## Connections

- Viewer → App shell: opens
- App shell → Route map: renders (evidence: `src/app/App.jsx`)
- Route map → Home page: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route map → Search results: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route map → Show details: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route map → Player page: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route map → Profile page: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route map → Watchlist page: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route map → Admin gate: guards admin (evidence: `src/app/routes/AppRoutes.jsx`)
- Admin gate → Account service: checks role (evidence: `src/app/routes/RequireAdmin.jsx`)
- Route map → Admin layout: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Admin layout → Catalog management
- Admin layout → Episode management
- Admin layout → Homepage sections
- Admin layout → User management
- Admin layout → Admin insights
- Admin layout → Content health
- Search results → Catalog service: loads shows (evidence: `src/pages/public/SearchResultsPage.jsx`)
- Search results → Discovery logic: searches and sorts (evidence: `src/pages/public/SearchResultsPage.jsx`)
- Search results → Show grid: renders results (evidence: `src/pages/public/SearchResultsPage.jsx`)
- Search bar → Catalog service: queries (evidence: `src/components/common/SearchBar.jsx`)
- Search bar → Discovery logic: filters results (evidence: `src/components/common/SearchBar.jsx`)
- Search bar → Search results: navigates
- Show details → Catalog service: loads show (evidence: `src/pages/public/ShowDetailsPage.jsx`)
- Show details → Watchlist & playback: updates library (evidence: `src/pages/public/ShowDetailsPage.jsx`)
- Show details → Media URL resolver: resolves media (evidence: `src/pages/public/ShowDetailsPage.jsx`)
- Home page → Catalog service: loads sections
- Home page → Watchlist & playback: reads playback
- Home page → Watch routes: builds watch path
- Profile page → Watchlist & playback: reads and clears (evidence: `src/pages/account/UserProfilePage.jsx`)
- Profile page → Watch routes: builds watch path (evidence: `src/pages/account/UserProfilePage.jsx`)
- Profile page → Show grid: renders recommendations (evidence: `src/pages/account/UserProfilePage.jsx`)
- Watchlist page → Watchlist & playback: reads watchlist (evidence: `src/pages/account/WatchlistPage.jsx`)
- Player page → Video player: renders player
- Video player → Watchlist & playback: saves playback (evidence: `src/components/video/VideoPlayer.jsx`)
- Video player → Media URL resolver: resolves media (evidence: `src/components/video/VideoPlayer.jsx`)
- Video player → Catalog service: loads episodes
- Login & signup → Account service: authenticates account (evidence: `src/pages/auth/LoginPage.jsx`)
- Login & signup → Toast service: shows feedback (evidence: `src/pages/auth/LoginPage.jsx`)
- Watchlist & playback → Account service: scopes by user (evidence: `src/services/libraryService.js`)
- Catalog service → Media URL resolver: resolves media URLs (evidence: `src/services/contentService.js`)
- Catalog management → Catalog service: uses catalog (evidence: `src/pages/admin/ShowsPage.jsx`)
- Episode management → Catalog service: uses catalog (evidence: `src/pages/admin/EpisodesPage.jsx`)
- User management → Account service: manages accounts (evidence: `src/pages/admin/UsersPage.jsx`)
