Root Directory
App Module Structure
Theapp/ directory contains the main Android application:
Build Configuration
Source Code Organization
The main package iscom.crowstar.deeztrackermobile located at:
Package Structure
- Overview
- Features
- UI
Key Files and Their Purpose
Entry Point
Navigation
navigation/AppNavigation.kt
Feature-Specific Files
Deezer API Integration
Deezer API Integration
Location:
features/deezer/DeezerApiService.kt- Retrofit interface for Deezer public APIDeezerRepository.kt- Repository pattern wrapperDeezerModels.kt- Data classes for API responses
https://api.deezer.com/Key endpoints:Download Management
Download Management
Location:
features/download/DownloadManager.kt- Singleton orchestrating all downloadsDownloadState.kt- Sealed classes for download states
- Sequential download queue (prevents concurrent downloads)
- Duplicate detection
- MediaStore scanning after download
- Quality selection (FLAC, MP3_320, MP3_128)
- Configurable output directory
Local Music Library
Local Music Library
Location: Playlist storage: JSON in SharedPreferences (
features/localmusic/LocalMusicRepository.kt- MediaStore queriesLocalPlaylistRepository.kt- Custom playlist managementLocalMusicModels.kt- Data classes for local tracks/albumsMetadataEditor.kt- JAudioTagger integration for ID3 editing
playlists pref file)Lyrics
Lyrics
Location: Parsing logic:
features/lyrics/LrcLibApi.kt- LrcLib.net API clientLyricsRepository.kt- Lyrics fetching and cachingLrcParser.kt- LRC format parser with timestamp syncLrcLibModels.kt- API response models
Music Player
Music Player
Location: Media3 integration:
features/player/MusicService.kt- Media3 foreground servicePlayerController.kt- Singleton managing playback statePlayerState.kt- Player state data classCustomBitmapLoader.kt- Album art loading for notifications
MediaControllerfor playback controlMediaSessionfor notification integrationExoPlayerfor audio rendering
Rust FFI (UniFFI)
Rust FFI (UniFFI)
Location: Native library location:
features/rusteer/RustDeezerService.kt- Kotlin wrapper around Rust libraryrusteer.kt- Auto-generated UniFFI bindings
app/src/main/jniLibs/<abi>/librusteer.soSupported ABIs:arm64-v8a(64-bit ARM)armeabi-v7a(32-bit ARM)x86_64(64-bit Intel)x86(32-bit Intel)
Rusteer Library Structure
Therusteer/ directory contains a Rust library that handles Deezer downloads and decryption:
Cargo Dependencies
rusteer/Cargo.toml
Key Rust Files
lib.rs
lib.rs
Library entry point and public API:
rusteer.rs
rusteer.rs
Main download orchestration:
crypto/mod.rs
crypto/mod.rs
Decryption implementation:
tagging.rs
tagging.rs
ID3 and FLAC tagging:
bindings.rs
bindings.rs
UniFFI interface definition:
Resource Organization
res/ Directory
String Resources
Build Outputs
APK Output Location
After building, APKs are located at:app/build.gradle.kts:68-73:
Bundle Output (AAB)
Android App Bundles for Play Store:Configuration Files
Git Configuration
.gitignore
SDK Manager
.sdkmanrc
Directory Guidelines
Next Steps
Architecture
Learn about the MVVM architecture and design patterns
Building
Build and run the application from source