Remove outdated architecture and API documentation for mobile apps

- Deleted api_map.mermaid files for both client and staff apps to remove obsolete API mappings.
- Removed architecture.md files for both client and staff apps to eliminate outdated architectural overviews.
- Deleted backend_architecture.mermaid files for both client and staff apps to clean up backend architecture diagrams.
- Removed overview.mermaid files for both client and staff apps to streamline application flow documentation.
- Deleted use-case flowchart.mermaid and use_case_flows.mermaid files for both client and staff apps to remove redundant use case diagrams.
This commit is contained in:
Achintha Isuru
2025-11-18 23:02:01 -05:00
parent e7d324407c
commit 7aa84bc536
14 changed files with 90 additions and 987 deletions

View File

@@ -4,11 +4,17 @@
# It is designed to be the main entry point for developers.
# Use .PHONY to declare targets that are not files, to avoid conflicts.
.PHONY: help install dev build integrate-export prepare-export deploy-launchpad deploy-launchpad-full deploy-app admin-install admin-dev admin-build deploy-admin deploy-admin-full configure-iap-launchpad configure-iap-admin list-iap-users remove-iap-user setup-labels export-issues create-issues-from-file install-git-hooks
.PHONY: help install dev build integrate-export prepare-export deploy-launchpad deploy-launchpad-full deploy-app admin-install admin-dev admin-build deploy-admin deploy-admin-full configure-iap-launchpad configure-iap-admin list-iap-users remove-iap-user setup-labels export-issues create-issues-from-file install-git-hooks mobile-client-install mobile-client-dev mobile-client-build mobile-staff-install mobile-staff-dev mobile-staff-build
# The default command to run if no target is specified (e.g., just 'make').
.DEFAULT_GOAL := help
# --- Flutter check ---
FLUTTER := $(shell which flutter)
ifeq ($(FLUTTER),)
$(error "flutter not found in PATH. Please install Flutter and add it to your PATH.")
endif
# --- Firebase & GCP Configuration ---
GCP_DEV_PROJECT_ID := krow-workforce-dev
GCP_STAGING_PROJECT_ID := krow-workforce-staging
@@ -61,6 +67,15 @@ help:
@echo " make dev - Starts the local web frontend server."
@echo " make build - Builds the web frontend for production."
@echo ""
@echo " --- MOBILE APP DEVELOPMENT ---"
@echo " make mobile-client-install - Install dependencies for client app"
@echo " make mobile-client-dev - Run client app in development mode"
@echo " make mobile-client-build - Build client app (requires ENV & PLATFORM)"
@echo ""
@echo " make mobile-staff-install - Install dependencies for staff app"
@echo " make mobile-staff-dev - Run staff app in development mode"
@echo " make mobile-staff-build - Build staff app (requires ENV & PLATFORM)"
@echo ""
@echo " --- DEPLOYMENT ---"
@echo " make deploy-launchpad-full - Deploys internal launchpad to Cloud Run (dev only) with IAP."
@echo " make deploy-admin-full [ENV=staging] - Deploys Admin Console to Cloud Run with IAP (default: dev)."
@@ -72,7 +87,7 @@ help:
@echo ""
@echo " --- PROJECT MANAGEMENT & TOOLS ---"
@echo " make setup-labels - Creates/updates GitHub labels from labels.yml."
@echo " make export-issues [ARGS="--state=all --label=bug"] - Exports GitHub issues to a markdown file. See scripts/export_issues.sh for options."
@echo " make export-issues [ARGS=\"--state=all --label=bug\"] - Exports GitHub issues to a markdown file. See scripts/export_issues.sh for options."
@echo " make create-issues-from-file - Bulk creates GitHub issues from a markdown file."
@echo " make install-git-hooks - Installs git pre-push hook to protect main/dev branches."
@echo ""
@@ -176,7 +191,7 @@ configure-iap-launchpad:
@gcloud run services add-iam-policy-binding $(CR_LAUNCHPAD_SERVICE_NAME) \
--region=$(CR_LAUNCHPAD_REGION) \
--project=$(GCP_DEV_PROJECT_ID) \
--member="serviceAccount:$(IAP_SERVICE_ACCOUNT)" \
--member=\"serviceAccount:$(IAP_SERVICE_ACCOUNT)\" \
--role='roles/run.invoker' \
--quiet
@echo " - Adding users from iap-users.txt..."
@@ -188,7 +203,7 @@ configure-iap-launchpad:
--resource-type=cloud-run \
--service=$(CR_LAUNCHPAD_SERVICE_NAME) \
--region=$(CR_LAUNCHPAD_REGION) \
--member="$$member" \
--member=\"$$member\" \
--role='roles/iap.httpsResourceAccessor' \
--quiet; \
done
@@ -200,7 +215,7 @@ configure-iap-admin:
@gcloud run services add-iam-policy-binding $(CR_ADMIN_SERVICE_NAME) \
--region=$(CR_ADMIN_REGION) \
--project=$(GCP_PROJECT_ID) \
--member="serviceAccount:$(IAP_SERVICE_ACCOUNT)" \
--member=\"serviceAccount:$(IAP_SERVICE_ACCOUNT)\" \
--role='roles/run.invoker' \
--quiet
@echo " - Adding users from iap-users.txt..."
@@ -212,7 +227,7 @@ configure-iap-admin:
--resource-type=cloud-run \
--service=$(CR_ADMIN_SERVICE_NAME) \
--region=$(CR_ADMIN_REGION) \
--member="$$member" \
--member=\"$$member\" \
--role='roles/iap.httpsResourceAccessor' \
--quiet; \
done
@@ -237,7 +252,7 @@ remove-iap-user:
--resource-type=cloud-run \
--service=$(IAP_SERVICE_NAME) \
--region=$(IAP_SERVICE_REGION) \
--member="$(USER)" \
--member=\"$(USER)\" \
--role='roles/iap.httpsResourceAccessor' \
--quiet
@echo "✅ User removed from IAP."
@@ -312,4 +327,70 @@ dataconnect-init:
dataconnect-deploy:
@echo "--> Deploying Firebase Data Connect schemas to [$(ENV)] (project: $(FIREBASE_ALIAS))..."
@firebase deploy --only dataconnect --project=$(FIREBASE_ALIAS)
@echo "✅ Data Connect deployment completed for [$(ENV)]."
@echo "✅ Data Connect deployment completed for [$(ENV)]."
# --- Mobile App Development ---
FLAVOR :=
ifeq ($(ENV),dev)
FLAVOR := development
else ifeq ($(ENV),staging)
FLAVOR := staging
else ifeq ($(ENV),prod)
FLAVOR := production
endif
mobile-client-install:
@echo "--> Installing Flutter dependencies for client app..."
@cd mobile-apps/client-app && \
$(FLUTTER) pub get && \
$(FLUTTER) pub run build_runner build --delete-conflicting-outputs
mobile-client-dev:
@echo "--> Running client app in development mode..."
@echo "--> If using VS code, use the debug configurations"
@cd mobile-apps/client-app && $(FLUTTER) run --flavor development -t lib/main_dev.dart
mobile-client-build:
@if [ "$(ENV)" != "dev" ] && [ "$(ENV)" != "staging" ] && [ "$(ENV)" != "prod" ]; then \
echo "ERROR: ENV must be one of dev, staging, or prod."; exit 1; \
fi
@if [ "$(PLATFORM)" != "android" ] && [ "$(PLATFORM)" != "ios" ]; then \
echo "ERROR: PLATFORM must be either android or ios."; exit 1; \
fi
@echo "--> Building client app for $(PLATFORM) with flavor $(FLAVOR)..."
@cd mobile-apps/client-app && \
$(FLUTTER) pub get && \
$(FLUTTER) pub run build_runner build --delete-conflicting-outputs && \
if [ "$(PLATFORM)" = "android" ]; then \
$(FLUTTER) build appbundle --flavor $(FLAVOR); \
elif [ "$(PLATFORM)" = "ios" ]; then \
$(FLUTTER) build ipa --flavor $(FLAVOR); \
fi
mobile-staff-install:
@echo "--> Installing Flutter dependencies for staff app..."
@cd mobile-apps/staff-app && \
$(FLUTTER) pub get && \
$(FLUTTER) pub run build_runner build --delete-conflicting-outputs
mobile-staff-dev:
@echo "--> Running staff app in development mode..."
@echo "--> If using VS code, use the debug configurations"
@cd mobile-apps/staff-app && $(FLUTTER) run --flavor development -t lib/main_dev.dart
mobile-staff-build:
@if [ "$(ENV)" != "dev" ] && [ "$(ENV)" != "staging" ] && [ "$(ENV)" != "prod" ]; then \
echo "ERROR: ENV must be one of dev, staging, or prod."; exit 1; \
fi
@if [ "$(PLATFORM)" != "android" ] && [ "$(PLATFORM)" != "ios" ]; then \
echo "ERROR: PLATFORM must be either android or ios."; exit 1; \
fi
@echo "--> Building staff app for $(PLATFORM) with flavor $(FLAVOR)..."
@cd mobile-apps/staff-app && \
$(FLUTTER) pub get && \
$(FLUTTER) pub run build_runner build --delete-conflicting-outputs && \
if [ "$(PLATFORM)" = "android" ]; then \
$(FLUTTER) build appbundle --flavor $(FLAVOR); \
elif [ "$(PLATFORM)" = "ios" ]; then \
$(FLUTTER) build ipa --flavor $(FLAVOR); \
fi