Skip to content

feature_monorepo_skeleton Free

Generate a feature module for the Archipelago Flutter monorepo. Supports single-package and API/Impl split patterns with optional business logic and localization layers.

Version: 1.0.0

Variables

VariableTypeDefaultDescription
featureNamestringFeatureNameThe name of the feature module
isSharedbooleanfalseWhether this is a shared feature (API/Impl split)
hasBusinessLogicbooleantrueWhether this feature has business logic (repos, usecases, DI)
hasLocalebooleanfalseWhether this feature manages its own localization
includeGeneratedbooleanfalseWhether to include generated files in version control

Usage

Interactive

bash
archipelago generate feature_monorepo_skeleton

Non-interactive (CI)

bash
archipelago generate feature_monorepo_skeleton --config my_config.json

Config Template

json
{
  "@featureName": "The name of the feature module",
  "featureName": "FeatureName",
  "@isShared": "Whether this is a shared feature (API/Impl split)",
  "isShared": false,
  "@hasBusinessLogic": "Whether this feature has business logic (repos, usecases, DI)",
  "hasBusinessLogic": true,
  "@hasLocale": "Whether this feature manages its own localization",
  "hasLocale": false,
  "@includeGenerated": "Whether to include generated files in version control",
  "includeGenerated": false
}

Generated Structure

Single Package (isShared: false)

features/
└── {feature_name}/
    ├── lib/
    │   ├── {feature_name}.dart           # Barrel export
    │   └── src/
    │       ├── {feature_name}_sdk.dart    # FeatureSDK implementation
    │       ├── data/
    │       │   ├── datasources/
    │       │   │   ├── local/
    │       │   │   └── remote/
    │       │   ├── models/
    │       │   └── repositories/
    │       ├── di/
    │       │   ├── injector.dart
    │       │   ├── {feature_name}_global_module.dart
    │       │   └── {feature_name}_local_module.dart
    │       ├── domain/
    │       │   ├── entities/
    │       │   ├── repositories/
    │       │   └── usecases/
    │       ├── presentation/
    │       │   ├── {feature_name}_shell_page.dart
    │       │   └── ui/
    │       │       ├── pages/
    │       │       └── widgets/
    │       └── router/
    │           └── {feature_name}_router.dart
    ├── l10n/                              # If hasLocale
    ├── analysis_options.yaml
    ├── build.yaml
    └── pubspec.yaml

API/Impl Split (isShared: true)

features/
├── {feature_name}_api/
│   ├── lib/
│   │   ├── {feature_name}_api.dart
│   │   └── src/
│   │       └── {feature_name}_sdk.dart
│   ├── analysis_options.yaml
│   └── pubspec.yaml
└── {feature_name}_impl/
    ├── lib/
    │   ├── {feature_name}_impl.dart
    │   └── src/
    │       ├── {feature_name}_sdk_impl.dart
    │       ├── data/
    │       ├── di/
    │       ├── domain/
    │       ├── presentation/
    │       └── router/
    ├── l10n/
    ├── analysis_options.yaml
    ├── build.yaml
    └── pubspec.yaml

Built by Banua Coder