First off, thank you for considering contributing to SpotiFLAC! 🎉
This document provides guidelines and steps for contributing. Following these guidelines helps maintain code quality and ensures a smooth collaboration process.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Project Structure
- Coding Guidelines
- Commit Guidelines
- Pull Request Process
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
Before creating bug reports, please check the existing issues to avoid duplicates.
When creating a bug report, please use the bug report template and include:
- Clear and descriptive title
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Screenshots or screen recordings if applicable
- Device information (model, OS version)
- App version
- Logs from Settings > About > View Logs
Feature requests are welcome! Please use the feature request template and:
- Check existing issues to avoid duplicates
- Describe the feature clearly
- Explain the use case - why would this be useful?
- Consider the scope - is this a small enhancement or a major feature?
- Fork the repository and create your branch from
dev - Make your changes following our coding guidelines
- Test your changes thoroughly
- Submit a pull request to the
devbranch
We use Crowdin for translations. To contribute:
- Visit our Crowdin project
- Select your language or request a new one
- Start translating!
Translation files are located in lib/l10n/arb/.
- Flutter SDK 3.10.0 or higher
- Dart SDK 3.10.0 or higher
- Android Studio or VS Code with Flutter extensions
- Git
-
Clone your fork
git clone https://github.com/YOUR_USERNAME/SpotiFLAC-Mobile.git cd SpotiFLAC-Mobile -
Add upstream remote
git remote add upstream https://github.com/zarzet/SpotiFLAC-Mobile.git
-
Install dependencies
flutter pub get
-
Generate code (for Riverpod, JSON serialization, etc.)
dart run build_runner build --delete-conflicting-outputs
-
Run the app
flutter run
# Debug build
flutter build apk --debug
# Release build
flutter build apk --releaselib/
├── l10n/ # Localization files
│ └── arb/ # ARB translation files
├── models/ # Data models
├── providers/ # Riverpod providers
├── screens/ # UI screens
│ └── settings/ # Settings sub-screens
├── services/ # Business logic services
├── theme/ # App theming
├── utils/ # Utility functions
├── widgets/ # Reusable widgets
├── app.dart # App configuration
└── main.dart # Entry point
- Follow Effective Dart guidelines
- Use meaningful variable and function names
- Keep functions small and focused
- Add comments for complex logic
- Use
dart formatbefore committing - Maximum line length: 80 characters
- Use trailing commas for better formatting
dart format .Ensure your code passes all lints:
flutter analyzeWe use Riverpod for state management. Follow these patterns:
// Use code generation with riverpod_annotation
@riverpod
class MyNotifier extends _$MyNotifier {
@override
MyState build() => MyState();
// Methods to update state
}All user-facing strings should be localized:
// Good
Text(AppLocalizations.of(context)!.downloadComplete)
// Bad
Text('Download Complete')To add new strings:
- Add the key to
lib/l10n/arb/app_en.arb - Run
flutter gen-l10n
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testschore: Maintenance tasks
feat(download): add batch download support
fix(ui): resolve overflow on small screens
docs: update contributing guidelines
chore(deps): update flutter_riverpod to 3.1.0
-
Update your fork
git fetch upstream git rebase upstream/dev
-
Create a feature branch
git checkout -b feat/my-new-feature
-
Make your changes and commit following our guidelines
-
Push to your fork
git push origin feat/my-new-feature
-
Create a Pull Request
- Target the
devbranch - Fill in the PR template
- Link related issues
- Target the
-
Address review feedback
- Make requested changes
- Push additional commits
- Request re-review when ready
- Code follows project conventions
- All tests pass
- No new linting errors
- Documentation updated (if needed)
- Commit messages follow guidelines
- PR description is clear and complete
If you have questions, feel free to:
- Open a Discussion
- Check existing Issues
Thank you for contributing! 💚