Files
Krow-workspace/codemagic.yaml
bwnyasse 3c0488576b refactor: restructure monorepo to align with industry standards
This commit restructures the monorepo to improve organization,
maintainability, and scalability. The changes include:

- Moving mobile apps from `mobile-apps/` to `apps/mobile-*`.
- Moving the web dashboard from `admin-web/` and `frontend-web/`
 to `apps/web-dashboard/`.
- Moving Firebase-related files to the root `firebase/` directory.
- Adding a `.geminiignore` file to exclude unnecessary files from
 Gemini analysis.
- Updating `.gitignore` to reflect the new structure and exclude
 sensitive files.
- Updating `codemagic.yaml` to reflect the new app locations.
- Adding a `make help` command to the root directory.
- Adding a `make install-git-hooks` command to install git hooks.
- Adding a `docs/02-codemagic-env-vars.md` file to document
 Codemagic environment variables.
- Adding a `docs/03-contributing.md` file to document
 contribution guidelines.
- Adding prototype placeholders to the internal launchpad.
- Updating the `README.md` file to reflect the new structure and
 provide updated instructions.

These changes improve the overall structure of the monorepo and
make it easier to develop, maintain, and scale the KROW Workforce
platform.
2026-01-10 22:36:29 -05:00

242 lines
7.4 KiB
YAML

