$ show KRTirtho/spotube
Spotube is a cross-platform, open-source Spotify client built with Flutter. It provides a full-featured music player experience without requiring a Spotify Premium subscription by leveraging plugin-based metadata providers and audio sources (YouTube, Piped, Invidious, JioSaavn, etc.). The application supports local playback, playlist management, lyrics (synced and plain), downloads, scrobbling (Last.fm), remote device control via WebSocket, and extensive customization (themes, layouts, audio quality). It uses Riverpod for state management, auto_route for navigation, drift for local SQLite storage, and media_kit for audio playback. The architecture is modular with a plugin system for metadata and audio sources, making it extensible. The codebase is well-structured with reusable patterns like pagination mixins, universal image loading, and type converters. It is actively maintained with nightly builds and a large community.
The LLM identified 4 files worth highlighting for reuse:
Provides a generic PaginatedAsyncNotifierMixin that can be mixed into Riverpod notifiers to handle paginated data fetching with loading, error, and data states. It abstracts cursor-based or offset-based pagination and is reusable across any paginated API endpoint.
Extends the pagination pattern to Riverpod family providers, allowing paginated data fetching parameterized by an argument (e.g., playlist ID). Includes AutoDisposeFamilyPaginatedAsyncNotifier for automatic disposal. This pattern can be extracted and reused in any Flutter app needing paginated family providers.
A Flutter widget that loads images from multiple sources (network, assets, file) with caching and fallback support. It handles different image providers and provides a consistent interface for displaying album art, user avatars, etc. The component is self-contained and can be reused in any Flutter project needing robust image loading.
A Drift type converter that automatically encrypts and decrypts string values when storing to and reading from the database. It uses platform-specific secure storage (e.g., flutter_secure_storage) to protect sensitive data like authentication tokens. This pattern is reusable for any Drift-based app requiring encrypted fields.