A sophisticated Flutter-based music application that detects your emotions through facial expressions and voice analysis, then curates personalized playlists to match your mood.
Features • Tech Stack • Getting Started • Architecture • API Integration • Contributing
- Overview
- Features
- Tech Stack
- Architecture
- Getting Started
- Project Structure
- API Integration
- Development
- Building for Production
- Testing
- Contributing
- License
- Acknowledgments
SoulSync is an innovative music streaming application that leverages multimodal emotion detection to create a deeply personalized listening experience. By analyzing both facial expressions and vocal patterns, SoulSync understands your emotional state and generates custom playlists that resonate with your current mood.
- 🎭 Multimodal Emotion Detection: Combines facial expression analysis and voice pattern recognition
- 🎶 Smart Playlist Generation: AI-powered playlist curation based on valence-arousal emotional model
- 🔐 Secure Authentication: Multiple sign-in options including Google OAuth
- 🎨 Modern UI/UX: Clean, intuitive interface with smooth animations
- 📱 Cross-Platform: Supports Android, iOS, Web, Windows, macOS, and Linux
- Facial Expression Analysis: Real-time emotion detection using camera
- Voice Pattern Recognition: Audio-based emotion analysis through microphone
- Multimodal Fusion: Combines visual and audio signals for accurate emotion detection
- Emotion Meter: Visual representation of detected emotions with valence-arousal scores
- Personalized Playlists: Auto-generated playlists based on emotional state
- Music Player: Full-featured audio player with playback controls
- Search & Discovery: Find songs and artists easily
- Library Management: Organize your favorite tracks and playlists
- Mini Player: Persistent mini player for seamless navigation
- Audio Progress Bar: Visual playback progress with seeking capability
- Authentication: Email/password and Google Sign-In
- User Profile: Personalized user profiles
- Activity Tracking: Monitor your listening history and patterns
- Preferences: Customizable user settings
- Dark/Light Theme: Toggle between theme modes
- Smooth Animations: Lottie animations for enhanced UX
- Responsive Design: Adaptive layouts for all screen sizes
- Material Design: Modern Material Design 3 principles
- Flutter SDK:
^3.9.2- Cross-platform UI framework - Dart: Latest stable version
- flutter_riverpod:
^3.2.1- Reactive state management - go_router:
^17.1.0- Declarative routing solution
- Firebase Core:
^4.5.0- Firebase integration - Firebase Auth:
^6.2.0- Authentication services - Supabase Flutter:
^2.12.0- Backend-as-a-Service - Dio:
^5.9.2- HTTP client for API requests
- Google Sign-In:
^7.2.0- Google OAuth integration
- Camera:
^0.12.0- Camera access for facial expression capture - Record:
^6.2.0- Audio recording for voice analysis - Just Audio:
^0.10.5- Audio playback engine - Audio Video Progress Bar:
^2.0.3- Playback progress visualization - Lottie:
^3.3.2- Animation library
- Google Fonts:
^8.0.2- Custom typography - Cupertino Icons:
^1.0.8- iOS-style icons
- Permission Handler:
^12.0.1- Runtime permissions management - Path Provider:
^2.1.5- File system path access
- Flutter Lints:
^5.0.0- Recommended linting rules
SoulSync follows Clean Architecture principles with a feature-first folder structure:
lib/
├── core/ # Core application utilities
│ ├── config/ # App configuration
│ ├── network/ # Network layer & API clients
│ ├── theme/ # Theme configuration & controller
│ └── utils/ # Utility functions & helpers
│
├── features/ # Feature modules
│ ├── auth/ # Authentication flow
│ │ ├── screens/ # Login, signup screens
│ │ ├── services/ # Auth services
│ │ └── providers/ # Auth state providers
│ │
│ ├── emotion/ # Emotion detection
│ │ ├── emotion_screen.dart
│ │ ├── emotion_playlist_screen.dart
│ │ ├── emotion_service.dart
│ │ └── widgets/ # Emotion-specific widgets
│ │
│ ├── home/ # Home dashboard
│ │ ├── home_screen.dart
│ │ └── widgets/
│ │
│ ├── library/ # Music library
│ │ ├── library_screen.dart
│ │ ├── library_service.dart
│ │ └── widgets/
│ │
│ ├── player/ # Music player
│ │ ├── player_screen.dart
│ │ ├── player_service.dart
│ │ └── widgets/ # Player controls, mini player
│ │
│ ├── profile/ # User profile
│ ├── search/ # Search functionality
│ ├── splash/ # Splash screen
│ └── activity/ # User activity tracking
│
├── routes/ # Navigation & routing
│ └── app_router.dart
│
├── firebase_options.dart # Firebase configuration
└── main.dart # Application entry point
- Provider Pattern: For state management using Riverpod
- Service Pattern: Business logic separation in service classes
- Repository Pattern: Data layer abstraction
- Feature-First: Modular architecture for scalability
Before you begin, ensure you have the following installed:
- Flutter SDK: Version 3.9.2 or higher
flutter --version
- Dart SDK: Version 3.9.2 or higher (comes with Flutter)
- Android Studio / Xcode / VS Code: For development
- Git: For version control
- Firebase Account: For authentication services
- Supabase Account: For backend services
-
Clone the repository
git clone https://github.com/yourusername/soulsync.git cd soulsync/frontend_flutter -
Install dependencies
flutter pub get
-
Verify installation
flutter doctor
Resolve any issues reported by Flutter Doctor.
- Create a Firebase project at Firebase Console
- Enable Authentication with Email/Password and Google Sign-In
- Download configuration files:
- Android:
google-services.json→android/app/ - iOS:
GoogleService-Info.plist→ios/Runner/
- Android:
- Run FlutterFire CLI to generate Firebase options:
flutterfire configure
- Create a Supabase project at Supabase Dashboard
- Get your project URL and API key
- Update Supabase configuration in your app
Update the API base URLs in service files:
For Emotion Detection API (lib/features/emotion/emotion_service.dart):
BaseOptions(baseUrl: "http://YOUR_EMOTION_API_HOST:8000")For Playlist Generation API:
"http://YOUR_PLAYLIST_API_HOST:5000/api/generate-playlist"Android (android/app/build.gradle.kts):
- Minimum SDK: 21 or higher
- Target SDK: Latest stable
iOS (ios/Podfile):
- iOS Deployment Target: 12.0 or higher
- Run
pod installin theios/directory
Permissions Configuration:
Android (android/app/src/main/AndroidManifest.xml):
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />iOS (ios/Runner/Info.plist):
<key>NSCameraUsageDescription</key>
<string>SoulSync needs camera access to detect your emotions</string>
<key>NSMicrophoneUsageDescription</key>
<string>SoulSync needs microphone access to analyze your voice</string># Check available devices
flutter devices
# Run on specific device
flutter run -d <device_id>
# Run in debug mode
flutter run --debug
# Run in release mode
flutter run --releasesoulsync_app/
│
├── android/ # Android platform code
├── ios/ # iOS platform code
├── linux/ # Linux platform code
├── macos/ # macOS platform code
├── web/ # Web platform code
├── windows/ # Windows platform code
│
├── lib/ # Main application code
│ ├── core/ # Core utilities & configuration
│ ├── features/ # Feature modules
│ ├── routes/ # Navigation
│ ├── firebase_options.dart
│ └── main.dart # Entry point
│
├── test/ # Unit & widget tests
├── build/ # Build outputs (gitignored)
│
├── analysis_options.yaml # Dart analysis configuration
├── pubspec.yaml # Dependencies & metadata
├── README.md # This file
└── soulsync_app.iml # IntelliJ project file
Endpoint: /detect-human-emotion
Method: POST
Content-Type: multipart/form-data
Request:
FormData({
"image": MultipartFile (captured facial image),
"audio": MultipartFile (recorded voice audio)
})Response:
{
"emotion": "Happy",
"valence": 0.75,
"arousal": 0.60,
"confidence": 0.89
}Endpoint: /api/generate-playlist
Method: POST
Content-Type: application/json
Request:
{
"userId": "user123",
"valence": 0.75,
"arousal": 0.60
}Response:
{
"playlist": [
{
"id": "song1",
"title": "Happy Song",
"artist": "Artist Name",
"duration": 180,
"url": "https://..."
}
]
}# Analyze code
flutter analyze
# Format code
flutter format lib/
# Check for outdated dependencies
flutter pub outdated- Hot Reload: Press
rin terminal during debug session - Hot Restart: Press
Rin terminal during debug session
The app uses Riverpod for state management:
// Provider example
final themeProvider = StateNotifierProvider<ThemeController, ThemeData>((ref) {
return ThemeController();
});
// Consuming provider
final theme = ref.watch(themeProvider);- Create feature folder in
lib/features/ - Add screens, services, and widgets
- Register routes in
lib/routes/app_router.dart - Update navigation as needed
# Build APK
flutter build apk --release
# Build App Bundle (for Play Store)
flutter build appbundle --release
# Output: build/app/outputs/# Build iOS app
flutter build ios --release
# Archive with Xcode for App Store submission# Build web app
flutter build web --release
# Output: build/web/# Windows
flutter build windows --release
# macOS
flutter build macos --release
# Linux
flutter build linux --release# Run all tests
flutter test
# Run tests with coverage
flutter test --coverage
# Run specific test file
flutter test test/widget_test.dart- Unit Tests: Business logic testing
- Widget Tests: UI component testing
- Integration Tests: End-to-end testing
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow Flutter style guide
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure code passes linting (
flutter analyze)
This project is private and proprietary. All rights reserved.
- Flutter - UI framework
- Firebase - Backend services
- Supabase - Database & backend
- Riverpod - State management
- Developers: SoulSync Development Team
- Institution: College Project - SEM 4, MFC
- Academic Year: 2025-2026
- Flutter community for excellent packages
- Open source contributors
- Academic advisors and mentors
For questions, issues, or suggestions:
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@soulsync.app
Made with ❤️ using Flutter
Connecting emotions with music, one song at a time.