# radiorauschen/kessler architecture

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

- Interactive diagram: https://gitdiagram.com/radiorauschen/kessler
- Repository: https://github.com/radiorauschen/kessler

## Overview

kessler is a desktop music player and library manager, with optional radio, podcasts, classic-iPod sync, and Last.fm support. The main workflow is user interaction through the GUI, with local music scanned and imported into SQLite, then selected for playback; separate branches handle radio streams, podcast episodes, and iPod synchronization. The graph preserves README capabilities and SOURCE INDEX core modules. Some unsampled subsystems are represented by their exact source paths; their internal connections are omitted unless README or indexed references support them.

Main entry points: [`src/gui/library.rs`](https://github.com/radiorauschen/kessler/blob/main/src/gui/library.rs) (Library window), [`src/main.rs`](https://github.com/radiorauschen/kessler/blob/main/src/main.rs) (CLI and startup), [`src/db/mod.rs`](https://github.com/radiorauschen/kessler/blob/main/src/db/mod.rs) (SQLite library), [`src/player/mod.rs`](https://github.com/radiorauschen/kessler/blob/main/src/player/mod.rs) (Playback control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_entry["CLI and startup<br/>[main.rs]"]
  node_window["Library window<br/>[library.rs]"]
  node_settings["Configuration<br/>[config.rs]"]
  node_translations["Translations<br/>[mod.rs]"]
  node_media["Media controls<br/>[mod.rs]"]
end

subgraph group_library["Music library"]
  node_import["Library import<br/>[import.rs]"]
  node_scanner["Folder scanner<br/>[scanner.rs]"]
  node_metadata["Tags and metadata<br/>[metadata.rs]"]
  node_artwork["Artwork lookup<br/>[artwork.rs]"]
  node_coverart["Cover services<br/>[coverart.rs]"]
  node_artistinfo["Artist information<br/>[artistinfo.rs]"]
  node_database[("SQLite library<br/>[mod.rs]")]
  node_models["Library records<br/>[models.rs]"]
end

subgraph group_playback["Playback"]
  node_player["Playback control<br/>[mod.rs]"]
  node_audio["Audio engine<br/>[audio.rs]"]
  node_equalizer["Equalizer<br/>[eq.rs]"]
end

subgraph group_services["Optional services"]
  node_radio["Radio<br/>[mod.rs]"]
  node_podcasts["Podcasts<br/>[mod.rs]"]
  node_lyrics["Lyrics<br/>[lyrics.rs]"]
  node_lastfm["Last.fm<br/>[mod.rs]"]
end

subgraph group_device["Device sync"]
  node_ipod["iPod sync<br/>[sync.rs]"]
  node_deviceinfo["iPod device data<br/>[device_info.rs]"]
end

node_user(("Listener"))

node_user -->|"starts"| node_entry
node_entry -->|"opens"| node_window
node_entry -->|"runs scan"| node_scanner
node_entry -->|"opens"| node_database
node_entry -->|"dispatches sync"| node_ipod
node_entry -->|"registers controls"| node_media
node_entry -->|"loads"| node_lastfm
node_user -->|"browses and controls"| node_window
node_window -->|"reads library"| node_database
node_window -->|"controls playback"| node_player
node_window -->|"uses preferences"| node_settings
node_window -->|"offers radio"| node_radio
node_window -->|"offers podcasts"| node_podcasts
node_window -->|"shows device"| node_ipod
node_window -->|"shows artist details"| node_artistinfo
node_window -->|"shows lyrics"| node_lyrics
node_window -->|"offers equalizer"| node_equalizer
node_scanner -->|"scans folders"| node_import
node_import -->|"reads tags"| node_metadata
node_import -->|"updates records"| node_database
node_scanner -->|"records tracks"| node_database
node_database -->|"stores records"| node_models
node_player -->|"drives engine"| node_audio
node_player -->|"uses processing"| node_equalizer
node_player -.->|"loads tracks"| node_database
node_radio -.->|"plays streams"| node_player
node_podcasts -->|"plays episodes"| node_player
node_ipod -->|"reads device"| node_deviceinfo
node_ipod -->|"syncs library"| node_database
node_window -->|"scrobbles playback"| node_lastfm
node_window -->|"localizes labels"| node_translations
node_user -->|"uses media keys"| node_media
node_user -->|"requests missing covers"| node_artwork
node_artwork -->|"looks up covers"| node_coverart
node_user -->|"opens artist column"| node_artistinfo
node_user -->|"enables and selects"| node_radio
node_user -->|"follows a feed"| node_podcasts
node_user -->|"syncs device"| node_ipod
node_user -->|"signs in"| node_lastfm

click node_entry "https://github.com/radiorauschen/kessler/blob/main/src/main.rs"
click node_window "https://github.com/radiorauschen/kessler/blob/main/src/gui/library.rs"
click node_settings "https://github.com/radiorauschen/kessler/blob/main/src/config.rs"
click node_translations "https://github.com/radiorauschen/kessler/blob/main/src/lang/mod.rs"
click node_import "https://github.com/radiorauschen/kessler/blob/main/src/library/import.rs"
click node_scanner "https://github.com/radiorauschen/kessler/blob/main/src/library/scanner.rs"
click node_metadata "https://github.com/radiorauschen/kessler/blob/main/src/library/metadata.rs"
click node_artwork "https://github.com/radiorauschen/kessler/blob/main/src/library/artwork.rs"
click node_coverart "https://github.com/radiorauschen/kessler/blob/main/src/library/coverart.rs"
click node_artistinfo "https://github.com/radiorauschen/kessler/blob/main/src/library/artistinfo.rs"
click node_database "https://github.com/radiorauschen/kessler/blob/main/src/db/mod.rs"
click node_models "https://github.com/radiorauschen/kessler/blob/main/src/db/models.rs"
click node_player "https://github.com/radiorauschen/kessler/blob/main/src/player/mod.rs"
click node_audio "https://github.com/radiorauschen/kessler/blob/main/src/player/audio.rs"
click node_equalizer "https://github.com/radiorauschen/kessler/blob/main/src/player/eq.rs"
click node_radio "https://github.com/radiorauschen/kessler/blob/main/src/radio/mod.rs"
click node_podcasts "https://github.com/radiorauschen/kessler/blob/main/src/podcast/mod.rs"
click node_lyrics "https://github.com/radiorauschen/kessler/blob/main/src/library/lyrics.rs"
click node_ipod "https://github.com/radiorauschen/kessler/blob/main/src/ipod/sync.rs"
click node_deviceinfo "https://github.com/radiorauschen/kessler/blob/main/src/ipod/device_info.rs"
click node_lastfm "https://github.com/radiorauschen/kessler/blob/main/src/lastfm/mod.rs"
click node_media "https://github.com/radiorauschen/kessler/blob/main/src/media/mod.rs"

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_window,node_settings,node_translations,node_media toneBlue
class node_import,node_scanner,node_metadata,node_artwork,node_coverart,node_artistinfo,node_database,node_models toneAmber
class node_player,node_audio,node_equalizer toneMint
class node_radio,node_podcasts,node_lyrics,node_lastfm toneRose
class node_ipod,node_deviceinfo,node_user toneIndigo
```

## Components

### Application

- [CLI and startup](https://github.com/radiorauschen/kessler/blob/main/src/main.rs): `src/main.rs`
- [Library window](https://github.com/radiorauschen/kessler/blob/main/src/gui/library.rs): `src/gui/library.rs`
- [Configuration](https://github.com/radiorauschen/kessler/blob/main/src/config.rs): `src/config.rs`
- [Translations](https://github.com/radiorauschen/kessler/blob/main/src/lang/mod.rs): `src/lang/mod.rs`
- [Media controls](https://github.com/radiorauschen/kessler/blob/main/src/media/mod.rs): `src/media/mod.rs`

### Music library

- [Library import](https://github.com/radiorauschen/kessler/blob/main/src/library/import.rs): `src/library/import.rs`
- [Folder scanner](https://github.com/radiorauschen/kessler/blob/main/src/library/scanner.rs): `src/library/scanner.rs`
- [Tags and metadata](https://github.com/radiorauschen/kessler/blob/main/src/library/metadata.rs): `src/library/metadata.rs`
- [Artwork lookup](https://github.com/radiorauschen/kessler/blob/main/src/library/artwork.rs): `src/library/artwork.rs`
- [Cover services](https://github.com/radiorauschen/kessler/blob/main/src/library/coverart.rs): `src/library/coverart.rs`
- [Artist information](https://github.com/radiorauschen/kessler/blob/main/src/library/artistinfo.rs): `src/library/artistinfo.rs`
- [SQLite library](https://github.com/radiorauschen/kessler/blob/main/src/db/mod.rs): `src/db/mod.rs`
- [Library records](https://github.com/radiorauschen/kessler/blob/main/src/db/models.rs): `src/db/models.rs`

### Playback

- [Playback control](https://github.com/radiorauschen/kessler/blob/main/src/player/mod.rs): `src/player/mod.rs`
- [Audio engine](https://github.com/radiorauschen/kessler/blob/main/src/player/audio.rs): `src/player/audio.rs`
- [Equalizer](https://github.com/radiorauschen/kessler/blob/main/src/player/eq.rs): `src/player/eq.rs`

### Optional services

- [Radio](https://github.com/radiorauschen/kessler/blob/main/src/radio/mod.rs): `src/radio/mod.rs`
- [Podcasts](https://github.com/radiorauschen/kessler/blob/main/src/podcast/mod.rs): `src/podcast/mod.rs`
- [Lyrics](https://github.com/radiorauschen/kessler/blob/main/src/library/lyrics.rs): `src/library/lyrics.rs`
- [Last.fm](https://github.com/radiorauschen/kessler/blob/main/src/lastfm/mod.rs): `src/lastfm/mod.rs`

### Device sync

- [iPod sync](https://github.com/radiorauschen/kessler/blob/main/src/ipod/sync.rs): `src/ipod/sync.rs`
- [iPod device data](https://github.com/radiorauschen/kessler/blob/main/src/ipod/device_info.rs): `src/ipod/device_info.rs`

### Other components

- **Listener**

## Connections

- Listener → CLI and startup: starts
- CLI and startup → Library window: opens (evidence: `src/main.rs`)
- CLI and startup → Folder scanner: runs scan (evidence: `src/main.rs`)
- CLI and startup → SQLite library: opens (evidence: `src/main.rs`)
- CLI and startup → iPod sync: dispatches sync (evidence: `src/main.rs`)
- CLI and startup → Media controls: registers controls (evidence: `src/main.rs`)
- CLI and startup → Last.fm: loads (evidence: `src/main.rs`)
- Listener → Library window: browses and controls
- Library window → SQLite library: reads library (evidence: `src/gui/mod.rs`)
- Library window → Playback control: controls playback (evidence: `src/gui/mod.rs`)
- Library window → Configuration: uses preferences (evidence: `src/gui/mod.rs`)
- Library window → Radio: offers radio
- Library window → Podcasts: offers podcasts (evidence: `src/gui/app/podcasts.rs`)
- Library window → iPod sync: shows device (evidence: `src/gui/mod.rs`)
- Library window → Artist information: shows artist details
- Library window → Lyrics: shows lyrics
- Library window → Equalizer: offers equalizer
- Folder scanner → Library import: scans folders (evidence: `src/library/scanner.rs`)
- Library import → Tags and metadata: reads tags (evidence: `src/library/import.rs`)
- Library import → SQLite library: updates records (evidence: `src/library/import.rs`)
- Folder scanner → SQLite library: records tracks (evidence: `src/library/scanner.rs`)
- SQLite library → Library records: stores records (evidence: `src/db/mod.rs`)
- Playback control → Audio engine: drives engine (evidence: `src/player/mod.rs`)
- Playback control → Equalizer: uses processing (evidence: `src/player/mod.rs`)
- Playback control → SQLite library: loads tracks
- Radio → Playback control: plays streams
- Podcasts → Playback control: plays episodes (evidence: `src/gui/app/podcasts.rs`)
- iPod sync → iPod device data: reads device (evidence: `src/ipod/mod.rs`)
- iPod sync → SQLite library: syncs library (evidence: `src/ipod/sync.rs`)
- Library window → Last.fm: scrobbles playback (evidence: `src/gui/mod.rs`)
- Library window → Translations: localizes labels (evidence: `src/gui/mod.rs`)
- Listener → Media controls: uses media keys
- Listener → Artwork lookup: requests missing covers
- Artwork lookup → Cover services: looks up covers (evidence: `src/library/artistinfo.rs`)
- Listener → Artist information: opens artist column
- Listener → Radio: enables and selects
- Listener → Podcasts: follows a feed
- Listener → iPod sync: syncs device
- Listener → Last.fm: signs in
