Desktop music player on Ruby + Qt with a Spotify-first architecture.
The app follows the same broad pattern as qtimetrap:
Zeitwerkautoloading- small DI container
app/models,app/services,app/view_models,app/views- Qt window wired through a single
MainWindow
- Spotify as the primary music source
- PKCE OAuth login inside the app
- Search tracks through Spotify Web API
- Show current playback state
- Switch active Spotify Connect device
- Show queue and user playlists
- Play / pause and start playback from selected track or playlist
- Source abstraction so other providers can be added later
- Ruby
>= 3.2 - Qt bridge gem:
qt >= 0.1.7 - A Spotify user access token with playback scopes
The app now supports Spotify Authorization Code with PKCE inside the UI. You only need to provide Spotify app metadata:
Create a .env file in the project root:
SPOTIFY_CLIENT_ID=...
SPOTIFY_REDIRECT_URI=http://127.0.0.1:8989/callbackThe redirect URI must also be registered in your Spotify app settings.
Default scopes:
user-read-playback-stateuser-modify-playback-stateuser-read-currently-playingplaylist-read-privateplaylist-read-collaborative
You can still provide SPOTIFY_ACCESS_TOKEN manually, but the intended flow is OAuth from inside the app.
Optional:
SPOTIFY_API_BASE_URL=https://api.spotify.com/v1
SPOTIFY_ACCOUNTS_BASE_URL=https://accounts.spotify.com
LASTFM_API_KEY=...
LASTFM_SECRET=...
YOUFM_ENV=development
YOUFM_THEME=darkdotenv loads .env, .env.local, .env.development, and .env.development.local automatically at boot.
bundle install
bundle exec bin/youfmapp/services/spotify_client.rb: Web API adapterapp/services/spotify_authenticator.rb: PKCE OAuth flow + local callback captureapp/services/spotify_token_store.rb: persisted access/refresh tokensapp/services/music_sources/spotify_source.rb: source abstractionapp/view_models/main_view_model.rb: UI state + actionsapp/views/main_window.rb: Qt windowconfig/application.rb: boot, loader, Qt app