How dubeykartikay/lazyspotify works
lazyspotify is a terminal Spotify client. Its principal workflow is to authenticate a user, browse or search Spotify’s library, select media, and control playback through a local librespot daemon. The UI is divided into app coordination, authentication, library browsing, and player/display components; internal layers handle Spotify API access and daemon-backed playback. The README documents demos and capabilities, while sampled source and the SOURCE INDEX support only some internal call links, so undocumented relationships are omitted.
Main entry points: model.go TUI coordinator · auth.go Auth orchestration · main.go Program entry · player.go Playback controller
Components 23
Application entry
- Program entry
cmd/lazyspotify/main.go - CLI commands
cli/cli.go
Authentication
- Auth orchestration
core/auth/auth.go - OAuth callback server
core/auth/auth_server.go - OAuth service
core/auth/auth_service.go - Token keyring
core/auth/keyring.go
Terminal interface
- TUI coordinator
ui/v1/app/model.go - Auth screen
ui/v1/auth/update.go - Media center
ui/v1/mediacenter/model.go - Library panels
ui/v1/mediapanel/update.go - Media lists
ui/v1/medialist/update.go - Now playing display
ui/v1/displayscreen/update.go - Player interface
ui/v1/player/view.go
Spotify and playback
- Spotify API client
spotify/client.go - Playback controller
core/player/player.go - Playback API client
librespot/api_client.go - Daemon integration
librespot/librespot.go
Runtime support
- Daemon manager
core/daemon/daemon_manager.go - Daemon process
core/daemon/daemon.go - App configuration
core/utils/app_config.go
Other components
- User
- Spotify service
- Librespot daemon
Connections 26
- User → Program entry: starts
README.md - Program entry → CLI commands: dispatches
cmd/lazyspotify/main.go - Program entry → TUI coordinator: starts TUI
cmd/lazyspotify/main.go - User → Auth screen: authenticates
README.md - TUI coordinator → Auth screen: coordinates
ui/v1/app/model.go - TUI coordinator → Media center: coordinates
ui/v1/app/model.go - Media center → Library panels: uses
ui/v1/mediacenter/model.go - Library panels → Media lists: updates
ui/v1/mediapanel/update.go - TUI coordinator → Now playing display: uses
ui/v1/app/model.go - TUI coordinator → Player interface: uses
ui/v1/app/model.go - Auth screen → Auth orchestration: requests auth
ui/v1/auth/update.go - Auth orchestration → OAuth callback server: starts callback
core/auth/auth.go - Auth orchestration → OAuth service: obtains tokens
core/auth/auth.go - Auth orchestration → Token keyring: reads and saves tokens
core/auth/auth.go - OAuth service → Spotify service: OAuth
- TUI coordinator → Spotify API client: requests library data
ui/v1/app/model.go - Spotify API client → Spotify service: queries API
spotify/client.go - TUI coordinator → Playback controller: controls playback
ui/v1/app/model.go - Playback controller → Daemon integration: initializes
core/player/player.go - Playback controller → Playback API client: sends controls
core/player/player.go - Playback API client → Librespot daemon: HTTP requests
librespot/api_client.go - Daemon integration → Daemon manager: manages daemon
librespot/librespot.go - Daemon manager → Daemon process: starts and monitors
core/daemon/daemon_manager.go - Daemon process → Librespot daemon: runs process
- Program entry → App configuration: validates startup
cmd/lazyspotify/main.go - Auth orchestration → App configuration: reads settings
core/auth/auth.go