melos
複数のパッケージ(モノレポ)を含むDartおよびFlutterリポジトリを管理するためのツール。コンベンショナル・コミットによる自動バージョニングをサポート。JavaScriptのLernaパッケージにインスパイアされています。
Ansible Semaphore 用クライアントアプリ
{"sdk":"flutter"}^1.3.0^16.0.0^9.0.0^9.0.0^2.0.7^2.3.5^2.1.5any^1.0.8^2.0.16^3.3.1^6.2.1^0.5.1anyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyany{"sdk":"flutter"}^6.0.0^2.4.15^7.0.0以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
A comprehensive Flutter application template with monorepo architecture, providing a robust foundation for building scalable Flutter applications with clean architecture principles.
This project follows clean architecture principles with a monorepo structure managed by Melos, providing separation of concerns across multiple specialized packages.
lib/ - Entry point and main application codeapp_api/ - Generated API client code (OpenAPI/Swagger based)app_bloc/ - BLoC pattern implementations for business logicapp_lib/ - Core utilities, themes, localizationapp_widget/ - Reusable widgets and UI elementsbricks/ - Mason templates for scaffoldingthird_party/ - Modified/custom third-party packagesClone the repository:
git clone https://github.com/your-username/semaphore-client.git
cd semaphore-client
Install global dependencies:
dart pub global activate melos
dart pub global activate mason_cli
Bootstrap the project:
This will install all the dependencies for the root project and all the packages in the workspace.
melos bootstrap
Initialize Mason:
mason get
# Install global dependencies
dart pub global activate melos
dart pub global activate mason_cli
# Bootstrap the project
melos bootstrap
# Initialize mason
mason get
# Run all static analysis
melos run lint:all
# Format all code
melos run format
# Run tests across all packages
flutter test
melos exec flutter test
# Generate code (build_runner, l10n)
melos run prepare
melos run build-all
# Run tests for specific package
cd app_lib/theme && flutter test
# Analyze specific package
cd app_widget/adaptive && flutter analyze
# Build specific package
cd app_lib/theme && dart run build_runner build --delete-conflicting-outputs
lib/main.dart - App initialization with providerslib/app.dart - Root widget with theme managementlib/router.dart - GoRouter configuration with declarative routinglib/screens/ - Feature screens organized by domainpubspec.yaml (workspace configuration)mason.yaml (code generation templates)analysis_options.yaml (linting rules)app_lib/locale/l10n.yaml (i18n configuration)This project uses Melos to manage the monorepo. Here are some of the available scripts:
melos run lint:all: Run all static analysis checksmelos run analyze: Run flutter analyze for all packagesmelos run fix: Run dart fix for all packagesmelos run format: Run dart format for all packagesmelos run upgrade: Upgrade dependencies in all packagesmelos run outdated: Check for outdated dependencies in all packagesmelos run validate-dependencies: Validate dependencies usagemelos run prepare: Generate code (build_runner, l10n)melos run test:bricks: Run Mason brick tests (see BRICK_TESTING.md)melos run build-all: Build all packagesThis project uses Mason for code generation to maintain consistency and speed up development. For a complete guide to all available bricks and their usage, see BRICKS.md.
For comprehensive documentation on testing Mason bricks, including test structure, running tests, and writing new tests, see BRICK_TESTING.md.
dart pub global activate mason_cli
mason get
Create API client code from OpenAPI specification:
mason make api_client -o app_api/app_api --package_name=app_api
# Then add OpenAPI spec to `app_api/app_api/openapi.yaml`
Create a simple BLoC package:
mason make simple_bloc -o app_bloc/feature_name --name=feature_name
Create a complete form BLoC with validation and submission logic:
mason make form_bloc --name Login --field_names "email,password"
# Development
flutter run
# Specific platform
flutter run -d chrome
flutter run -d android
flutter run -d ios
# Run all tests
flutter test
# Run tests for all packages
melos exec flutter test
# Run tests for specific package
cd app_lib/theme && flutter test
Tests are co-located with their respective packages:
test/ directory in each packagetest/ directory in main appflutter test at root levelThe workspace uses path-based dependencies for internal packages (marked as any in pubspec.yaml). All packages are managed through Melos workspace configuration, ensuring consistent versioning and dependency resolution across the monorepo.
Contributions are welcome! Please feel free to submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
melos run lint:all before submitting PRsmelos exec flutter testThis project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, please file an issue on the GitHub repository.