# fabienmillet/wiifin architecture

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

- Interactive diagram: https://gitdiagram.com/fabienmillet/wiifin
- Repository: https://github.com/fabienmillet/wiifin

## Overview

WiiFin is an experimental Jellyfin client for Nintendo Wii. The user connects to a server, browses and searches its libraries, selects media, then plays it with playback controls and server-supplied metadata. Profiles and settings configure that experience; music, photos, remote commands, and controller support are additional product branches. Relationships below rely on the README and shown source/index references; unsampled implementation details are not inferred.

Main entry points: [`source/ui/LibraryView.cpp`](https://github.com/fabienmillet/wiifin/blob/main/source/ui/LibraryView.cpp) (Library view), [`source/core/App.cpp`](https://github.com/fabienmillet/wiifin/blob/main/source/core/App.cpp) (App lifecycle), [`source/player/WiiPlayer.cpp`](https://github.com/fabienmillet/wiifin/blob/main/source/player/WiiPlayer.cpp) (Wii player), [`source/jellyfin/JellyfinClient.cpp`](https://github.com/fabienmillet/wiifin/blob/main/source/jellyfin/JellyfinClient.cpp) (Jellyfin API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and settings"]
  node_entry["Application entry<br/>[main.cpp]"]
  node_appflow["App lifecycle<br/>[App.cpp]"]
  node_profiles["Profiles and settings<br/>[ProfileView.h]"]
  node_connect["Sign-in view<br/>[ConnectView.h]"]
end

subgraph group_browse["Library browsing"]
  node_library["Library view<br/>[LibraryView.cpp]"]
  node_search["Library search<br/>[LibrarySearch.cpp]"]
  node_home["Browse home<br/>[BrowseHome.cpp]"]
  node_librarydraw["Library rendering<br/>[LibraryDraw.h]"]
end

subgraph group_playback["Media playback"]
  node_session["Playback orchestration<br/>[PlaySession.cpp]"]
  node_playerview["Playback controls<br/>[PlayerView.cpp]"]
  node_player["Wii player<br/>[WiiPlayer.cpp]"]
  node_stream["Video streaming<br/>[stream_wiifin.cpp]"]
  node_surface["Video surface<br/>[VideoSurface.cpp]"]
  node_subtitles["Subtitle handling<br/>[Subtitles.h]"]
  node_music["Music player view"]
end

subgraph group_server["Jellyfin services"]
  node_client["Jellyfin API client<br/>[JellyfinClient.cpp]"]
  node_remote["Remote control<br/>[RemoteControl.cpp]"]
  node_tls["TLS interface<br/>[ssl.h]"]
end

subgraph group_platform["Wii interaction"]
  node_inputs["Controller input<br/>[Input.cpp]"]
  node_ui["Shared UI<br/>[Ui.cpp]"]
  node_language["Language support<br/>[Lang.cpp]"]
end

node_user(("Wii user"))
node_jellyfin{{"Jellyfin server"}}
node_wii{{"Wii hardware"}}

node_user -->|"starts"| node_entry
node_entry -->|"starts"| node_appflow
node_appflow -->|"shows sign-in"| node_connect
node_appflow -->|"opens profiles"| node_profiles
node_user -->|"signs in"| node_connect
node_connect -.->|"authenticates"| node_client
node_client -->|"requests library data"| node_jellyfin
node_library -->|"loads library data"| node_client
node_home -.->|"opens browsing"| node_library
node_search -->|"sets result state"| node_library
node_library -->|"renders with"| node_librarydraw
node_library -->|"requests playback"| node_session
node_session -->|"loads media details"| node_client
node_session -->|"controls playback"| node_player
node_player -.->|"reads stream"| node_stream
node_playerview -->|"controls playback"| node_player
node_playerview -->|"reads cues"| node_subtitles
node_player -.->|"outputs video"| node_surface
node_music -.->|"uses audio playback"| node_player
node_music -->|"uses remote commands"| node_remote
node_remote -->|"exchanges commands"| node_jellyfin
node_remote -->|"queues playback commands"| node_session
node_wii -->|"provides controls"| node_inputs
node_inputs -->|"drives navigation"| node_library
node_inputs -->|"drives controls"| node_playerview
node_appflow -->|"configures interface"| node_ui
node_library -->|"draws screens"| node_ui
node_playerview -->|"draws controls"| node_ui
node_appflow -.->|"configures language"| node_language
node_client -.->|"uses HTTPS"| node_tls

click node_entry "https://github.com/fabienmillet/wiifin/blob/main/source/main.cpp"
click node_appflow "https://github.com/fabienmillet/wiifin/blob/main/source/core/App.cpp"
click node_profiles "https://github.com/fabienmillet/wiifin/blob/main/source/ui/ProfileView.h"
click node_connect "https://github.com/fabienmillet/wiifin/blob/main/source/ui/ConnectView.h"
click node_library "https://github.com/fabienmillet/wiifin/blob/main/source/ui/LibraryView.cpp"
click node_search "https://github.com/fabienmillet/wiifin/blob/main/source/ui/LibrarySearch.cpp"
click node_home "https://github.com/fabienmillet/wiifin/blob/main/source/ui/BrowseHome.cpp"
click node_librarydraw "https://github.com/fabienmillet/wiifin/blob/main/source/ui/LibraryDraw.h"
click node_client "https://github.com/fabienmillet/wiifin/blob/main/source/jellyfin/JellyfinClient.cpp"
click node_remote "https://github.com/fabienmillet/wiifin/blob/main/source/jellyfin/RemoteControl.cpp"
click node_session "https://github.com/fabienmillet/wiifin/blob/main/source/core/PlaySession.cpp"
click node_playerview "https://github.com/fabienmillet/wiifin/blob/main/source/player/PlayerView.cpp"
click node_player "https://github.com/fabienmillet/wiifin/blob/main/source/player/WiiPlayer.cpp"
click node_stream "https://github.com/fabienmillet/wiifin/blob/main/source/player/stream_wiifin.cpp"
click node_surface "https://github.com/fabienmillet/wiifin/blob/main/source/player/VideoSurface.cpp"
click node_subtitles "https://github.com/fabienmillet/wiifin/blob/main/source/player/Subtitles.h"
click node_music "https://github.com/fabienmillet/wiifin/blob/main/source/ui/MusicPlayerView.cpp"
click node_inputs "https://github.com/fabienmillet/wiifin/blob/main/source/input/Input.cpp"
click node_ui "https://github.com/fabienmillet/wiifin/blob/main/source/ui/Ui.cpp"
click node_language "https://github.com/fabienmillet/wiifin/blob/main/source/core/Lang.cpp"
click node_tls "https://github.com/fabienmillet/wiifin/blob/main/libs/mbedtls/include/mbedtls/ssl.h"

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_appflow,node_profiles,node_connect,node_user toneBlue
class node_library,node_search,node_home,node_librarydraw toneAmber
class node_session,node_playerview,node_player,node_stream,node_surface,node_subtitles,node_music,node_jellyfin toneMint
class node_client,node_remote,node_tls toneRose
class node_inputs,node_ui,node_language,node_wii toneIndigo
```

## Components

### App and settings

- [Application entry](https://github.com/fabienmillet/wiifin/blob/main/source/main.cpp): `source/main.cpp`
- [App lifecycle](https://github.com/fabienmillet/wiifin/blob/main/source/core/App.cpp): `source/core/App.cpp`
- [Profiles and settings](https://github.com/fabienmillet/wiifin/blob/main/source/ui/ProfileView.h): `source/ui/ProfileView.h`
- [Sign-in view](https://github.com/fabienmillet/wiifin/blob/main/source/ui/ConnectView.h): `source/ui/ConnectView.h`

### Library browsing

- [Library view](https://github.com/fabienmillet/wiifin/blob/main/source/ui/LibraryView.cpp): `source/ui/LibraryView.cpp`
- [Library search](https://github.com/fabienmillet/wiifin/blob/main/source/ui/LibrarySearch.cpp): `source/ui/LibrarySearch.cpp`
- [Browse home](https://github.com/fabienmillet/wiifin/blob/main/source/ui/BrowseHome.cpp): `source/ui/BrowseHome.cpp`
- [Library rendering](https://github.com/fabienmillet/wiifin/blob/main/source/ui/LibraryDraw.h): `source/ui/LibraryDraw.h`

### Media playback

- [Playback orchestration](https://github.com/fabienmillet/wiifin/blob/main/source/core/PlaySession.cpp): `source/core/PlaySession.cpp`
- [Playback controls](https://github.com/fabienmillet/wiifin/blob/main/source/player/PlayerView.cpp): `source/player/PlayerView.cpp`
- [Wii player](https://github.com/fabienmillet/wiifin/blob/main/source/player/WiiPlayer.cpp): `source/player/WiiPlayer.cpp`
- [Video streaming](https://github.com/fabienmillet/wiifin/blob/main/source/player/stream_wiifin.cpp): `source/player/stream_wiifin.cpp`
- [Video surface](https://github.com/fabienmillet/wiifin/blob/main/source/player/VideoSurface.cpp): `source/player/VideoSurface.cpp`
- [Subtitle handling](https://github.com/fabienmillet/wiifin/blob/main/source/player/Subtitles.h): `source/player/Subtitles.h`
- [Music player view](https://github.com/fabienmillet/wiifin/blob/main/source/ui/MusicPlayerView.cpp): `source/ui/MusicPlayerView.cpp`

### Jellyfin services

- [Jellyfin API client](https://github.com/fabienmillet/wiifin/blob/main/source/jellyfin/JellyfinClient.cpp): `source/jellyfin/JellyfinClient.cpp`
- [Remote control](https://github.com/fabienmillet/wiifin/blob/main/source/jellyfin/RemoteControl.cpp): `source/jellyfin/RemoteControl.cpp`
- [TLS interface](https://github.com/fabienmillet/wiifin/blob/main/libs/mbedtls/include/mbedtls/ssl.h): `libs/mbedtls/include/mbedtls/ssl.h`

### Wii interaction

- [Controller input](https://github.com/fabienmillet/wiifin/blob/main/source/input/Input.cpp): `source/input/Input.cpp`
- [Shared UI](https://github.com/fabienmillet/wiifin/blob/main/source/ui/Ui.cpp): `source/ui/Ui.cpp`
- [Language support](https://github.com/fabienmillet/wiifin/blob/main/source/core/Lang.cpp): `source/core/Lang.cpp`

### Other components

- **Wii user**
- **Jellyfin server**
- **Wii hardware**

## Connections

- Wii user → Application entry: starts (evidence: `README.md`)
- Application entry → App lifecycle: starts (evidence: `source/main.cpp`)
- App lifecycle → Sign-in view: shows sign-in (evidence: `source/core/App.cpp`)
- App lifecycle → Profiles and settings: opens profiles (evidence: `source/core/App.cpp`)
- Wii user → Sign-in view: signs in (evidence: `README.md`)
- Sign-in view → Jellyfin API client: authenticates
- Jellyfin API client → Jellyfin server: requests library data (evidence: `README.md`)
- Library view → Jellyfin API client: loads library data (evidence: `source/ui/LibraryView.cpp`)
- Browse home → Library view: opens browsing
- Library search → Library view: sets result state (evidence: `source/ui/LibrarySearch.cpp`)
- Library view → Library rendering: renders with (evidence: `source/ui/LibraryView.cpp`)
- Library view → Playback orchestration: requests playback (evidence: `source/core/PlaySession.cpp`)
- Playback orchestration → Jellyfin API client: loads media details (evidence: `source/core/PlaySession.cpp`)
- Playback orchestration → Wii player: controls playback (evidence: `source/core/PlaySession.cpp`)
- Wii player → Video streaming: reads stream
- Playback controls → Wii player: controls playback (evidence: `source/player/PlayerView.cpp`)
- Playback controls → Subtitle handling: reads cues (evidence: `source/player/PlayerView.cpp`)
- Wii player → Video surface: outputs video
- Music player view → Wii player: uses audio playback
- Music player view → Remote control: uses remote commands (evidence: `source/ui/MusicPlayerView.cpp`)
- Remote control → Jellyfin server: exchanges commands
- Remote control → Playback orchestration: queues playback commands
- Wii hardware → Controller input: provides controls
- Controller input → Library view: drives navigation
- Controller input → Playback controls: drives controls (evidence: `source/player/PlayerView.cpp`)
- App lifecycle → Shared UI: configures interface (evidence: `source/core/App.cpp`)
- Library view → Shared UI: draws screens (evidence: `source/ui/LibraryView.cpp`)
- Playback controls → Shared UI: draws controls (evidence: `source/player/PlayerView.cpp`)
- App lifecycle → Language support: configures language
- Jellyfin API client → TLS interface: uses HTTPS
