2.3 KiB
2.3 KiB
Repository Guidelines
Project Structure & Module Organization
lib/hosts Flutter code:core/for services,features/for screens and flows,shared/for reusable UI,l10n/for generated localization, andmain.dartas the bootstrap entry.assets/contains bundled media referenced inpubspec.yaml; platform bits live insideandroid/andios/. Release collateral is underfastlane/, while helper scripts sit inscripts/.
Build, Test, and Development Commands
flutter pub getinstalls pub dependencies after manifest edits.flutter pub run build_runner build --delete-conflicting-outputsregenerates serializers and other codegen output.flutter run -d <device>launches a debug build against an emulator or physical device (-d ios,-d android).flutter analyzeexecutes static analysis checks; fix warnings before committing.flutter build apk --release,flutter build appbundle --release, andflutter build ios --releaseassemble store packages../scripts/release.shorchestrates the tagged release workflow once CI succeeds.
Coding Style & Naming Conventions
- Use Flutter defaults: two-space indentation,
lowerCamelCasefor members,UpperCamelCasefor types, and snake_case filenames acrosslib/andtest/. - Format code with
dart format .and rely onflutter analyzeto enforcepackage:flutter_lints(seeanalysis_options.yaml). Avoidprint; prefer injected loggers or platform channels.
Commit & Pull Request Guidelines
- Follow Conventional Commits (
feat:,fix:,chore:,refactor:) as in existing history. Keep subject lines ≤72 characters and add context in the body when behavior changes. - Pull requests should outline the change, link issues, and list manual validation steps. Attach screenshots or recordings for UI updates.
- Rebase onto
main, rerun codegen, and ensure CI is green before requesting review. Delete obsolete assets and localization strings in the same patch when touched.
Localization & Configuration Notes
- Update generated delegates in
lib/l10n/via Flutter’s localization toolchain (flutter gen-l10nfrom IDE or pub). Commit regenerated files with the feature change. - Keep environment secrets outside source control; configuration surfaces and self-hosted setup notes live in
docs/.