$ account TJYSunset
Phocid is a full-featured offline Android music player built with Jetpack Compose and Material3, targeting Android 11+. It serves as a modern replacement for Phonograph, offering extensive customization of themes, artwork colors, layouts, and playback behavior. The application manages a local music library by scanning MediaStore and optionally using JAudioTagger and OpusMetadataIo for advanced metadata extraction. It supports playback via Media3 ExoPlayer with custom shuffle, repeat, speed/pitch control, and a sleep timer. The UI includes a tabbed library view (tracks, albums, artists, genres, folders, playlists), a player screen with artwork, synced lyrics (LRC), and a queue, plus home screen widgets and Android Auto integration. Playlist management features M3U import/export with relative paths and bidirectional sync using file timestamps. The codebase is well-structured with clear separation of concerns: data layer (LibraryIndex, Playlist, Preferences), service layer (PlaybackService, PlayerManager), UI components (custom scrollbar, swipe-to-dismiss, carousel, dialogs), and utility modules (AsyncCache, SaveManager, StateFlow extensions). It includes unit tests for core logic (lyrics parsing, playlist I/O, search, sorting, caching) and uses Kotlinx Serialization for persistence with upgrade paths. The architecture follows a single-activity pattern with Compose navigation and a ViewModel-driven state management. While primarily an application, it contains reusable data engineering patterns such as generic persistence, concurrent caching, and locale-aware sorting that could be extracted for other projects.