How serptail/gamut works
gamut is an Android music-streaming app. Users discover or search for tracks, start playback, build a library, download music for offline use, and optionally sync favorites, playlists, and artist follows across devices; song recognition and Android Auto are additional capabilities. The graph preserves those product stages and the playback, persistence, and sync layers. Several feature implementations are represented by their exact source directories because their wiring was not sampled; links are limited to README documentation or relationships visible in the source index and excerpts.
Main entry points: TrackDownloadManager.kt Offline downloads · MainActivity.kt App entry · SyncEngine.kt Cloud sync · ShazamSession.kt Song recognition
Components 24
App and experience
- App entry
app/src/main/kotlin/com/gamut/MainActivity.kt
Discovery and recognition
- Discover feed
feature/feature-search/src/main/kotlin/com/gamut/feature/search/DiscoverRepository.kt - Track search
feature/feature-search/src/main/kotlin/com/gamut/feature/search/SearchRepository.kt - Music catalogs
core/core-network/src/main/kotlin/com/gamut/core/network/DeezerChartsApi.kt - Song recognition
feature/feature-search/src/main/kotlin/com/gamut/feature/search/ShazamSession.kt - Recognition service
app/src/main/kotlin/com/gamut/ShazamListenService.kt - Shazam client
core/core-network/src/main/kotlin/com/gamut/core/network/ShazamClient.kt
Playback and offline
- Source resolution
feature/feature-resolver/src/main/kotlin/com/gamut/feature/resolver/ResolveTrackSourceUseCase.kt - YouTube extractor
feature/feature-resolver/src/main/kotlin/com/gamut/feature/resolver/NewPipeYoutubeSource.kt - Player interface
feature/feature-player-ui/src/main/kotlin/com/gamut/feature/playerui/PlayerScreen.kt - Music player
core/core-player/src/main/kotlin/com/gamut/core/player/Media3MusicPlayer.kt - Media session
core/core-player/src/main/kotlin/com/gamut/core/player/GamutMediaSessionService.kt - Audio effects
core/core-player/src/main/kotlin/com/gamut/core/player/SoundEngineProcessor.kt - Offline downloads
feature/feature-resolver/src/main/kotlin/com/gamut/feature/resolver/TrackDownloadManager.kt - Download service
feature/feature-resolver/src/main/kotlin/com/gamut/feature/resolver/DownloadService.kt - Storage settings
feature/feature-resolver/src/main/kotlin/com/gamut/feature/resolver/StorageSettings.kt
Library and sync
- Library and playlists
feature/feature-library/src/main/kotlin/com/gamut/feature/library/LibraryRepository.kt - Local music
feature/feature-library/src/main/kotlin/com/gamut/feature/library/LocalMusicScreen.kt - App database
core/core-database/src/main/kotlin/com/gamut/core/database/GamutDatabase.kt - Download index
core/core-database/src/main/kotlin/com/gamut/core/database/DownloadIndex.kt - Cloud sync
core/core-sync/src/main/kotlin/com/gamut/core/sync/SyncEngine.kt - Account sign-in
core/core-sync/src/main/kotlin/com/gamut/core/sync/AuthRepository.kt
Other components
- Listener
- Supabase
Connections 27
- Listener → App entry: opens app
README.md - App entry → Discover feed: browses
README.md - App entry → Track search: searches
README.md - Discover feed → Music catalogs: loads charts
- Track search → YouTube extractor: searches tracks
feature/feature-search/src/main/kotlin/com/gamut/feature/search/SearchRepository.kt - Listener → Song recognition: identifies music
README.md - Song recognition → Recognition service: uses service
app/src/main/kotlin/com/gamut/ShazamListenService.kt - Shazam client → Song recognition: supports sessions
- Listener → Player interface: selects track
README.md - Player interface → Source resolution: resolves track
- Source resolution → YouTube extractor: resolves stream
- YouTube extractor → Music player: provides stream
README.md - Music player → Audio effects: processes audio
README.md - Media session → Music player: controls playback
core/core-player/src/main/kotlin/com/gamut/core/player/GamutMediaSessionService.kt - Listener → Library and playlists: builds library
README.md - Library and playlists → App database: stores library
README.md - Listener → Local music: browses device music
README.md - Listener → Offline downloads: downloads tracks
README.md - Offline downloads → Source resolution: resolves download
feature/feature-resolver/src/main/kotlin/com/gamut/feature/resolver/TrackDownloadManager.kt - Offline downloads → Download index: records downloads
feature/feature-resolver/src/main/kotlin/com/gamut/feature/resolver/TrackDownloadManager.kt - Download service → Offline downloads: observes batch
feature/feature-resolver/src/main/kotlin/com/gamut/feature/resolver/DownloadService.kt - Download index → App database: reads database
core/core-database/src/main/kotlin/com/gamut/core/database/DownloadIndex.kt - Listener → Account sign-in: signs in optionally
README.md - Account sign-in → Cloud sync: authenticates sync
- Cloud sync → Supabase: syncs library
README.md - Cloud sync → App database: syncs local data
core/core-sync/src/main/kotlin/com/gamut/core/sync/SyncManager.kt - Listener → Storage settings: sets download options
README.md