# synthofficial/streamflix architecture

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

- Interactive diagram: https://gitdiagram.com/synthofficial/streamflix
- Repository: https://github.com/synthofficial/streamflix

## Overview

Streamflix is an Electron/React media-streaming app. Users search or browse movies, shows, and anime, open a media detail view, resolve an episode or movie stream, and watch it in the custom player; playback state also supports continuing and tracking viewing. The graph includes the documented theme/settings, profile, update, and Discord presence branches. Edges reflect excerpted calls or explicit README capabilities; unsampled subsystems are included where the tree and README establish them, without asserting internal wiring.

Main entry points: [`src/renderer/pages/Homepage.tsx`](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/Homepage.tsx) (Home page), [`src/renderer/App.tsx`](https://github.com/synthofficial/streamflix/blob/main/src/renderer/App.tsx) (App shell), [`src/modules/api/Movies.ts`](https://github.com/synthofficial/streamflix/blob/main/src/modules/api/Movies.ts) (Catalog providers), [`src/modules/api/Anime.ts`](https://github.com/synthofficial/streamflix/blob/main/src/modules/api/Anime.ts) (Anime catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_app["App shell<br/>[App.tsx]"]
  node_home["Home page<br/>[Homepage.tsx]"]
end

subgraph group_discovery["Media discovery"]
  node_search["Media search<br/>[App.tsx]"]
  node_catalog["Catalog providers<br/>[Movies.ts]"]
  node_anime["Anime catalog<br/>[Anime.ts]"]
  node_metadata["AniList metadata<br/>[Anilist.ts]"]
  node_tvmaze["TV episode metadata<br/>[TVMaze.ts]"]
  node_trending["Trending shelves<br/>[TrendingMovies.tsx]"]
  node_anime_shelf["Anime shelf<br/>[TrendingAnime.tsx]"]
  node_top["Featured carousel<br/>[TopCarousel.tsx]"]
  node_details["Media details<br/>[MediaModal.tsx]"]
end

subgraph group_playback["Playback and history"]
  node_context["Playback state"]
  node_player["Video player<br/>[VideoPlayer.tsx]"]
  node_history[("Viewing history<br/>[functions.ts]")]
  node_continue["Continue watching"]
  node_watchlist["Watchlist UI<br/>[Watchlist.tsx]"]
end

subgraph group_platform["Desktop and preferences"]
  node_discord["Discord presence<br/>[DiscordRPC.ts]"]
  node_settings["Theme settings<br/>[SettingsModal.tsx]"]
  node_theme["Theme palette<br/>[ThemeUtils.ts]"]
  node_color["Color picker<br/>[ColorPicker.tsx]"]
  node_profile["Profile modal<br/>[ProfileModal.tsx]"]
  node_update["Update modal<br/>[UpdateModal.tsx]"]
  node_electron["Electron main<br/>[main.ts]"]
  node_titlebar["Title bar<br/>[TitleBar.tsx]"]
end

node_viewer(("Viewer"))
node_discord_service(("Discord client"))
node_stream_sources(("Stream providers"))

node_viewer -->|"opens"| node_app
node_app -->|"handles search"| node_search
node_search -->|"searches media"| node_catalog
node_catalog -->|"searches anime"| node_anime
node_anime -->|"fetches metadata"| node_metadata
node_catalog -->|"fetches episode data"| node_tvmaze
node_app -->|"renders"| node_home
node_home -->|"renders"| node_trending
node_home -->|"renders"| node_anime_shelf
node_home -->|"renders"| node_top
node_trending -->|"loads titles"| node_catalog
node_anime_shelf -->|"loads titles"| node_anime
node_home -.->|"opens details"| node_details
node_details -->|"resolves episodes"| node_catalog
node_details -->|"resolves anime source"| node_anime
node_home -->|"sets playback state"| node_context
node_home -->|"records viewing"| node_history
node_home -.->|"shows player"| node_player
node_player -->|"reads state"| node_context
node_player -->|"gets episode source"| node_catalog
node_player -->|"gets anime source"| node_anime
node_catalog -.->|"resolves streams"| node_stream_sources
node_anime -.->|"resolves streams"| node_stream_sources
node_home -->|"renders"| node_continue
node_continue -->|"reads history"| node_history
node_home -->|"renders"| node_watchlist
node_watchlist -->|"uses watchlist data"| node_history
node_home -->|"sets presence"| node_discord
node_discord -->|"updates activity"| node_discord_service
node_app -->|"opens settings"| node_settings
node_settings -->|"uses picker"| node_color
node_settings -->|"generates palette"| node_theme
node_app -->|"applies palette"| node_theme
node_app -->|"renders profile"| node_profile
node_app -->|"renders update"| node_update
node_app -->|"renders title bar"| node_titlebar
node_electron -->|"loads renderer"| node_app

click node_app "https://github.com/synthofficial/streamflix/blob/main/src/renderer/App.tsx"
click node_home "https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/Homepage.tsx"
click node_search "https://github.com/synthofficial/streamflix/blob/main/src/renderer/App.tsx"
click node_catalog "https://github.com/synthofficial/streamflix/blob/main/src/modules/api/Movies.ts"
click node_anime "https://github.com/synthofficial/streamflix/blob/main/src/modules/api/Anime.ts"
click node_metadata "https://github.com/synthofficial/streamflix/blob/main/src/modules/api/Anilist.ts"
click node_tvmaze "https://github.com/synthofficial/streamflix/blob/main/src/modules/api/TVMaze.ts"
click node_trending "https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/tabs/TrendingMovies.tsx"
click node_anime_shelf "https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/tabs/TrendingAnime.tsx"
click node_top "https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/tabs/TopCarousel.tsx"
click node_details "https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/modals/MediaModal.tsx"
click node_context "https://github.com/synthofficial/streamflix/blob/main/src/renderer/contexts/VideoPlayerContext.tsx"
click node_player "https://github.com/synthofficial/streamflix/blob/main/src/components/VideoPlayer.tsx"
click node_history "https://github.com/synthofficial/streamflix/blob/main/src/modules/functions.ts"
click node_continue "https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/tabs/ContinueWatching.tsx"
click node_watchlist "https://github.com/synthofficial/streamflix/blob/main/src/components/Watchlist.tsx"
click node_discord "https://github.com/synthofficial/streamflix/blob/main/src/constants/DiscordRPC.ts"
click node_settings "https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/modals/SettingsModal.tsx"
click node_theme "https://github.com/synthofficial/streamflix/blob/main/src/modules/ThemeUtils.ts"
click node_color "https://github.com/synthofficial/streamflix/blob/main/src/components/ColorPicker.tsx"
click node_profile "https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/modals/ProfileModal.tsx"
click node_update "https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/modals/UpdateModal.tsx"
click node_electron "https://github.com/synthofficial/streamflix/blob/main/src/main/main.ts"
click node_titlebar "https://github.com/synthofficial/streamflix/blob/main/src/components/TitleBar.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_app,node_home,node_viewer,node_discord_service toneBlue
class node_search,node_catalog,node_anime,node_metadata,node_tvmaze,node_trending,node_anime_shelf,node_top,node_details toneAmber
class node_context,node_player,node_history,node_continue,node_watchlist toneMint
class node_discord,node_settings,node_theme,node_color,node_profile,node_update,node_electron,node_titlebar toneRose
class node_stream_sources toneIndigo
```

## Components

### App and navigation

- [App shell](https://github.com/synthofficial/streamflix/blob/main/src/renderer/App.tsx): `src/renderer/App.tsx`
- [Home page](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/Homepage.tsx): `src/renderer/pages/Homepage.tsx`

### Media discovery

- [Media search](https://github.com/synthofficial/streamflix/blob/main/src/renderer/App.tsx): `src/renderer/App.tsx`
- [Catalog providers](https://github.com/synthofficial/streamflix/blob/main/src/modules/api/Movies.ts): `src/modules/api/Movies.ts`
- [Anime catalog](https://github.com/synthofficial/streamflix/blob/main/src/modules/api/Anime.ts): `src/modules/api/Anime.ts`
- [AniList metadata](https://github.com/synthofficial/streamflix/blob/main/src/modules/api/Anilist.ts): `src/modules/api/Anilist.ts`
- [TV episode metadata](https://github.com/synthofficial/streamflix/blob/main/src/modules/api/TVMaze.ts): `src/modules/api/TVMaze.ts`
- [Trending shelves](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/tabs/TrendingMovies.tsx): `src/renderer/pages/tabs/TrendingMovies.tsx`
- [Anime shelf](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/tabs/TrendingAnime.tsx): `src/renderer/pages/tabs/TrendingAnime.tsx`
- [Featured carousel](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/tabs/TopCarousel.tsx): `src/renderer/pages/tabs/TopCarousel.tsx`
- [Media details](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/modals/MediaModal.tsx): `src/renderer/pages/modals/MediaModal.tsx`

### Playback and history

- [Playback state](https://github.com/synthofficial/streamflix/blob/main/src/renderer/contexts/VideoPlayerContext.tsx): `src/renderer/contexts/VideoPlayerContext.tsx`
- [Video player](https://github.com/synthofficial/streamflix/blob/main/src/components/VideoPlayer.tsx): `src/components/VideoPlayer.tsx`
- [Viewing history](https://github.com/synthofficial/streamflix/blob/main/src/modules/functions.ts): `src/modules/functions.ts`
- [Continue watching](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/tabs/ContinueWatching.tsx): `src/renderer/pages/tabs/ContinueWatching.tsx`
- [Watchlist UI](https://github.com/synthofficial/streamflix/blob/main/src/components/Watchlist.tsx): `src/components/Watchlist.tsx`

### Desktop and preferences

- [Discord presence](https://github.com/synthofficial/streamflix/blob/main/src/constants/DiscordRPC.ts): `src/constants/DiscordRPC.ts`
- [Theme settings](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/modals/SettingsModal.tsx): `src/renderer/pages/modals/SettingsModal.tsx`
- [Theme palette](https://github.com/synthofficial/streamflix/blob/main/src/modules/ThemeUtils.ts): `src/modules/ThemeUtils.ts`
- [Color picker](https://github.com/synthofficial/streamflix/blob/main/src/components/ColorPicker.tsx): `src/components/ColorPicker.tsx`
- [Profile modal](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/modals/ProfileModal.tsx): `src/renderer/pages/modals/ProfileModal.tsx`
- [Update modal](https://github.com/synthofficial/streamflix/blob/main/src/renderer/pages/modals/UpdateModal.tsx): `src/renderer/pages/modals/UpdateModal.tsx`
- [Electron main](https://github.com/synthofficial/streamflix/blob/main/src/main/main.ts): `src/main/main.ts`
- [Title bar](https://github.com/synthofficial/streamflix/blob/main/src/components/TitleBar.tsx): `src/components/TitleBar.tsx`

### Other components

- **Viewer**
- **Discord client**
- **Stream providers**

## Connections

- Viewer → App shell: opens (evidence: `README.md`)
- App shell → Media search: handles search (evidence: `src/renderer/App.tsx`)
- Media search → Catalog providers: searches media (evidence: `src/renderer/App.tsx`)
- Catalog providers → Anime catalog: searches anime (evidence: `src/modules/api/Movies.ts`)
- Anime catalog → AniList metadata: fetches metadata (evidence: `src/modules/api/Anime.ts`)
- Catalog providers → TV episode metadata: fetches episode data (evidence: `src/modules/api/Movies.ts`)
- App shell → Home page: renders (evidence: `src/renderer/App.tsx`)
- Home page → Trending shelves: renders (evidence: `src/renderer/pages/Homepage.tsx`)
- Home page → Anime shelf: renders (evidence: `src/renderer/pages/Homepage.tsx`)
- Home page → Featured carousel: renders (evidence: `src/renderer/pages/Homepage.tsx`)
- Trending shelves → Catalog providers: loads titles (evidence: `src/renderer/pages/tabs/TrendingMovies.tsx`)
- Anime shelf → Anime catalog: loads titles (evidence: `src/renderer/pages/tabs/TrendingAnime.tsx`)
- Home page → Media details: opens details (evidence: `src/renderer/pages/Homepage.tsx`)
- Media details → Catalog providers: resolves episodes (evidence: `src/renderer/pages/modals/MediaModal.tsx`)
- Media details → Anime catalog: resolves anime source (evidence: `src/renderer/pages/modals/MediaModal.tsx`)
- Home page → Playback state: sets playback state (evidence: `src/renderer/pages/Homepage.tsx`)
- Home page → Viewing history: records viewing (evidence: `src/renderer/pages/Homepage.tsx`)
- Home page → Video player: shows player (evidence: `src/renderer/App.tsx`)
- Video player → Playback state: reads state (evidence: `src/components/VideoPlayer.tsx`)
- Video player → Catalog providers: gets episode source (evidence: `src/components/VideoPlayer.tsx`)
- Video player → Anime catalog: gets anime source (evidence: `src/components/VideoPlayer.tsx`)
- Catalog providers → Stream providers: resolves streams
- Anime catalog → Stream providers: resolves streams
- Home page → Continue watching: renders (evidence: `src/renderer/pages/Homepage.tsx`)
- Continue watching → Viewing history: reads history (evidence: `src/renderer/pages/tabs/ContinueWatching.tsx`)
- Home page → Watchlist UI: renders (evidence: `src/renderer/pages/Homepage.tsx`)
- Watchlist UI → Viewing history: uses watchlist data (evidence: `src/components/Watchlist.tsx`)
- Home page → Discord presence: sets presence (evidence: `src/renderer/pages/Homepage.tsx`)
- Discord presence → Discord client: updates activity (evidence: `src/constants/DiscordRPC.ts`)
- App shell → Theme settings: opens settings (evidence: `src/renderer/App.tsx`)
- Theme settings → Color picker: uses picker (evidence: `src/renderer/pages/modals/SettingsModal.tsx`)
- Theme settings → Theme palette: generates palette (evidence: `src/renderer/pages/modals/SettingsModal.tsx`)
- App shell → Theme palette: applies palette (evidence: `src/renderer/App.tsx`)
- App shell → Profile modal: renders profile (evidence: `src/renderer/App.tsx`)
- App shell → Update modal: renders update (evidence: `src/renderer/App.tsx`)
- App shell → Title bar: renders title bar (evidence: `src/renderer/App.tsx`)
- Electron main → App shell: loads renderer (evidence: `src/main/main.ts`)
