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.
This commit is contained in:
82
.geminiignore
Normal file
82
.geminiignore
Normal file
@@ -0,0 +1,82 @@
|
||||
# =============================================================================
|
||||
# KROW Workforce - .geminiignore
|
||||
#
|
||||
# Indicates to Gemini which files/folders to ignore during analysis
|
||||
# to maintain relevant context and save tokens.
|
||||
# =============================================================================
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Standard Ignores (Same as .gitignore)
|
||||
# -----------------------------------------------------------------------------
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
coverage/
|
||||
.git/
|
||||
.idea/
|
||||
.vscode/
|
||||
.DS_Store
|
||||
secrets/
|
||||
.env*
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Package Manager Locks (Too large / No semantic value)
|
||||
# -----------------------------------------------------------------------------
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
pnpm-lock.yaml
|
||||
pubspec.lock
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build Artifacts & Caches
|
||||
# -----------------------------------------------------------------------------
|
||||
.firebase/
|
||||
.vite/
|
||||
.dart_tool/
|
||||
.pub-cache/
|
||||
.gradle/
|
||||
__pycache__/
|
||||
*.tsbuildinfo
|
||||
*.cache
|
||||
*.log
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Large Binary / Media Files
|
||||
# -----------------------------------------------------------------------------
|
||||
*.png
|
||||
*.jpg
|
||||
*.jpeg
|
||||
*.gif
|
||||
*.ico
|
||||
*.svg
|
||||
*.mp4
|
||||
*.mov
|
||||
*.pdf
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.apk
|
||||
*.aab
|
||||
*.ipa
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Generated Code (Reduce noise unless specifically debugging)
|
||||
# -----------------------------------------------------------------------------
|
||||
# Data Connect generated SDKs are useful for reference, but can be verbose.
|
||||
# Uncomment if you want Gemini to ignore them completely.
|
||||
# **/dataconnect-generated/
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Documentation to KEEP (Force Include)
|
||||
# -----------------------------------------------------------------------------
|
||||
# Ensure these are never ignored even if a broad rule matches
|
||||
!README.md
|
||||
!CONTRIBUTING.md
|
||||
!docs/*.md
|
||||
!docs/**/*.md
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Specific Directories
|
||||
# -----------------------------------------------------------------------------
|
||||
# Temporary migration folders
|
||||
_legacy/
|
||||
krow-workforce-export-latest/
|
||||
195
.gitignore
vendored
195
.gitignore
vendored
@@ -1,85 +1,164 @@
|
||||
# General
|
||||
# ----------------------------------------------------------------
|
||||
# macOS generated files
|
||||
# ==============================================================================
|
||||
# GLOBAL & OS
|
||||
# ==============================================================================
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
desktop.ini
|
||||
$RECYCLE.BIN/
|
||||
.Trash-*
|
||||
|
||||
# IDE configuration files
|
||||
# IDE & Editors
|
||||
.idea/
|
||||
.vscode/
|
||||
*.iml
|
||||
*.iws
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
\#*\#
|
||||
.\#*
|
||||
|
||||
# Log and cache files
|
||||
# Logs & Cache
|
||||
*.log
|
||||
*.cache
|
||||
*.pyc
|
||||
__pycache__/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Secrets (never commit these)
|
||||
# The secrets/ directory is handled by its own .gitignore, but this is an extra layer of safety.
|
||||
# Temporary Files
|
||||
*.tmp
|
||||
*.temp
|
||||
tmp/
|
||||
temp/
|
||||
|
||||
# ==============================================================================
|
||||
# SECURITY (CRITICAL)
|
||||
# ==============================================================================
|
||||
# Secrets directory (contains API keys, service accounts)
|
||||
secrets/
|
||||
*.env
|
||||
.env.*
|
||||
# Environment files
|
||||
.env
|
||||
.env.local
|
||||
.env.*.local
|
||||
.env.development
|
||||
.env.production
|
||||
.env.test
|
||||
!.env.example
|
||||
|
||||
# OS-specific files
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
# Certificates & Keys
|
||||
*.pem
|
||||
*.key
|
||||
*.jks
|
||||
*.keystore
|
||||
*.p12
|
||||
*.cer
|
||||
|
||||
# GCP Service Account Keys
|
||||
gcp_keys/
|
||||
**/*.service-account.json
|
||||
**/sa.json
|
||||
|
||||
# Frontend Web (Vite / React)
|
||||
# ----------------------------------------------------------------
|
||||
frontend-web/node_modules/
|
||||
frontend-web/dist/
|
||||
frontend-web/.env.local
|
||||
frontend-web/coverage/
|
||||
frontend-web/.vite/
|
||||
/frontend-web/src/dataconnect-generated/
|
||||
/internal-api-harness/src/dataconnect-generated/
|
||||
frontend-web-free/src/dataconnect-generated/
|
||||
# NPM Auth
|
||||
.npmrc
|
||||
**/.npmrc
|
||||
!**/.npmrc.template
|
||||
|
||||
# ==============================================================================
|
||||
# NODE.JS / WEB (React, Vite, Functions)
|
||||
# ==============================================================================
|
||||
node_modules/
|
||||
dist/
|
||||
dist-ssr/
|
||||
coverage/
|
||||
.nyc_output/
|
||||
.vite/
|
||||
.temp/
|
||||
*.local
|
||||
.eslintcache
|
||||
.stylelintcache
|
||||
.npm
|
||||
.turbo
|
||||
.vercel
|
||||
|
||||
# Vite timestamps
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
|
||||
# Generated Data Connect SDKs in web projects
|
||||
# Generally ignored as they are regenerated on build
|
||||
**/dataconnect-generated/
|
||||
|
||||
# ==============================================================================
|
||||
# FLUTTER / MOBILE
|
||||
# ==============================================================================
|
||||
# Flutter/Dart
|
||||
.dart_tool/
|
||||
.pub-cache/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
|
||||
# Mobile (Flutter)
|
||||
# ----------------------------------------------------------------
|
||||
# Android
|
||||
.gradle/
|
||||
**/android/app/libs/
|
||||
**/android/key.properties
|
||||
**/android/local.properties
|
||||
|
||||
mobile-apps/*/.dart_tool/
|
||||
mobile-apps/*/.pub-cache/
|
||||
mobile-apps/*/build/
|
||||
mobile-apps/*/.flutter-plugins
|
||||
mobile-apps/*/.flutter-plugins-dependencies
|
||||
# Build outputs
|
||||
build/
|
||||
|
||||
# iOS
|
||||
**/ios/Flutter/Generated.xcconfig
|
||||
**/ios/Flutter/flutter_export_environment.sh
|
||||
**/ios/Podfile.lock
|
||||
**/ios/Pods/
|
||||
**/ios/.symlinks/
|
||||
|
||||
# Firebase / Backend
|
||||
# ----------------------------------------------------------------
|
||||
# Python virtual environments
|
||||
firebase/functions/venv/
|
||||
firebase/dataconnect/venv/
|
||||
# ==============================================================================
|
||||
# FIREBASE & BACKEND
|
||||
# ==============================================================================
|
||||
# Firebase Cache & Emulators
|
||||
.firebase/
|
||||
dataconnect/.dataconnect/
|
||||
backend/dataconnect/.dataconnect/
|
||||
|
||||
# Firebase emulator logs
|
||||
*.log
|
||||
firebase-debug.log
|
||||
firebase-debug.*.log
|
||||
firestore-debug.log
|
||||
ui-debug.log
|
||||
# Debug Logs (Recursive)
|
||||
**/firebase-debug.log
|
||||
**/firebase-debug.*.log
|
||||
**/firestore-debug.log
|
||||
**/ui-debug.log
|
||||
**/database-debug.log
|
||||
**/pubsub-debug.log
|
||||
|
||||
# Generated SDKs (can be regenerated, so often ignored)
|
||||
# Decide with your team if you want to commit these or not.
|
||||
# For now, we will commit them to simplify setup for new developers.
|
||||
# @dataconnect/
|
||||
# Python Virtual Envs (if used)
|
||||
venv/
|
||||
env/
|
||||
ENV/
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
|
||||
# ==============================================================================
|
||||
# PROJECT SPECIFIC
|
||||
# ==============================================================================
|
||||
# Secure hashes are committed, but the raw user list is usually kept for reference
|
||||
# unless it contains sensitive info. Here we explicitly ignore the raw file.
|
||||
internal/launchpad/iap-users.txt
|
||||
|
||||
# Temporary files from this project
|
||||
# ----------------------------------------------------------------
|
||||
# The Base44 export directory should not be committed
|
||||
/krow-workforce-export-latest/
|
||||
|
||||
# The legacy Laravel project should not be committed
|
||||
/legacy-web/
|
||||
|
||||
# The temporary mobile app folders should not be committed
|
||||
/flutter-mobile-client-app/
|
||||
/flutter-mobile-staff-app/
|
||||
/inspiration/
|
||||
# Temporary migration artifacts
|
||||
_legacy/
|
||||
krow-workforce-export-latest/
|
||||
|
||||
111
README.md
111
README.md
@@ -1,81 +1,70 @@
|
||||
# Krow Workforce Management Platform
|
||||
# KROW Workforce Monorepo
|
||||
|
||||
Krow is a comprehensive monorepo platform designed to streamline workforce management for events, hospitality, and large-scale enterprise operations. It connects clients, operators, vendors, and staff in a unified ecosystem, leveraging modern technology to optimize every step from procurement to payroll.
|
||||
KROW is a comprehensive workforce management platform designed to streamline operations for events, hospitality, and enterprise staffing. This monorepo contains all components of the ecosystem, from the data layer to the user-facing applications.
|
||||
|
||||
## 🚀 What's in this Monorepo?
|
||||
## 🚀 Repository Structure
|
||||
|
||||
- **/firebase/**: This directory is the backbone of our backend infrastructure. It contains:
|
||||
- **Firestore Rules (`firestore.rules`):** Defines the security and access control logic for our NoSQL database, ensuring that users can only read and write data they are authorized to access.
|
||||
- **Cloud Storage Rules (`storage.rules`):** Secures file uploads and downloads (like compliance documents and user avatars).
|
||||
- **Data Connect (`dataconnect/`):** Houses the configuration for Firebase Data Connect, including the GraphQL schema, connectors, queries, and mutations that define our API layer.
|
||||
### 📦 Apps (`/apps`)
|
||||
These are the production-ready applications for our users:
|
||||
- **`web-dashboard/`**: The primary React/Vite dashboard for Admin, Vendors, and Clients.
|
||||
- **`mobile-client/`**: Flutter application for final clients to manage orders and billing.
|
||||
- **`mobile-staff/`**: Flutter application for staff members (scheduling, clock-in/out, earnings).
|
||||
|
||||
- **/admin-web/**: The central "mission control" for platform administrators. This React/Vite web application provides a secure interface for:
|
||||
- **User Management:** Inviting new users (the very first client or operator) and managing roles/permissions across the entire ecosystem.
|
||||
- **Platform Analytics:** Monitoring application usage, top pages, and user activity.
|
||||
- **System Logs:** A log explorer for diagnosing issues and monitoring the platform's health.
|
||||
### ⚙️ Backend (`/backend`)
|
||||
The core data engine powering all applications:
|
||||
- **`dataconnect/`**: Firebase Data Connect configuration, GraphQL schemas (PostgreSQL), and auto-generated SDKs.
|
||||
|
||||
- **/frontend-web/**: The primary web application for core business operations, used by procurement managers, operators, and clients. This React/Vite application includes modules for:
|
||||
- **Vendor Management:** Onboarding, compliance tracking, and performance scorecards.
|
||||
- **Event & Order Management:** Creating and managing staffing orders.
|
||||
- **Invoicing & Payroll:** Financial workflows for clients and staff.
|
||||
- **Dashboards:** Role-specific dashboards for different user types.
|
||||
### 🛠️ Internal (`/internal`)
|
||||
Tools and resources for the development and operations team:
|
||||
- **`launchpad/`**: A secure portal (DevOps Launchpad) to access internal resources, documentation, and infrastructure links.
|
||||
- **`api-harness/`**: A technical tool for testing and validating the Data Connect API and Cloud Functions.
|
||||
- **`prototypes/`**: Reference code and visual prototypes (synchronized from external sources).
|
||||
|
||||
- **/mobile-apps/**: This directory is planned for our future mobile applications. It is structured to contain two distinct apps:
|
||||
- `client-app`: A dedicated application for clients to create orders, track events, and manage billing on the go.
|
||||
- `staff-app`: An essential tool for workforce members to view schedules, clock in/out, manage their profiles, and track earnings.
|
||||
|
||||
- **/docs/**: The single source of truth for all project documentation. This includes:
|
||||
- **Vision & Roadmaps:** High-level strategy, product goals, and technical direction.
|
||||
- **Architecture:** Detailed diagrams and explanations of the system architecture.
|
||||
- **API Specifications:** Documentation for our GraphQL API.
|
||||
- **Development Guides:** Conventions, setup instructions, and maintenance procedures.
|
||||
|
||||
- **/scripts/**: A collection of automation scripts to streamline development and operational tasks. These scripts are primarily executed via the `Makefile` and handle tasks like database patching, environment setup, and code generation.
|
||||
|
||||
- **/secrets/**: A Git-ignored directory for storing sensitive credentials, API keys, and environment-specific configuration files. This ensures that no confidential information is ever committed to the repository.
|
||||
|
||||
## 📚 Documentation Overview
|
||||
|
||||
This section provides a quick guide to the most important documentation files in this monorepo, ordered by logical reading flow:
|
||||
|
||||
- **[00-vision.md](./docs/00-vision.md)**: The "Why" behind the KROW platform, outlining our core objectives and guiding principles.
|
||||
- **[01-product-functional-roadmap.md](./docs/01-product-functional-roadmap.md)**: The "What" we are building, from a user-facing features perspective.
|
||||
- **[02-architecture-overview.md](./docs/02-architecture-overview.md)**: Visual diagrams explaining the technical architecture of our web and mobile applications.
|
||||
- **[03-backend-api-specification.md](./docs/03-backend-api-specification.md)**: The detailed technical specification for our custom backend API.
|
||||
- **[04-strategy-technical-roadmap.md](./docs/04-strategy-technical-roadmap.md)**: Our strategic plan for building the platform, outlining phases and milestones.
|
||||
- **[05-project-plan.md](./docs/05-project-plan.md)**: A detailed breakdown of tasks by milestone, ready for GitHub Issues.
|
||||
- **[06-maintenance-guide.md](./docs/06-maintenance-guide.md)**: The operational manual for integrating updates from the Base44 visual builder.
|
||||
- **[07-reference-base44-api-export.md](./docs/07-reference-base44-api-export.md)**: The raw API documentation exported from Base44, used as a reference.
|
||||
- **[08-reference-base44-prompts.md](./docs/08-reference-base44-prompts.md)**: A collection of standardized prompts for interacting with the Base44 AI.
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
New to the KROW team? Start here to set up your environment and understand our development practices: **[CONTRIBUTING.md](./CONTRIBUTING.md)**
|
||||
### 📂 Support Directories
|
||||
- **`/docs`**: Project vision, technical specifications, and guides.
|
||||
- **`/makefiles`**: Modularized `Makefile` logic for project automation.
|
||||
- **`/scripts`**: Automation scripts (security, hachage, environment setup).
|
||||
- **`/firebase`**: Global Firebase configuration (Firestore/Storage rules).
|
||||
|
||||
## 🛠️ Tech Stack
|
||||
|
||||
- **Frontend:** React with Vite (JavaScript)
|
||||
- **Styling:** Tailwind CSS
|
||||
- **Backend:** Firebase (Firestore, Cloud Storage, Authentication, Data Connect)
|
||||
- **Mobile:** Flutter (planned)
|
||||
- **Frontend:** React (Vite)
|
||||
- **Mobile:** Flutter
|
||||
- **Backend:** Firebase (Data Connect, Auth, Hosting, Functions)
|
||||
- **Database:** PostgreSQL (managed via Cloud SQL & Data Connect)
|
||||
- **Infrastructure:** Google Cloud Platform (GCP)
|
||||
|
||||
## 📦 Getting Started
|
||||
|
||||
1. **Clone the repository:**
|
||||
This project uses a modular `Makefile` for all common tasks.
|
||||
|
||||
1. **View available commands:**
|
||||
```bash
|
||||
git clone https://github.com/Oloodi/krow.git
|
||||
cd krow
|
||||
make help
|
||||
```
|
||||
|
||||
2. **Install dependencies for the main web app:**
|
||||
2. **Install dependencies (Web):**
|
||||
```bash
|
||||
cd frontend-web
|
||||
npm install
|
||||
make install
|
||||
```
|
||||
|
||||
3. **Run the development server:**
|
||||
3. **Run the Web Dashboard locally:**
|
||||
```bash
|
||||
npm run dev
|
||||
make dev
|
||||
```
|
||||
|
||||
The main application will be available at `http://localhost:5173`. For other packages, refer to their respective `README.md` files.
|
||||
4. **Run the DevOps Launchpad locally:**
|
||||
```bash
|
||||
make launchpad-dev
|
||||
```
|
||||
|
||||
## 📚 Documentation
|
||||
- **[00-vision.md](./docs/00-vision.md)**: Project objectives and guiding principles.
|
||||
- **[01-backend-api-specification.md](./docs/01-backend-api-specification.md)**: (Legacy) Reference for data schemas.
|
||||
- **[02-codemagic-env-vars.md](./docs/02-codemagic-env-vars.md)**: Guide for CI/CD environment variables.
|
||||
- **[03-contributing.md](./docs/03-contributing.md)**: Guidelines for new developers and setup checklist.
|
||||
|
||||
## 🤝 Contributing
|
||||
New to the team? Please read our **[Contributing Guide](./docs/03-contributing.md)** to get your environment set up and understand our workflow.
|
||||
|
||||
---
|
||||
© 2026 KROW Workforce / Oloodi Technologies Inc.
|
||||
|
||||
41
apps/web-dashboard/.gitignore
vendored
41
apps/web-dashboard/.gitignore
vendored
@@ -1,41 +0,0 @@
|
||||
# Dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# Testing
|
||||
/coverage
|
||||
|
||||
# Vite
|
||||
.vite/
|
||||
.temp/
|
||||
|
||||
# Local Secrets
|
||||
.env
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Build output
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
141
build.gradle
141
build.gradle
@@ -1,141 +0,0 @@
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
// START: FlutterFire Configuration
|
||||
id 'com.google.gms.google-services'
|
||||
id 'com.google.firebase.crashlytics'
|
||||
// END: FlutterFire Configuration
|
||||
id "kotlin-android"
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.example.troywallet"
|
||||
compileSdk = 36
|
||||
ndkVersion = "25.1.8937393"
|
||||
//ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "com.example.troywallet"
|
||||
namespace("com.example.troywallet")
|
||||
minSdk = 29
|
||||
targetSdk = 35
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
multiDexEnabled true
|
||||
|
||||
}
|
||||
|
||||
// KeyStore //////////////////////////////////////////////////
|
||||
// - kast.keystore..alias android..pw=android..pw=android
|
||||
def keystorePropertiesFileNameDev = 'kast_key_dev.properties'
|
||||
def keystorePropertiesDev = new Properties()
|
||||
keystorePropertiesDev.load(new FileInputStream(rootProject.file(keystorePropertiesFileNameDev)))
|
||||
|
||||
def keystorePropertiesFileNameUat = 'kast_key_uat.properties'
|
||||
def keystorePropertiesUat = new Properties()
|
||||
keystorePropertiesUat.load(new FileInputStream(rootProject.file(keystorePropertiesFileNameUat)))
|
||||
|
||||
def keystorePropertiesFileNameStaging = 'kast_key_staging.properties'
|
||||
def keystorePropertiesStaging = new Properties()
|
||||
keystorePropertiesStaging.load(new FileInputStream(rootProject.file(keystorePropertiesFileNameStaging)))
|
||||
|
||||
def keystorePropertiesFileNameProd = 'kast_key_prod.properties'
|
||||
def keystorePropertiesProd = new Properties()
|
||||
keystorePropertiesProd.load(new FileInputStream(rootProject.file(keystorePropertiesFileNameProd)))
|
||||
|
||||
|
||||
signingConfigs {
|
||||
configDev {
|
||||
keyAlias keystorePropertiesDev['keyAlias']
|
||||
keyPassword keystorePropertiesDev['keyPassword']
|
||||
storeFile file('../kast_android_dev.jks') //keystorePropertiesSit['storeFile']
|
||||
storePassword keystorePropertiesDev['storePassword']
|
||||
}
|
||||
configUat {
|
||||
keyAlias keystorePropertiesUat['keyAlias']
|
||||
keyPassword keystorePropertiesUat['keyPassword']
|
||||
storeFile file('../kast_android_uat.jks') //keystorePropertiesPat['storeFile']
|
||||
storePassword keystorePropertiesUat['storePassword']
|
||||
}
|
||||
|
||||
configStaging {
|
||||
keyAlias keystorePropertiesStaging['keyAlias']
|
||||
keyPassword keystorePropertiesStaging['keyPassword']
|
||||
storeFile file('../kast_android_staging.jks') //keystorePropertiesPat['storeFile']
|
||||
storePassword keystorePropertiesStaging['storePassword']
|
||||
}
|
||||
configProd {
|
||||
keyAlias keystorePropertiesProd['keyAlias']
|
||||
keyPassword keystorePropertiesProd['keyPassword']
|
||||
storeFile file('../kast_android_prod.jks')
|
||||
storePassword keystorePropertiesProd['storePassword']
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "default"
|
||||
productFlavors {
|
||||
dev {
|
||||
dimension "default"
|
||||
applicationId "dev.kastcard.com"
|
||||
resValue "string", "app_name", "KAST DEV"
|
||||
resValue "string", "deeplink_prefix", "/dls"
|
||||
resValue "drawable", "ic_launcher", "@mipmap/ic_launcher_dev"
|
||||
signingConfig signingConfigs.configDev
|
||||
}
|
||||
uat {
|
||||
dimension "default"
|
||||
applicationId "uat.kastcard.com"
|
||||
resValue "string", "app_name", "KAST UAT"
|
||||
resValue "string", "deeplink_prefix", "/dlp"
|
||||
resValue "drawable", "ic_launcher", "@mipmap/ic_launcher_uat"
|
||||
signingConfig signingConfigs.configUat
|
||||
}
|
||||
staging {
|
||||
dimension "default"
|
||||
applicationId "stg.kastcard.com"
|
||||
resValue "string", "app_name", "KAST Staging"
|
||||
resValue "string", "deeplink_prefix", "/dlp"
|
||||
resValue "drawable", "ic_launcher", "@mipmap/ic_launcher_staging"
|
||||
signingConfig signingConfigs.configStaging
|
||||
}
|
||||
prod {
|
||||
dimension "default"
|
||||
applicationId "com.kastfinance.app"
|
||||
resValue "string", "app_name", "KAST"
|
||||
resValue "string", "deeplink_prefix", "/dlp"
|
||||
resValue "drawable", "ic_launcher", "@mipmap/ic_launcher_prod"
|
||||
signingConfig signingConfigs.configProd
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
shrinkResources false
|
||||
minifyEnabled false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "com.sumsub.sns:idensic-mobile-sdk-videoident:1.33.1"
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
|
||||
implementation(files("libs/mdisdk-release-1.2.54.aar"))
|
||||
}
|
||||
@@ -47,7 +47,7 @@ workflows:
|
||||
# =================================================================================
|
||||
client-app-base: &client-app-base
|
||||
name: Client App Base
|
||||
working_directory: mobile-apps/client-app
|
||||
working_directory: apps/mobile-client
|
||||
instance_type: mac_mini_m2
|
||||
max_build_duration: 60
|
||||
environment:
|
||||
@@ -57,15 +57,15 @@ workflows:
|
||||
cache:
|
||||
cache_paths:
|
||||
- $HOME/.pub-cache
|
||||
- $FCI_BUILD_DIR/mobile-apps/client-app/build
|
||||
- $FCI_BUILD_DIR/mobile-apps/client-app/.dart_tool
|
||||
- $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: mobile-apps/staff-app
|
||||
working_directory: apps/mobile-staff
|
||||
instance_type: mac_mini_m2
|
||||
max_build_duration: 60
|
||||
environment:
|
||||
@@ -75,8 +75,8 @@ workflows:
|
||||
cache:
|
||||
cache_paths:
|
||||
- $HOME/.pub-cache
|
||||
- $FCI_BUILD_DIR/mobile-apps/staff-app/build
|
||||
- $FCI_BUILD_DIR/mobile-apps/staff-app/.dart_tool
|
||||
- $FCI_BUILD_DIR/apps/mobile-staff/build
|
||||
- $FCI_BUILD_DIR/apps/mobile-staff/.dart_tool
|
||||
|
||||
# =================================================================================
|
||||
# Client App Workflows - Android
|
||||
|
||||
@@ -17,7 +17,7 @@ Follow these steps to set up your development environment and gain access to all
|
||||
|
||||
3. **Install & Configure Gemini CLI:**
|
||||
* Install the Gemini CLI on your local machine.
|
||||
* Familiarize yourself with its usage, especially for documentation updates (refer to `docs/06-maintenance-guide.md`).
|
||||
* Familiarize yourself with its usage for code assistance and documentation.
|
||||
|
||||
4. **Install & Configure Enpass:**
|
||||
* Install Enpass (our team's shared password manager).
|
||||
@@ -31,36 +31,34 @@ Follow these steps to set up your development environment and gain access to all
|
||||
* Clone the monorepo: `git clone git@github.com:Oloodi/krow-workforce.git`
|
||||
* Navigate to the project root: `cd krow-workforce`
|
||||
* Install web frontend dependencies: `make install`
|
||||
* *(Mobile app dependencies will be installed within their respective directories later.)*
|
||||
|
||||
- **Install Git Hooks:**
|
||||
- Run `make install-git-hooks` to set up local safeguards that prevent direct pushes to protected branches (`main` and `dev`). **This is a mandatory step.**
|
||||
|
||||
7. **Firebase Project Access Validation (CTO will provide access):**
|
||||
7. **Firebase Project Access Validation:**
|
||||
* Confirm you have access to the `dev` Firebase/GCP project.
|
||||
* Verify you can run `firebase login` and `gcloud auth login` successfully.
|
||||
|
||||
8. **Understand the Monorepo Structure:**
|
||||
* Familiarize yourself with the project layout as described in the main `README.md`.
|
||||
* Familiarize yourself with the project layout (`apps/`, `backend/`, `internal/`) as described in the main `README.md`.
|
||||
|
||||
---
|
||||
|
||||
## 💡 Development Guidelines
|
||||
|
||||
1. **Branching Strategy:**
|
||||
* We adopt a **feature branch workflow**. All code modifications must be done on a new branch, linked to a GitHub Issue.
|
||||
* We adopt a **feature branch workflow**. All code modifications must be done on a new branch.
|
||||
* The `main` and `dev` branches are protected.
|
||||
|
||||
2. **Commit Messages:**
|
||||
* Use **Open Commit** for intelligent and standardized Git commit messages.
|
||||
* Use clear and descriptive commit messages (standardized via Open Commit if available).
|
||||
|
||||
3. **Code Standards:**
|
||||
* Adhere to existing code style, formatting, and architectural patterns found in the codebase.
|
||||
* Run linters and formatters before committing.
|
||||
|
||||
4. **Documentation:**
|
||||
* Refer to the **[Documentation Overview](./README.md#documentation-overview)** in the main `README.md` for all project documentation.
|
||||
* For Base44 integration specifics, see **[06-maintenance-guide.md](./docs/06-maintenance-guide.md)**.
|
||||
* Keep documentation up to date in the `docs/` directory.
|
||||
|
||||
5. **Diagrams:**
|
||||
* All diagrams should be created using **Mermaid syntax** and stored in Markdown files.
|
||||
@@ -69,7 +67,8 @@ Follow these steps to set up your development environment and gain access to all
|
||||
|
||||
## 🔗 Useful Links
|
||||
|
||||
- **KROW Internal Launchpad:** *(Link will be provided after deployment to Firebase Hosting)*
|
||||
- **Project Vision:** [docs/00-vision.md](./docs/00-vision.md)
|
||||
- **Technical Roadmap:** [docs/04-strategy-technical-roadmap.md](./docs/04-strategy-technical-roadmap.md)
|
||||
- **Project Plan:** [docs/05-project-plan.md](./docs/05-project-plan.md)
|
||||
- **KROW Internal Launchpad:** [https://launchpad.krowwithus.com](https://launchpad.krowwithus.com)
|
||||
- **Project Vision:** [docs/00-vision.md](./00-vision.md)
|
||||
- **Backend Specification:** [docs/01-backend-api-specification.md](./01-backend-api-specification.md)
|
||||
- **Codemagic Env Vars:** [docs/02-codemagic-env-vars.md](./02-codemagic-env-vars.md)
|
||||
|
||||
8
internal/api-harness/.env.staging
Normal file
8
internal/api-harness/.env.staging
Normal file
@@ -0,0 +1,8 @@
|
||||
VITE_HARNESS_FIREBASE_API_KEY="AIzaSyC43vK-6gwtLcPoDHFAUH4g2vBj6YrRN2A"
|
||||
VITE_HARNESS_FIREBASE_AUTH_DOMAIN="krow-workforce-staging.firebaseapp.com"
|
||||
VITE_HARNESS_FIREBASE_PROJECT_ID="krow-workforce-staging"
|
||||
VITE_HARNESS_FIREBASE_STORAGE_BUCKET="krow-workforce-staging.firebasestorage.app"
|
||||
VITE_HARNESS_FIREBASE_MESSAGING_SENDER_ID="1032971403708"
|
||||
VITE_HARNESS_FIREBASE_APP_ID="1:1032971403708:web:7f877b82b3f5dbee356bb9"
|
||||
VITE_HARNESS_ENVIRONMENT="staging"
|
||||
VITE_API_BASE_URL="http://localhost:8080"
|
||||
24
internal/api-harness/.gitignore
vendored
24
internal/api-harness/.gitignore
vendored
@@ -1,24 +0,0 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
@@ -24,6 +24,40 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Prototypes",
|
||||
"iconColorClass": "bg-indigo-100",
|
||||
"iconPath": "assets/images/icon-design.svg",
|
||||
"links": [
|
||||
{
|
||||
"title": "Mobile Client MVP",
|
||||
"url": "/prototypes/mobile/client/index.html",
|
||||
"badge": "Concept",
|
||||
"badgeColorClass": "bg-blue-500",
|
||||
"containerClass": "bg-gradient-to-r from-blue-50 to-indigo-100 hover:from-blue-100 hover:to-indigo-200",
|
||||
"iconClass": "w-2 h-2 bg-blue-500 rounded-full",
|
||||
"textHoverClass": "group-hover:text-blue-700"
|
||||
},
|
||||
{
|
||||
"title": "Mobile Staff MVP",
|
||||
"url": "/prototypes/mobile/staff/index.html",
|
||||
"badge": "Concept",
|
||||
"badgeColorClass": "bg-green-500",
|
||||
"containerClass": "bg-gradient-to-r from-green-50 to-emerald-100 hover:from-green-100 hover:to-emerald-200",
|
||||
"iconClass": "w-2 h-2 bg-green-500 rounded-full",
|
||||
"textHoverClass": "group-hover:text-green-700"
|
||||
},
|
||||
{
|
||||
"title": "Web Dashboard MVP",
|
||||
"url": "/prototypes/web/index.html",
|
||||
"badge": "Concept",
|
||||
"badgeColorClass": "bg-purple-500",
|
||||
"containerClass": "bg-gradient-to-r from-purple-50 to-fuchsia-100 hover:from-purple-100 hover:to-fuchsia-200",
|
||||
"iconClass": "w-2 h-2 bg-purple-500 rounded-full",
|
||||
"textHoverClass": "group-hover:text-purple-700"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Legacy Mobile Apps",
|
||||
"iconColorClass": "bg-green-100",
|
||||
@@ -93,7 +127,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Design",
|
||||
"title": "Legacy Design",
|
||||
"iconColorClass": "bg-pink-100",
|
||||
"iconPath": "assets/images/icon-design.svg",
|
||||
"links": [
|
||||
|
||||
@@ -218,35 +218,3 @@ flowchart TD
|
||||
B5 --> E5[Display profile information];
|
||||
end
|
||||
```
|
||||
|
||||
## G. Replacing or Plugging in a New Backend: Considerations & Recommendations
|
||||
|
||||
This section provides guidance on how to replace the current GraphQL + Firebase backend with a different backend solution.
|
||||
|
||||
### Tightly Coupled Components
|
||||
|
||||
* **`ApiClient`:** This class is tightly coupled to `graphql_flutter`.
|
||||
* **Firebase Auth:** The authentication logic is directly tied to the `firebase_auth` package.
|
||||
* **BLoCs:** Some BLoCs might have direct dependencies on Firebase or GraphQL-specific models.
|
||||
|
||||
### Abstraction Recommendations
|
||||
|
||||
To make the architecture more backend-agnostic, the following abstractions should be implemented:
|
||||
|
||||
* **Repositories:** Create an abstract `Repository` class for each feature in the `domain` layer. The implementation of this repository will be in the `data` layer. The BLoCs should only depend on the abstract repository.
|
||||
* **Authentication Service:** Create an abstract `AuthService` class that defines the methods for authentication (e.g., `signIn`, `signOut`, `getToken`). The implementation of this service will be in the `data` layer and will use the specific authentication provider (e.g., Firebase Auth, OAuth).
|
||||
* **Data Transfer Objects (DTOs):** Use DTOs to transfer data between the data layer and the domain layer. This will prevent the domain layer from having dependencies on backend-specific models.
|
||||
|
||||
### Suggested Design Improvements
|
||||
|
||||
* **Formalize Clean Architecture:** While the current architecture has elements of Clean Architecture, it could be more formally implemented by creating a clear separation between the `domain`, `data`, and `presentation` layers for all features.
|
||||
* **Introduce Use Cases:** Introduce `UseCase` classes in the `domain` layer to encapsulate specific business operations. This will make the BLoCs simpler and more focused on state management.
|
||||
|
||||
### Migration Strategies
|
||||
|
||||
To replace the current backend with a new one (e.g., REST API, Supabase), follow these steps:
|
||||
|
||||
1. **Implement New Repositories:** Create new implementations of the repository interfaces for the new backend.
|
||||
2. **Implement New Auth Service:** Create a new implementation of the `AuthService` interface for the new authentication provider.
|
||||
3. **Update Dependency Injection:** Use dependency injection (e.g., `get_it` and `injectable`) to provide the new repository and auth service implementations to the BLoCs.
|
||||
4. **Gradual Migration:** If possible, migrate one feature at a time to the new backend. This will reduce the risk of breaking the entire application at once.
|
||||
|
||||
@@ -85,36 +85,3 @@ The application uses the **Bloc** library for state management.
|
||||
2. **Logic:** The `ShiftsBloc` requests a list of shifts.
|
||||
3. **Backend:** The use case calls the `ShiftsRepository`, which sends a `getShifts` query to the GraphQL server. The server fetches the shifts from Firestore.
|
||||
4. **Response:** The GraphQL server returns the list of shifts, which is then displayed on the UI.
|
||||
|
||||
## G. Replacing or Plugging in a New Backend: Considerations & Recommendations
|
||||
|
||||
This section provides guidance on how to replace the current GraphQL + Firebase backend with a different solution (e.g., REST, Supabase, Hasura).
|
||||
|
||||
### Tightly Coupled Components
|
||||
|
||||
- **Data Layer:** The current `ApiProvider` implementations are tightly coupled to the GraphQL API.
|
||||
- **Authentication:** The authentication flow is tightly coupled to Firebase Auth.
|
||||
- **DTOs:** The data transfer objects are generated based on the GraphQL schema.
|
||||
|
||||
### Abstraction Recommendations
|
||||
|
||||
To make the architecture more backend-agnostic, the following components should be abstracted:
|
||||
|
||||
- **Repositories:** The repository interfaces in the Domain Layer should remain unchanged. The implementations in the Data Layer will need to be rewritten for the new backend.
|
||||
- **Services:** Services like authentication should be abstracted behind an interface. For example, an `AuthService` interface can be defined in the Domain Layer, with a `FirebaseAuthService` implementation in the Data Layer.
|
||||
- **DTOs:** The DTOs should be mapped to domain entities in the Data Layer. This ensures that the Domain Layer is not affected by changes in the backend's data model.
|
||||
- **Error Handling:** A generic error handling mechanism should be implemented to handle different types of backend errors.
|
||||
|
||||
### Suggested Design Improvements
|
||||
|
||||
- **Introduce a Service Locator:** Use a service locator like `get_it` to decouple the layers and make it easier to swap out implementations.
|
||||
- **Define Abstract Data Sources:** Instead of directly calling the API client in the repository implementations, introduce abstract data source interfaces (e.g., `UserRemoteDataSource`). This adds another layer of abstraction and makes the repositories more testable.
|
||||
|
||||
### Migration Strategies
|
||||
|
||||
1. **Define Interfaces:** Start by defining abstract interfaces for all backend interactions (repositories, services).
|
||||
2. **Implement New Data Layer:** Create a new implementation of the Data Layer for the new backend. This will involve writing new repository implementations, API clients, and DTOs.
|
||||
3. **Swap Implementations:** Use the service locator to swap the old Data Layer implementation with the new one.
|
||||
4. **Test:** Thoroughly test the application to ensure that everything works as expected with the new backend.
|
||||
|
||||
By following these recommendations, the Krow Mobile Staff App can be migrated to a new backend with minimal impact on the overall architecture and business logic.
|
||||
|
||||
22
internal/launchpad/prototypes/mobile/client/index.html
Normal file
22
internal/launchpad/prototypes/mobile/client/index.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KROW Mobile Client - Prototype</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
<body class="bg-gray-100 flex items-center justify-center h-screen">
|
||||
<div class="text-center p-8 bg-white rounded-xl shadow-lg max-w-md">
|
||||
<div class="w-16 h-16 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg>
|
||||
</div>
|
||||
<h1 class="text-2xl font-bold text-gray-900 mb-2">Mobile Client App</h1>
|
||||
<p class="text-gray-500 mb-6">Interactive prototype placeholder.</p>
|
||||
<div class="animate-pulse flex space-x-4 justify-center">
|
||||
<div class="h-2 bg-gray-200 rounded w-12"></div>
|
||||
<div class="h-2 bg-gray-200 rounded w-12"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
22
internal/launchpad/prototypes/mobile/staff/index.html
Normal file
22
internal/launchpad/prototypes/mobile/staff/index.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KROW Mobile Staff - Prototype</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
<body class="bg-gray-100 flex items-center justify-center h-screen">
|
||||
<div class="text-center p-8 bg-white rounded-xl shadow-lg max-w-md">
|
||||
<div class="w-16 h-16 bg-green-100 text-green-600 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
|
||||
</div>
|
||||
<h1 class="text-2xl font-bold text-gray-900 mb-2">Mobile Staff App</h1>
|
||||
<p class="text-gray-500 mb-6">Interactive prototype placeholder.</p>
|
||||
<div class="animate-pulse flex space-x-4 justify-center">
|
||||
<div class="h-2 bg-gray-200 rounded w-12"></div>
|
||||
<div class="h-2 bg-gray-200 rounded w-12"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
22
internal/launchpad/prototypes/web/index.html
Normal file
22
internal/launchpad/prototypes/web/index.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KROW Web Dashboard - Prototype</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
<body class="bg-gray-100 flex items-center justify-center h-screen">
|
||||
<div class="text-center p-8 bg-white rounded-xl shadow-lg max-w-md">
|
||||
<div class="w-16 h-16 bg-purple-100 text-purple-600 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path></svg>
|
||||
</div>
|
||||
<h1 class="text-2xl font-bold text-gray-900 mb-2">Web Dashboard</h1>
|
||||
<p class="text-gray-500 mb-6">Interactive prototype placeholder.</p>
|
||||
<div class="animate-pulse flex space-x-4 justify-center">
|
||||
<div class="h-2 bg-gray-200 rounded w-12"></div>
|
||||
<div class="h-2 bg-gray-200 rounded w-12"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user