A Flutter music streaming application built with Clean Architecture and Provider state management.
This project follows Clean Architecture principles, separating the codebase into three main layers:
- Entities: Plain Dart objects representing core business models
- Repositories: Abstract interfaces defining data operations
- Use Cases: Single-purpose classes containing business logic
- Data Sources: Remote (API) and Local (Cache) data sources
- Models: Data transfer objects with JSON serialization
- Repository Implementations: Concrete implementations of domain repositories
- Pages: Full-screen widgets representing app screens
- Widgets: Reusable UI components
- Providers: State management using Provider/ChangeNotifier
lib/
βββ core/ # Core app functionality
β βββ constants/ # App-wide constants
β β βββ api_constants.dart
β β βββ app_constants.dart
β βββ di/ # Dependency Injection
β β βββ injection_container.dart
β βββ errors/ # Error handling
β β βββ exceptions.dart
β β βββ failures.dart
β βββ navigation/ # Routing
β β βββ app_router.dart
β βββ network/ # Network layer
β β βββ api_client.dart
β β βββ network_info.dart
β βββ themes/ # App themes
β β βββ app_theme.dart
β βββ usecases/ # Base use case
β β βββ usecase.dart
β βββ utils/ # Utility functions
β β βββ date_formatter.dart
β β βββ permission_helper.dart
β β βββ validators.dart
β βββ widgets/ # Shared widgets
β
βββ features/ # Feature modules
β βββ auth/ # Authentication feature
β β βββ data/
β β β βββ datasources/
β β β βββ models/
β β β βββ repositories/
β β βββ domain/
β β β βββ entities/ # user.dart
β β β βββ repositories/ # auth_repository.dart
β β β βββ usecases/ # login_usecase.dart
β β βββ presentation/
β β βββ pages/
β β βββ providers/ # auth_provider.dart
β β βββ widgets/
β β
β βββ onboarding/ # Onboarding feature
β βββ home/ # Home feature
β βββ player/ # Music player feature
β βββ search/ # Search feature
β βββ library/ # Library feature
β
βββ main.dart # App entry point
- Font: Manrope (official app font)
- Theme: Dark mode optimized for music streaming
- Responsive: Uses
flutter_screenutilfor responsive sizing - Colors: Custom color palette inspired by modern music apps
provider- State management solution
go_router- Declarative routing
just_audio- Audio playbackaudio_service- Background audio serviceaudio_session- Audio session management
dio- HTTP clienthttp- Additional HTTP support
shared_preferences- Simple key-value storageflutter_secure_storage- Secure storage for tokenshive- NoSQL database
flutter_screenutil- Responsive sizinggoogle_fonts- Manrope font familycached_network_image- Image cachingshimmer- Loading skeletonlottie- Animations
permission_handler- Runtime permissionsconnectivity_plus- Network connectivitypath_provider- File system pathsget_it- Dependency injectiondartz- Functional programmingequatable- Value equalitylogger- Logging
- Internet & Network access
- Storage (Read/Write)
- Audio & Media playback
- Foreground service
- Notifications
- Camera (for profile pictures)
- Camera access
- Photo library access
- Media library access
- Notifications
- Background audio playback
- Flutter SDK (^3.10.4)
- Dart SDK
- Android Studio / Xcode
-
Clone the repository
git clone <repository-url> cd streamvybe
-
Install dependencies
flutter pub get
-
Run code generation (if needed)
flutter pub run build_runner build --delete-conflicting-outputs
-
Run the app
flutter run
-
Create feature folder structure:
lib/features/your_feature/ βββ data/ β βββ datasources/ β βββ models/ β βββ repositories/ βββ domain/ β βββ entities/ β βββ repositories/ β βββ usecases/ βββ presentation/ βββ pages/ βββ providers/ βββ widgets/ -
Domain Layer First:
- Define entities
- Create repository interface
- Implement use cases
-
Data Layer:
- Create data models
- Implement data sources
- Implement repository
-
Presentation Layer:
- Create providers
- Build UI pages
- Create reusable widgets
-
Register in DI:
- Add dependencies to
injection_container.dart
- Add dependencies to
This project uses Provider for state management:
// 1. Create Provider
class YourProvider with ChangeNotifier {
// State and methods
void updateState() {
notifyListeners();
}
}
// 2. Register in main.dart
MultiProvider(
providers: [
ChangeNotifierProvider(create: (_) => YourProvider()),
],
child: YourApp(),
)
// 3. Use in UI
Consumer<YourProvider>(
builder: (context, provider, child) {
return YourWidget();
},
)- Flutter project setup with clean structure
- Package dependencies configured
- Environment setup (Android & iOS)
- Navigation setup (GoRouter)
- State management setup (Provider)
- Auth feature skeleton
- Onboarding structure
- API integration templates
- Error handling structure
- Permissions configuration
- Build auth screens (Login, Signup, Onboarding)
- Implement UI from Figma
- Wire up API services
- Test auth flow
-
Implement Auth UI
- Login page
- Signup page
- Forgot password page
-
Implement Onboarding
- Create onboarding screens
- Implement page indicators
-
Build Core Screens
- Home page
- Search page
- Library page
- Player page
-
API Integration
- Implement data sources
- Wire up repositories
- Connect to backend
- Follow the clean architecture structure
- Use Manrope font for all text
- Maintain responsive design with ScreenUtil
- Write meaningful commit messages
- Test your changes thoroughly
This project is private and confidential.
Built with β€οΈ using Flutter and Clean Architecture