A modern Flutter monorepo starter template with Firebase App Distribution, automated build pipelines, and development tooling.
- Monorepo Structure: Organized Flutter workspace with Melos for package management
- Firebase Distribution: Automated app distribution to testers with Firebase App Distribution
- Multi-platform Support: Build for Android (APK/AAB) and iOS (IPA)
- Development Tooling: Comprehensive scripts and Makefile for development workflows
- CI/CD Ready: Pre-configured build and distribution pipelines
- Code Quality: Static analysis, testing, and formatting tools
flutter_khode_starter/
βββ apps/
β βββ sample_app/ # Sample Flutter application
βββ packages/
β βββ common/ # Shared Dart package
βββ config/ # Build and distribution configuration
βββ scripts/ # Build and automation scripts
βββ pubspec.yaml # Workspace configuration
βββ Makefile # Development commands
- Flutter: SDK ^3.9.0
- Dart: SDK ^3.9.0
- FVM (Flutter Version Management): Recommended
- Firebase CLI: For app distribution
- Node.js: For Firebase CLI
- Xcode: For iOS development (macOS only)
-
Clone the repository
git clone <your-repo-url> cd flutter_khode_starter
-
Verify environment setup
make verify # or ./scripts/verify-setup.sh -
Install dependencies
make get # or melos get -
Setup Firebase (for distribution)
# Copy environment file cp .env.distribute.example .env.distribute # Edit configuration with your Firebase settings # See apps/sample_app/README.md for detailed setup
Use the Makefile for common development tasks:
# Setup and dependencies
make setup # Verify environment and get dependencies
make get # Get dependencies for all packages
make upgrade # Upgrade dependencies
# Code quality
make format # Format code
make analyze # Run static analysis
make test # Run tests
make quality # Full quality check (format + analyze + test)
# Building
make build-apk # Build Android APK
make build-aab # Build Android App Bundle
make build-ipa # Build iOS IPA
make build-android # Build Android app
make build-ios # Build iOS app
# Distribution
make distribute-android # Build and distribute Android
make distribute-ios # Build and distribute iOSThe project uses Melos for workspace management:
# Common commands
melos get # Get dependencies for all packages
melos test # Run tests across all packages
melos analyze # Run static analysis
melos format # Format code
# Build commands
melos build-android # Build Android
melos build-ios # Build iOS
melos distribute # Build and distributeThis project includes pre-configured Firebase App Distribution for automated testing:
- Configure Firebase: Follow setup in
apps/sample_app/README.md - Build and distribute:
make distribute-android # Android make distribute-ios # iOS
After building, find artifacts at:
- Android APK:
apps/sample_app/build/app/outputs/flutter-apk/app-release.apk - Android AAB:
apps/sample_app/build/app/outputs/bundle/release/app-release.aab - iOS IPA:
apps/sample_app/build/ios/ipa/sample_app.ipa
apps/sample_app/: Main Flutter application- Cross-platform mobile app
- Firebase integration ready
- Pre-configured build pipelines
packages/common/: Shared Dart package- Reusable utilities and components
- Can be published to pub.dev
- Follows Dart package conventions
- Melos: Workspace management and automation
- FVM: Flutter version management
- Firebase CLI: App distribution and deployment
- Makefile: Simplified development commands
-
Create new app in
apps/directory:cd apps flutter create my_new_app -
Update workspace configuration in root
pubspec.yaml:workspace: - packages/common - apps/sample_app - apps/my_new_app # Add your new app
-
Configure build settings in
.env.distribute:APP_NAME=my_new_app PLATFORM=both
-
Create package in
packages/directory:cd packages flutter create --template=package my_package -
Update workspace configuration in root
pubspec.yaml
scripts/verify-setup.sh: Environment verificationscripts/flutter-build.sh: Multi-platform build scriptscripts/firebase-distribute.sh: Firebase distribution scriptscripts/configure-firebase.sh: Firebase configuration helper
Run tests across all packages:
make test
# or
melos testEnsure code quality with:
make quality
# or
make format && make analyze && make test- Fork the repository
- Create a feature branch
- Make your changes
- Run quality checks:
make quality - Submit a pull request
- Sample App:
apps/sample_app/README.md- Detailed Firebase setup and distribution - Common Package:
packages/common/README.md- Package documentation - Scripts: See inline comments and help in each script
- Firebase CLI authentication: Run
firebase login - iOS build issues: Ensure Xcode and provisioning profiles are configured
- Android build issues: Check Android SDK and build tools
- Environment setup: Run
make verifyto check prerequisites
- Check existing documentation
- Review Firebase Console for distribution issues
- Verify environment setup with
make verify - Check build logs for specific errors
This project is licensed under the MIT License - see the LICENSE file for details.
- Flutter team for the amazing framework
- Firebase for distribution tools
- Melos for workspace management
- Open source community for tooling and inspiration