# Reusable script for building the Flutter app
client-app-android-apk-build-script: &client-app-android-apk-build-script
name: 👷🤖 Build Client App APK (Android)
script: |
make -C ../.. mobile-client-build ENV=$ENV PLATFORM=android BUILD_TYPE=apk
client-app-ios-build-script: &client-app-ios-build-script
name: 👷🍎 Build Client App (iOS)
script: |
make -C ../.. mobile-client-build ENV=$ENV PLATFORM=ios
staff-app-android-apk-build-script: &staff-app-android-apk-build-script
name: 👷🤖 Build Staff App APK (Android)
script: |
make -C ../.. mobile-staff-build ENV=$ENV PLATFORM=android BUILD_TYPE=apk
staff-app-ios-build-script: &staff-app-ios-build-script
name: 👷🍎 Build Staff App (iOS)
script: |
make -C ../.. mobile-staff-build ENV=$ENV PLATFORM=ios
# Reusable script for distributing Android to Firebase
distribute-android-script: &distribute-android-script
name: 🚛🤖 Distribute Android to Firebase App Distribution
script: |
# Distribute Android APK
firebase appdistribution:distribute "build/app/outputs/flutter-apk/app-${ENV}-release.apk" \
--app $FIREBASE_APP_ID_ANDROID \
--release-notes "Build $FCI_BUILD_NUMBER - Environment: $ENV" \
--groups "$FIREBASE_TESTER_GROUPS" \
--token $FIREBASE_TOKEN
# Reusable script for distributing iOS to Firebase
distribute-ios-script: &distribute-ios-script
name: 🚛🍎 Distribute iOS to Firebase App Distribution
script: |
# Distribute iOS
firebase appdistribution:distribute "build/ios/ipa/app.ipa" \
--app $FIREBASE_APP_ID_IOS \
--release-notes "Build $FCI_BUILD_NUMBER - Environment: $ENV" \
--groups "$FIREBASE_TESTER_GROUPS" \
--token $FIREBASE_TOKEN
workflows:
# =================================================================================
# Base workflow for client_app
# =================================================================================
client-app-base: &client-app-base
name: Client App Base
working_directory: apps/mobile-client
instance_type: mac_mini_m2
max_build_duration: 60
environment:
flutter: stable
xcode: latest
cocoapods: default
cache:
cache_paths:
- $HOME/.pub-cache
- $FCI_BUILD_DIR/apps/mobile-client/build
- $FCI_BUILD_DIR/apps/mobile-client/.dart_tool
# =================================================================================
# Base workflow for staff_app
# =================================================================================
staff-app-base: &staff-app-base
name: Staff App Base
working_directory: apps/mobile-staff
instance_type: mac_mini_m2
max_build_duration: 60
environment:
flutter: stable
xcode: latest
cocoapods: default
cache:
cache_paths:
- $HOME/.pub-cache
- $FCI_BUILD_DIR/apps/mobile-staff/build
- $FCI_BUILD_DIR/apps/mobile-staff/.dart_tool
# =================================================================================
# Client App Workflows - Android
# =================================================================================
client-app-dev-android:
<<: *client-app-base
name: 🚛🤖 Client App Dev (Android App Distribution)
environment:
flutter: stable
xcode: latest
cocoapods: default
groups:
- client_app_dev_credentials
vars:
ENV: dev
scripts:
- *client-app-android-apk-build-script
- *distribute-android-script
client-app-staging-android:
<<: *client-app-base
name: 🚛🤖 Client App Staging (Android App Distribution)
environment:
flutter: stable
xcode: latest
cocoapods: default
groups:
- client_app_staging_credentials
vars:
ENV: staging
scripts:
- *client-app-android-apk-build-script
- *distribute-android-script
client-app-prod-android:
<<: *client-app-base
name: 🚛🤖 Client App Prod (Android App Distribution)
environment:
groups:
- client_app_prod_credentials
vars:
ENV: prod
scripts:
- *client-app-android-apk-build-script
- *distribute-android-script
# =================================================================================
# Client App Workflows - iOS
# =================================================================================
client-app-dev-ios:
<<: *client-app-base
name: 🚛🍎 Client App Dev (iOS App Distribution)
environment:
groups:
- client_app_dev_credentials
vars:
ENV: dev
scripts:
- *client-app-ios-build-script
- *distribute-ios-script
client-app-staging-ios:
<<: *client-app-base
name: 🚛🍎 Client App Staging (iOS App Distribution)
environment:
groups:
- client_app_staging_credentials
vars:
ENV: staging
scripts:
- *client-app-ios-build-script
- *distribute-ios-script
client-app-prod-ios:
<<: *client-app-base
name: 🚛🍎 Client App Prod (iOS App Distribution)
environment:
groups:
- client_app_prod_credentials
vars:
ENV: prod
scripts:
- *client-app-ios-build-script
- *distribute-ios-script
# =================================================================================
# Staff App Workflows - Android
# =================================================================================
staff-app-dev-android:
<<: *staff-app-base
name: 🚛🤖👨‍🍳 Staff App Dev (Android App Distribution)
environment:
groups:
- staff_app_dev_credentials
vars:
ENV: dev
scripts:
- *staff-app-android-apk-build-script
- *distribute-android-script
staff-app-staging-android:
<<: *staff-app-base
name: 🚛🤖👨‍🍳 Staff App Staging (Android App Distribution)
environment:
groups:
- staff_app_staging_credentials
vars:
ENV: staging
scripts:
- *staff-app-android-apk-build-script
- *distribute-android-script
staff-app-prod-android:
<<: *staff-app-base
name: 🚛🤖👨‍🍳 Staff App Prod (Android App Distribution)
environment:
groups:
- staff_app_prod_credentials
vars:
ENV: prod
scripts:
- *staff-app-android-apk-build-script
- *distribute-android-script
# =================================================================================
# Staff App Workflows - iOS
# =================================================================================
staff-app-dev-ios:
<<: *staff-app-base
name: 🚛🍎👨‍🍳 Staff App Dev (iOS App Distribution)
environment:
groups:
- staff_app_dev_credentials
vars:
ENV: dev
scripts:
- *staff-app-ios-build-script
- *distribute-ios-script
staff-app-staging-ios:
<<: *staff-app-base
name: 🚛🍎👨‍🍳 Staff App Staging (iOS App Distribution)
environment:
groups:
- staff_app_staging_credentials
vars:
ENV: staging
scripts:
- *staff-app-ios-build-script
- *distribute-ios-script
staff-app-prod-ios:
<<: *staff-app-base
name: 🚛🍎👨‍🍳 Staff App Prod (iOS App Distribution)
environment:
groups:
- staff_app_prod_credentials
vars:
ENV: prod
scripts:
- *staff-app-ios-build-script
- *distribute-ios-script