3.9 KiB
Contribute to the PeerTube mobile app
Thank you for your interest in contributing to the PeerTube mobile app! We welcome all kinds of contributions - whether it's code, documentation, translations, bug reports, suggestions or ideas for improving the app.
Table of Contents
- 💬 Translate the app
- 🐛 Reporting bugs
- 🛠️ How to contribute to the code
- 🧹 Code style guide
- 🚀 Running the app locally
- 🧱 Code architecture
- 🌼 Flavors
💬 Translate the app
You can help translate the PeerTube mobile interface into different languages.
Please refer to the official translation guide for instructions on how to get started.
🐛 Reporting bugs
Before opening a new issue:
- Check to see if the problem has already been reported.
- If not, open a new issue using the appropriate template.
- Provide a clear, concise title and include as much relevant detail as possible to help us understand and reproduce the problem.
- Ensure you use the provided template for reporting bugs.
🛠️ How to contribute to the code
- Fork the repository.
- Create a new branch and name it as clearly as possible:
- For a feature:
git checkout -b feature/your-feature-name - For a bugfix:
git checkout -b fix/your-bug-name
- For a feature:
- Make your changes.
- Write or update tests if necessary.
- Commit and push your changes.
- Open a merge request (MR) and describe your contribution.
🧹 Code style guide
Please follow the official Flutter Style Guide.
- Run
dart format .to format your code. - Run
flutter analyzeto check for issues. - Use Riverpod as the state management solution.
- Write unit and widget tests when applicable.
🚀 Running the app locally
To run the app on your machine:
Install Flutter first so your local SDK matches the version declared in pubspec.yaml.
git clone your-fork-url
cd your-repo
flutter pub get
dart run build_runner build --delete-conflicting-outputs
flutter run
🧱 Code architecture
We follow a feature-first architecture to keep things modular and scalable.
lib/
├── features/ # Domain-specific logic grouped by feature
├── l10n/ # Localization files
├── routes/ # Screens and navigation
├── shared/ # Reusable utilities, models, services, and helpers
└── main.dart # App entry point
Each folder in lib/features/ (e.g., account, video, platform, filters) contains its models, providers, services, widgets, and screens organized in a logical and consistent way.
Shared functionality (e.g., authentication, filters, configuration, theming) is placed under lib/shared/, and is used across multiple features.
Routing-related screens and helpers are stored in lib/routes/.
Localization files can be found in lib/l10n/, using the standard ARB format supported by Flutter. Translations are managed via Weblate, where contributors can help translate the app directly online.
🌼 Flavors
The project defines two main build flavors:
nightly: Used for builds on the develop branch and generates an APK file.stable: Used for production-ready, stable releases.
Environment-specific variables are defined in separate JSON files:
env-nightly.jsonfor thenightlyflavorenv-stable.jsonfor thestableflavor
Feel free to open an issue if anything is unclear or if you have any questions before contributing.