# slayingalways/termify architecture

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

- Interactive diagram: https://gitdiagram.com/slayingalways/termify
- Repository: https://github.com/slayingalways/termify

## Overview

Termify is a terminal music player. The main workflow starts with a user searching for a track, then playing it through YouTube stream resolution and the audio player. The UI also coordinates playlists, offline downloads, lyrics, mood-based discovery, listening stats, and playback customization. Edges reflect excerpted calls or README-documented behavior; some secondary capability links are documented rather than confirmed in sampled implementation details.

Main entry points: [`termify/app.py`](https://github.com/slayingalways/termify/blob/main/termify/app.py) (Terminal UI), [`termify/player.py`](https://github.com/slayingalways/termify/blob/main/termify/player.py) (Audio player), [`termify/yt.py`](https://github.com/slayingalways/termify/blob/main/termify/yt.py) (YouTube search), [`termify/lyrics.py`](https://github.com/slayingalways/termify/blob/main/termify/lyrics.py) (Lyrics lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Terminal interface"]
  node_app["Terminal UI<br/>[app.py]"]
  node_themes["Themes<br/>[themes.py]"]
  node_notifications["Notifications<br/>[notify.py]"]
end

subgraph group_discovery["Music discovery"]
  node_youtube["YouTube search<br/>[yt.py]"]
  node_moods["Mood matching<br/>[moods.py]"]
  node_lyrics["Lyrics lookup<br/>[lyrics.py]"]
end

subgraph group_playback["Playback and sound"]
  node_player["Audio player<br/>[player.py]"]
  node_equalizer["Equalizer<br/>[eq.py]"]
end

subgraph group_library["Library and listening"]
  node_store[("Local library<br/>[store.py]")]
  node_importer["Playlist import<br/>[importer.py]"]
  node_stats["Listening stats<br/>[stats.py]"]
end

node_listener(("Listener"))
node_lrclib["LRCLIB"]
node_audio["Audio output"]
node_ffmpeg["FFmpeg"]

node_listener -->|"searches and controls"| node_app
node_app -->|"searches tracks"| node_youtube
node_app -->|"starts playback"| node_player
node_player -->|"resolves stream"| node_youtube
node_player -->|"decodes stream"| node_ffmpeg
node_player -->|"outputs audio"| node_audio
node_app -->|"sets preset"| node_equalizer
node_player -->|"filters audio"| node_equalizer
node_app -->|"matches mood"| node_moods
node_youtube -->|"searches fallback"| node_moods
node_app -->|"requests lyrics"| node_lyrics
node_lyrics -->|"fetches lyrics"| node_lrclib
node_app -->|"loads and saves library"| node_store
node_app -->|"imports playlists"| node_importer
node_app -->|"shows listening stats"| node_stats
node_app -->|"switches theme"| node_themes
node_app -->|"sends notifications"| node_notifications
node_app -->|"persists playback settings"| node_store
node_app -->|"downloads tracks"| node_youtube

click node_app "https://github.com/slayingalways/termify/blob/main/termify/app.py"
click node_themes "https://github.com/slayingalways/termify/blob/main/termify/themes.py"
click node_notifications "https://github.com/slayingalways/termify/blob/main/termify/notify.py"
click node_youtube "https://github.com/slayingalways/termify/blob/main/termify/yt.py"
click node_moods "https://github.com/slayingalways/termify/blob/main/termify/moods.py"
click node_lyrics "https://github.com/slayingalways/termify/blob/main/termify/lyrics.py"
click node_player "https://github.com/slayingalways/termify/blob/main/termify/player.py"
click node_equalizer "https://github.com/slayingalways/termify/blob/main/termify/eq.py"
click node_store "https://github.com/slayingalways/termify/blob/main/termify/store.py"
click node_importer "https://github.com/slayingalways/termify/blob/main/termify/importer.py"
click node_stats "https://github.com/slayingalways/termify/blob/main/termify/stats.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_app,node_themes,node_notifications toneBlue
class node_youtube,node_moods,node_lyrics toneAmber
class node_player,node_equalizer toneMint
class node_store,node_importer,node_stats toneRose
class node_listener,node_lrclib,node_audio,node_ffmpeg toneIndigo
```

## Components

### Terminal interface

- [Terminal UI](https://github.com/slayingalways/termify/blob/main/termify/app.py): `termify/app.py`
- [Themes](https://github.com/slayingalways/termify/blob/main/termify/themes.py): `termify/themes.py`
- [Notifications](https://github.com/slayingalways/termify/blob/main/termify/notify.py): `termify/notify.py`

### Music discovery

- [YouTube search](https://github.com/slayingalways/termify/blob/main/termify/yt.py): `termify/yt.py`
- [Mood matching](https://github.com/slayingalways/termify/blob/main/termify/moods.py): `termify/moods.py`
- [Lyrics lookup](https://github.com/slayingalways/termify/blob/main/termify/lyrics.py): `termify/lyrics.py`

### Playback and sound

- [Audio player](https://github.com/slayingalways/termify/blob/main/termify/player.py): `termify/player.py`
- [Equalizer](https://github.com/slayingalways/termify/blob/main/termify/eq.py): `termify/eq.py`

### Library and listening

- [Local library](https://github.com/slayingalways/termify/blob/main/termify/store.py): `termify/store.py`
- [Playlist import](https://github.com/slayingalways/termify/blob/main/termify/importer.py): `termify/importer.py`
- [Listening stats](https://github.com/slayingalways/termify/blob/main/termify/stats.py): `termify/stats.py`

### Other components

- **Listener**
- **LRCLIB**
- **Audio output**
- **FFmpeg**

## Connections

- Listener → Terminal UI: searches and controls (evidence: `README.md`)
- Terminal UI → YouTube search: searches tracks (evidence: `README.md`)
- Terminal UI → Audio player: starts playback (evidence: `README.md`)
- Audio player → YouTube search: resolves stream (evidence: `termify/player.py`)
- Audio player → FFmpeg: decodes stream (evidence: `README.md`)
- Audio player → Audio output: outputs audio (evidence: `README.md`)
- Terminal UI → Equalizer: sets preset (evidence: `termify/app.py`)
- Audio player → Equalizer: filters audio (evidence: `termify/player.py`)
- Terminal UI → Mood matching: matches mood (evidence: `termify/app.py`)
- YouTube search → Mood matching: searches fallback (evidence: `termify/yt.py`)
- Terminal UI → Lyrics lookup: requests lyrics (evidence: `README.md`)
- Lyrics lookup → LRCLIB: fetches lyrics (evidence: `README.md`)
- Terminal UI → Local library: loads and saves library (evidence: `termify/app.py`)
- Terminal UI → Playlist import: imports playlists (evidence: `README.md`)
- Terminal UI → Listening stats: shows listening stats (evidence: `README.md`)
- Terminal UI → Themes: switches theme (evidence: `termify/app.py`)
- Terminal UI → Notifications: sends notifications (evidence: `README.md`)
- Terminal UI → Local library: persists playback settings (evidence: `README.md`)
- Terminal UI → YouTube search: downloads tracks (evidence: `README.md`)
