Thank you for considering contributing to Trakli! We welcome all kinds of contributions including bug reports, feature requests, documentation improvements, and code.
- Code of Conduct
- How Can I Contribute?
- Setting Up the Development Environment
- Style Guide
- Commit Messages
- License
This project and everyone participating in it are governed by the Code of Conduct. By participating, you are expected to uphold this code.
If you find a bug in the source code, you can help us by submitting an issue to our GitHub Issue Tracker. When filing an issue, please provide the following information:
- A descriptive title and summary.
- Steps to reproduce the issue.
- The expected behavior.
- The actual behavior.
- Screenshots or code snippets (if applicable).
- Your environment details (Flutter version, device/emulator, etc.).
We welcome suggestions for new features. Please submit your ideas to our GitHub Issue Tracker. When suggesting a feature, please provide:
- A clear and descriptive title.
- A detailed description of the feature and its benefits.
- Any potential use cases or examples.
Improving documentation is a great way to start contributing. You can help by:
- Updating or expanding the project's README.
- Creating or improving guides and tutorials.
- Ensuring code comments are clear and helpful.
We follow the GitHub Flow for our development process. To contribute code:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Make your changes.
- Ensure your changes adhere to our Style Guide.
- Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
Please ensure your code passes all tests and does not introduce any new issues.
To contribute to this project, you need to set up the development environment with the following minimum requirements:
- Flutter 3.22.2 or higher: Ensure you have Flutter installed. Follow the instructions on the official Flutter website to install Flutter.
To check your Flutter version, run:
flutter --versionTo set up the project:
-
Clone the repository:
git clone git@github.com:whilesmart/trakli-mobile.git # or use gh repo clone whilesmart/trakli-mobile cd trakli-mobile
-
Fetch the dependencies:
flutter pub get
-
Set up Git hooks:
Install Git hooks to run pre-commit checks automatically:
dart run husky install
This sets up hooks that run linting, Flutter analysis, and validate GitHub Actions workflow files before commits. Note: You must install action-validator (step 4) for the GitHub Actions validation to work.
-
Install action-validator:
The Git hooks validate GitHub Actions workflow files, which requires action-validator. Install it following the installation instructions in their documentation.
-
Run the project:
flutter run
Please ensure your code follows our style guidelines:
-
Use Dart's formatting standards (
flutter format .). -
Write clear, concise comments where necessary.
-
Follow best practices for Flutter and Dart.
-
translation: run this to generate translations after adding text to json files
flutter pub run easy_localization:generate -S "assets/translations/" -O "lib/gen/translations" - o "codegen_loader.g.dart" -f keys
-
Use translations by LocaleKeys.app_name.tr()
-
assets(images/SVGs): run this after adding an asset image or SVG
fluttergen -c pubspec.yaml
-
Use asset by For SVGs:Assets.images.svg For Images:Assets.images.image.path
Write clear and meaningful commit messages. Use the following structure:
- feat: A new feature.
- fix: A bug fix.
- docs: Documentation only changes.
- style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
- refactor: A code change that neither fixes a bug nor adds a feature.
- test: Adding missing or correcting existing tests.
- chore: Changes to the build process or auxiliary tools and libraries.
By contributing to Trakli, you agree that your contributions will be licensed under the MIT License.