# kerowagdy100/trackey architecture

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

- Interactive diagram: https://gitdiagram.com/kerowagdy100/trackey
- Repository: https://github.com/kerowagdy100/trackey

## Overview

Trackey is a keyboard-first terminal music player. A user enters through the console application, navigates screens, and can authenticate, browse the library, or download audio; the application coordinates playback and queue controls while the UI refreshes the live display. The graph includes the documented download tools and VLC integration. Source excerpts are partial, so edges for unsampled screen and service behavior are limited to relationships listed in the source index or documented in the README.

Main entry points: [`core/Application.cs`](https://github.com/kerowagdy100/trackey/blob/main/core/Application.cs) (Application), [`screens/HomeScreen.cs`](https://github.com/kerowagdy100/trackey/blob/main/screens/HomeScreen.cs) (Home screen), [`screens/DownloadScreen.cs`](https://github.com/kerowagdy100/trackey/blob/main/screens/DownloadScreen.cs) (Download screen), [`services/DownloadService.cs`](https://github.com/kerowagdy100/trackey/blob/main/services/DownloadService.cs) (Audio download service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application control"]
  node_program["Program entry<br/>[Program.cs]"]
  node_application["Application<br/>[Application.cs]"]
end

subgraph group_screens["Console interaction"]
  node_ui["Live console UI<br/>[Ui.cs]"]
  node_home["Home screen<br/>[HomeScreen.cs]"]
  node_auth["Login and registration<br/>[LoginScreen.cs]"]
  node_forms["Prompt screens<br/>[PromptScreen.cs]"]
  node_downloads_screen["Download screen<br/>[DownloadScreen.cs]"]
  node_library_screen["Library and track views"]
  node_table["Table view and search<br/>[TableViewScreen.cs]"]
  node_screen_base["Screen navigation base<br/>[Screen.cs]"]
end

subgraph group_music["Music and playback"]
  node_player["Audio player<br/>[AudioPlayer.cs]"]
  node_queue["Playback queue<br/>[QueueManager.cs]"]
end

subgraph group_services["Services and persistence"]
  node_library[("Track and playlist library<br/>[Library.cs]")]
  node_download_service["Audio download service<br/>[DownloadService.cs]"]
  node_users[("User authentication<br/>[UserService.cs]")]
  node_paths["Data and tool paths<br/>[Paths.cs]"]
  node_logger["Logging<br/>[Logger.cs]"]
end

subgraph group_shared["Shared components"]
  node_text_input["Text input<br/>[InputText.cs]"]
  node_prompt["Prompt widget<br/>[Prompt.cs]"]
  node_models["Domain and UI records"]
end

node_user(("Listener"))
node_vlc["VLC / libVLC"]
node_ytdlp["yt-dlp"]
node_ffmpeg["ffmpeg"]

node_user -->|"starts"| node_program
node_program -->|"starts"| node_application
node_application -->|"opens"| node_home
node_application -->|"updates"| node_ui
node_ui -->|"renders"| node_screen_base
node_application -->|"controls"| node_player
node_application -->|"advances"| node_queue
node_application -->|"loads and saves"| node_library
node_application -->|"loads and saves"| node_users
node_application -->|"requests downloads"| node_download_service
node_home -->|"opens"| node_auth
node_home -->|"opens"| node_downloads_screen
node_home -->|"opens"| node_library_screen
node_auth -->|"authenticates"| node_users
node_auth -->|"uses"| node_forms
node_forms -->|"renders and handles"| node_prompt
node_prompt -->|"delegates input"| node_text_input
node_library_screen -->|"uses"| node_table
node_table -->|"filters with"| node_text_input
node_downloads_screen -->|"submits download"| node_application
node_downloads_screen -->|"uses"| node_download_service
node_downloads_screen -->|"adds tracks"| node_library
node_library -->|"uses file path"| node_paths
node_users -->|"uses file path"| node_paths
node_player -.->|"plays audio"| node_vlc
node_download_service -.->|"downloads audio"| node_ytdlp
node_download_service -.->|"converts audio"| node_ffmpeg

click node_program "https://github.com/kerowagdy100/trackey/blob/main/Program.cs"
click node_application "https://github.com/kerowagdy100/trackey/blob/main/core/Application.cs"
click node_ui "https://github.com/kerowagdy100/trackey/blob/main/ui/Ui.cs"
click node_home "https://github.com/kerowagdy100/trackey/blob/main/screens/HomeScreen.cs"
click node_auth "https://github.com/kerowagdy100/trackey/blob/main/screens/LoginScreen.cs"
click node_forms "https://github.com/kerowagdy100/trackey/blob/main/screens/PromptScreen.cs"
click node_downloads_screen "https://github.com/kerowagdy100/trackey/blob/main/screens/DownloadScreen.cs"
click node_library_screen "https://github.com/kerowagdy100/trackey/blob/main/screens/LibraryViewScreen.cs"
click node_table "https://github.com/kerowagdy100/trackey/blob/main/screens/TableViewScreen.cs"
click node_screen_base "https://github.com/kerowagdy100/trackey/blob/main/screens/Screen.cs"
click node_player "https://github.com/kerowagdy100/trackey/blob/main/core/AudioPlayer.cs"
click node_queue "https://github.com/kerowagdy100/trackey/blob/main/core/QueueManager.cs"
click node_library "https://github.com/kerowagdy100/trackey/blob/main/services/Library.cs"
click node_download_service "https://github.com/kerowagdy100/trackey/blob/main/services/DownloadService.cs"
click node_users "https://github.com/kerowagdy100/trackey/blob/main/services/UserService.cs"
click node_paths "https://github.com/kerowagdy100/trackey/blob/main/utils/Paths.cs"
click node_logger "https://github.com/kerowagdy100/trackey/blob/main/services/Logger.cs"
click node_text_input "https://github.com/kerowagdy100/trackey/blob/main/ui/InputText.cs"
click node_prompt "https://github.com/kerowagdy100/trackey/blob/main/ui/Prompt.cs"
click node_models "https://github.com/kerowagdy100/trackey/tree/main/models"

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_program,node_application toneBlue
class node_ui,node_home,node_auth,node_forms,node_downloads_screen,node_library_screen,node_table,node_screen_base toneAmber
class node_player,node_queue toneMint
class node_library,node_download_service,node_users,node_paths,node_logger toneRose
class node_text_input,node_prompt,node_models,node_user,node_vlc,node_ytdlp,node_ffmpeg toneIndigo
```

## Components

### Application control

- [Program entry](https://github.com/kerowagdy100/trackey/blob/main/Program.cs): `Program.cs`
- [Application](https://github.com/kerowagdy100/trackey/blob/main/core/Application.cs): `core/Application.cs`

### Console interaction

- [Live console UI](https://github.com/kerowagdy100/trackey/blob/main/ui/Ui.cs): `ui/Ui.cs`
- [Home screen](https://github.com/kerowagdy100/trackey/blob/main/screens/HomeScreen.cs): `screens/HomeScreen.cs`
- [Login and registration](https://github.com/kerowagdy100/trackey/blob/main/screens/LoginScreen.cs): `screens/LoginScreen.cs`
- [Prompt screens](https://github.com/kerowagdy100/trackey/blob/main/screens/PromptScreen.cs): `screens/PromptScreen.cs`
- [Download screen](https://github.com/kerowagdy100/trackey/blob/main/screens/DownloadScreen.cs): `screens/DownloadScreen.cs`
- [Library and track views](https://github.com/kerowagdy100/trackey/blob/main/screens/LibraryViewScreen.cs): `screens/LibraryViewScreen.cs`
- [Table view and search](https://github.com/kerowagdy100/trackey/blob/main/screens/TableViewScreen.cs): `screens/TableViewScreen.cs`
- [Screen navigation base](https://github.com/kerowagdy100/trackey/blob/main/screens/Screen.cs): `screens/Screen.cs`

### Music and playback

- [Audio player](https://github.com/kerowagdy100/trackey/blob/main/core/AudioPlayer.cs): `core/AudioPlayer.cs`
- [Playback queue](https://github.com/kerowagdy100/trackey/blob/main/core/QueueManager.cs): `core/QueueManager.cs`

### Services and persistence

- [Track and playlist library](https://github.com/kerowagdy100/trackey/blob/main/services/Library.cs): `services/Library.cs`
- [Audio download service](https://github.com/kerowagdy100/trackey/blob/main/services/DownloadService.cs): `services/DownloadService.cs`
- [User authentication](https://github.com/kerowagdy100/trackey/blob/main/services/UserService.cs): `services/UserService.cs`
- [Data and tool paths](https://github.com/kerowagdy100/trackey/blob/main/utils/Paths.cs): `utils/Paths.cs`
- [Logging](https://github.com/kerowagdy100/trackey/blob/main/services/Logger.cs): `services/Logger.cs`

### Shared components

- [Text input](https://github.com/kerowagdy100/trackey/blob/main/ui/InputText.cs): `ui/InputText.cs`
- [Prompt widget](https://github.com/kerowagdy100/trackey/blob/main/ui/Prompt.cs): `ui/Prompt.cs`
- [Domain and UI records](https://github.com/kerowagdy100/trackey/tree/main/models): `models`

### Other components

- **Listener**
- **VLC / libVLC**
- **yt-dlp**
- **ffmpeg**

## Connections

- Listener → Program entry: starts (evidence: `README.md`)
- Program entry → Application: starts (evidence: `Program.cs`)
- Application → Home screen: opens (evidence: `core/Application.cs`)
- Application → Live console UI: updates (evidence: `core/Application.cs`)
- Live console UI → Screen navigation base: renders (evidence: `ui/Ui.cs`)
- Application → Audio player: controls (evidence: `core/Application.cs`)
- Application → Playback queue: advances (evidence: `core/Application.cs`)
- Application → Track and playlist library: loads and saves (evidence: `core/Application.cs`)
- Application → User authentication: loads and saves (evidence: `core/Application.cs`)
- Application → Audio download service: requests downloads (evidence: `core/Application.cs`)
- Home screen → Login and registration: opens (evidence: `screens/HomeScreen.cs`)
- Home screen → Download screen: opens (evidence: `screens/HomeScreen.cs`)
- Home screen → Library and track views: opens (evidence: `screens/HomeScreen.cs`)
- Login and registration → User authentication: authenticates (evidence: `screens/LoginScreen.cs`)
- Login and registration → Prompt screens: uses (evidence: `screens/LoginScreen.cs`)
- Prompt screens → Prompt widget: renders and handles (evidence: `screens/PromptScreen.cs`)
- Prompt widget → Text input: delegates input (evidence: `ui/Prompt.cs`)
- Library and track views → Table view and search: uses (evidence: `screens/LibraryViewScreen.cs`)
- Table view and search → Text input: filters with (evidence: `screens/TableViewScreen.cs`)
- Download screen → Application: submits download (evidence: `screens/DownloadScreen.cs`)
- Download screen → Audio download service: uses (evidence: `screens/DownloadScreen.cs`)
- Download screen → Track and playlist library: adds tracks (evidence: `screens/DownloadScreen.cs`)
- Track and playlist library → Data and tool paths: uses file path (evidence: `services/Library.cs`)
- User authentication → Data and tool paths: uses file path (evidence: `services/UserService.cs`)
- Audio player → VLC / libVLC: plays audio (evidence: `README.md`)
- Audio download service → yt-dlp: downloads audio (evidence: `README.md`)
- Audio download service → ffmpeg: converts audio (evidence: `README.md`)
