name: flutter_melos_modular_scaffold
publish_to: 'none'
description: "A sample project using melos and modular scaffold."
environment:
  sdk: '>=3.10.7 <4.0.0'
workspace:
  - packages/design_system
  - packages/core
  - packages/domain
  - packages/data_connect
  - packages/core_localization
  - packages/features/staff/authentication
  - packages/features/staff/home
  - packages/features/staff/staff_main
  - packages/features/staff/payments
  - packages/features/staff/profile
  - packages/features/staff/availability
  - packages/features/staff/clock_in
  - packages/features/staff/profile_sections/onboarding/emergency_contact
  - packages/features/staff/profile_sections/onboarding/experience
  - packages/features/staff/profile_sections/onboarding/profile_info
  - packages/features/staff/profile_sections/onboarding/attire
  - packages/features/staff/profile_sections/finances/staff_bank_account
  - packages/features/staff/profile_sections/finances/time_card
  - packages/features/staff/profile_sections/compliance/certificates
  - packages/features/staff/profile_sections/compliance/documents
  - packages/features/staff/profile_sections/compliance/tax_forms
  - packages/features/staff/shifts
  - packages/features/client/authentication
  - packages/features/client/billing
  - packages/features/client/home
  - packages/features/client/settings
  - packages/features/client/hubs
  - packages/features/client/create_order
  - packages/features/client/view_orders
  - packages/features/client/client_coverage
  - packages/features/client/client_main
  - apps/staff
  - apps/client
  - apps/design_system_viewer

dev_dependencies:
  melos: ^7.3.0
  flutter_lints: ^6.0.0

melos:
  scripts:
    info:
      run: |
        echo "              🚀 KROW WORKFORCE CUSTOM COMMANDS 🚀"
        echo "============================================================"
        echo "  BUILD COMMANDS:"
        echo "  - melos run build:client         : Build Client App (APK)"
        echo "  - melos run build:staff          : Build Staff App (APK)"
        echo "  - melos run build:design-system  : Build Design System Viewer"
        echo ""
        echo "  DEBUG/START COMMANDS:"
        echo "  - melos run start:client -- -d <ID> : Run Client App"
        echo "  - melos run start:staff -- -d <ID>  : Run Staff App"
        echo "  - melos run start:design-system     : Run DS Viewer"
        echo "    (e.g., melos run start:client -- -d chrome)"
        echo ""
        echo "  CODE GENERATION:"
        echo "  - melos run gen:l10n             : Generate Slang l10n"
        echo "  - melos run gen:build            : Run build_runner"
        echo "============================================================"
      description: "Display information about available custom Melos commands."

    gen:l10n:
      exec: dart run slang
      description: "Generate localization files using Slang across all packages."
      packageFilters:
        dependsOn: slang

    gen:build:
      exec: dart run build_runner build --delete-conflicting-outputs
      description: "Run build_runner build across all packages."
      packageFilters:
        dependsOn: build_runner

    build:client:
      run: |
        melos run gen:l10n --filter="core_localization"
        melos run gen:build --filter="core_localization"
        melos exec --scope="krowwithus_client" -- "flutter build apk"
      description: "Build the Client app (Android APK by default)."

    build:staff:
      run: |
        melos run gen:l10n --filter="core_localization"
        melos run gen:build --filter="core_localization"
        melos exec --scope="krowwithus_staff" -- "flutter build apk"
      description: "Build the Staff app (Android APK by default)."

    build:design-system:
      run: melos exec --scope="design_system_viewer" -- "flutter build apk"
      description: "Build the Design System Viewer app (Android APK by default)."

    start:client:
      run: melos exec --scope="krowwithus_client" -- "flutter run"
      description: "Start the Client app. Pass platform using -- -d <platform>, e.g. -d chrome"

    start:staff:
      run: melos exec --scope="krowwithus_staff" -- "flutter run"
      description: "Start the Staff app. Pass platform using -- -d <platform>, e.g. -d chrome"

    start:design-system:
      run: melos exec --scope="design_system_viewer" -- "flutter run"
      description: "Start the Design System Viewer app. Pass platform using -- -d <platform>, e.g. -d chrome"
