diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..d284332d --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,133 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +**[zarzet](https://github.com/zarzet)**. + +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..f1750732 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,268 @@ +# Contributing to SpotiFLAC + +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. + +## Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [How Can I Contribute?](#how-can-i-contribute) + - [Reporting Bugs](#reporting-bugs) + - [Suggesting Features](#suggesting-features) + - [Code Contributions](#code-contributions) + - [Translations](#translations) +- [Development Setup](#development-setup) +- [Project Structure](#project-structure) +- [Coding Guidelines](#coding-guidelines) +- [Commit Guidelines](#commit-guidelines) +- [Pull Request Process](#pull-request-process) + +## Code of Conduct + +This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers. + +## How Can I Contribute? + +### Reporting Bugs + +Before creating bug reports, please check the [existing issues](https://github.com/zarzet/SpotiFLAC-Mobile/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 + +### Suggesting Features + +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? + +### Code Contributions + +1. **Fork the repository** and create your branch from `dev` +2. **Make your changes** following our coding guidelines +3. **Test your changes** thoroughly +4. **Submit a pull request** to the `dev` branch + +### Translations + +We use [Crowdin](https://crowdin.com/project/spotiflac-mobile) for translations. To contribute: + +1. Visit our [Crowdin project](https://crowdin.com/project/spotiflac-mobile) +2. Select your language or request a new one +3. Start translating! + +Translation files are located in `lib/l10n/arb/`. + +## Development Setup + +### Prerequisites + +- **Flutter SDK** 3.10.0 or higher +- **Dart SDK** 3.10.0 or higher +- **Android Studio** or **VS Code** with Flutter extensions +- **Git** + +### Getting Started + +1. **Clone your fork** + ```bash + git clone https://github.com/YOUR_USERNAME/SpotiFLAC-Mobile.git + cd SpotiFLAC-Mobile + ``` + +2. **Add upstream remote** + ```bash + git remote add upstream https://github.com/zarzet/SpotiFLAC-Mobile.git + ``` + +3. **Install dependencies** + ```bash + flutter pub get + ``` + +4. **Generate code** (for Riverpod, JSON serialization, etc.) + ```bash + dart run build_runner build --delete-conflicting-outputs + ``` + +5. **Run the app** + ```bash + flutter run + ``` + +### Building + +```bash +# Debug build +flutter build apk --debug + +# Release build +flutter build apk --release +``` + +## Project Structure + +``` +lib/ +├── 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 +``` + +## Coding Guidelines + +### General + +- Follow [Effective Dart](https://dart.dev/effective-dart) guidelines +- Use meaningful variable and function names +- Keep functions small and focused +- Add comments for complex logic + +### Formatting + +- Use `dart format` before committing +- Maximum line length: 80 characters +- Use trailing commas for better formatting + +```bash +dart format . +``` + +### Linting + +Ensure your code passes all lints: + +```bash +flutter analyze +``` + +### State Management + +We use **Riverpod** for state management. Follow these patterns: + +```dart +// Use code generation with riverpod_annotation +@riverpod +class MyNotifier extends _$MyNotifier { + @override + MyState build() => MyState(); + + // Methods to update state +} +``` + +### Localization + +All user-facing strings should be localized: + +```dart +// Good +Text(AppLocalizations.of(context)!.downloadComplete) + +// Bad +Text('Download Complete') +``` + +To add new strings: +1. Add the key to `lib/l10n/arb/app_en.arb` +2. Run `flutter gen-l10n` + +## Commit Guidelines + +We follow [Conventional Commits](https://www.conventionalcommits.org/): + +``` +(): + +[optional body] + +[optional footer(s)] +``` + +### Types + +- `feat`: New feature +- `fix`: Bug fix +- `docs`: Documentation changes +- `style`: Code style changes (formatting, etc.) +- `refactor`: Code refactoring +- `perf`: Performance improvements +- `test`: Adding or updating tests +- `chore`: Maintenance tasks + +### Examples + +``` +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 +``` + +## Pull Request Process + +1. **Update your fork** + ```bash + git fetch upstream + git rebase upstream/dev + ``` + +2. **Create a feature branch** + ```bash + git checkout -b feat/my-new-feature + ``` + +3. **Make your changes** and commit following our guidelines + +4. **Push to your fork** + ```bash + git push origin feat/my-new-feature + ``` + +5. **Create a Pull Request** + - Target the `dev` branch + - Fill in the PR template + - Link related issues + +6. **Address review feedback** + - Make requested changes + - Push additional commits + - Request re-review when ready + +### PR Requirements + +- [ ] 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 + +## Questions? + +If you have questions, feel free to: + +- Open a [Discussion](https://github.com/zarzet/SpotiFLAC-Mobile/discussions) +- Check existing [Issues](https://github.com/zarzet/SpotiFLAC-Mobile/issues) + +Thank you for contributing! 💚