After Framework

プロダクトファクトリー

product.spec.yaml、ジェネレーター、プロダクトが所有するものと継承するものについて説明します。

ドキュメントのバージョン: supercore main · パッケージ 1.0.0

パイプラインこのセクションへのリンク: パイプライン

プロダクトが所有する仕様、ジェネレータースクリプト、そしてすべての共有モジュールを所有パッケージに固定するモジュールレジストリの 3 つで構成されます。

  1. 01

    アイデア

  2. 02

    ドメイン

  3. 03

    モジュール

  4. 04

    プロダクトシェル

  5. 05

    デプロイ

product.spec.yamlこのセクションへのリンク: product.spec.yaml

factory/schema/product.spec.schema.json に照らして検証されます。module: を持つタブと module タイプのウィジェットはコードを出力せず、継承されたシェルが処理します。

super_airport.product.spec.yaml
apiVersion: after.ai/v1
kind: SuperApp

metadata:
  name: SuperAirport              # PascalCase, must start with a capital
  package: super_airport          # snake_case pubspec name
  bundle: com.overstein.superairport
  productLine: enterprise         # consumer | enterprise

spec:
  domain: Airport / aviation operations
  reference: SuperHospital        # SuperGarage | SuperHospital

  features:                       # VERTICAL ONLY. No OS modules here.
    - id: flights
      titleKey: features.flights
      icon: flight_takeoff_outlined
      requiredPermission: airport.flights.read

  navigation:
    tabs:                         # 2–6 tabs, matching family shell
      - id: home
        labelKey: nav.home
      - id: flights
        labelKey: nav.flights
        feature: flights
      - id: tasks
        module: tasks             # inherited OS module — no code emitted

  permissions:
    - airport.flights.read
    - airport.gates.write

  branding:
    accent: "#0EA5E9"
    monogram: SA

ソース supercore/docs/PRODUCT_FACTORY.md (新しいタブで開きます)

所有と継承このセクションへのリンク: 所有と継承

プロダクトが所有するもの

  • 名前、パッケージ、バンドル、プロダクトライン
  • バーティカル機能と i18n キー
  • ナビゲーションタブ
  • RBAC の権限文字列
  • ダッシュボードウィジェット
  • AI スキルとツールバインディング
  • アクセントカラーとモノグラム

プラットフォームが提供するもの

  • 認証とスーパー管理者
  • メンバーシップまたは組織
  • RBAC エンジンと監査ログ
  • カレンダー、タスク、ドキュメント
  • 通知と分析
  • ワークフロー・ダッシュボード・検索エンジン
  • デザインシステム、スプラッシュ、CI

コマンドこのセクションへのリンク: コマンド

validate_product_spec.ps1
powershell -File scripts\validate_product_spec.ps1 -SpecPath factory\specs\examples\super_airport.product.spec.yaml

ソース supercore/factory/README.md (新しいタブで開きます)

generate_product.ps1
# From a spec
powershell -File scripts\generate_product.ps1 -SpecPath factory\specs\examples\super_airport.product.spec.yaml

# From a name only (quick starter)
powershell -File scripts\generate_product.ps1 -Name SuperAirport -Reference SuperHospital

# Preview without writing files
powershell -File scripts\generate_product.ps1 -SpecPath factory\specs\examples\super_airport.product.spec.yaml -DryRun

ソース supercore/factory/README.md (新しいタブで開きます)

flutter
cd ..\superairport
flutter create .
flutter pub get
flutter analyze
flutter test

ソース supercore/scripts/generate_product.ps1 (新しいタブで開きます)

再生成このセクションへのリンク: 再生成

仕様を更新してジェネレーターを再実行すると、人が書いた機能コードを壊すことなくスケルトンファイルが更新されます。