Add support for verificationId throughout the certificate flow: schema, GraphQL mutations/queries, domain, repositories, service implementation, and UI. - Backend: add verificationId to Certificate schema and include it in upsert/create mutations; add auth insecureReason notes to related connector operations. - Data layer: add verificationId parameter to StaffConnectorRepository API and propagation in implementation (SDK call remains commented with FIXME until dataconnect SDK is regenerated). - Domain: add verificationId field to StaffCertificate (constructor, copyWith, props). - Certificates flow: create verification via verificationService, pass returned verificationId to upsertStaffCertificate so the verification record is persisted with the certificate. - UI: update certificate upload page to show existing file path, disable editing of name/issuer/number, rearrange fields, move remove button, change file icon and text style. - Misc: minor lambda formatting cleanup in benefits mapping. Note: the generated dataconnect SDK must be refreshed to enable the new .verificationId(...) call (there is a commented FIXME in the connector implementation).
KROW Workforce Mobile 📱
This folder holds the mobile app code for the KROW Workforce apps. This project uses Melos to manage multiple Flutter packages and applications.
📂 Project Structure
The project is organized into modular packages to ensure separation of concerns and maintainability.
apps/: Main application entry points.client: The application for businesses/clients.staff: The application for workforce/staff.design_system_viewer: A gallery of our design system components.
packages/: Shared logic and feature modules.features/: UI and business logic for specific features (e.g., Auth, Home, Hubs).features/client: Client specific features.features/staff: Staff specific features.
design_system/: Shared UI components, tokens (colors, spacing), and core widgets.domain/: Shared business entities and repository interfaces.data_connect/: Data access layer (Mocks and Firebase Data Connect SDK).core_localization/: Internationalization using Slang.core/: Base utilities and common logic.
🚀 Getting Started
1. Prerequisites
Ensure you have the Flutter SDK installed and configured.
2. Initial Setup
Run the following command from the project root to install Melos, bootstrap all packages, generate localization files, and generate the Firebase Data Connect SDK:
# Using Makefile (Recommended)
make mobile-install
This command will:
- Install Melos if not already installed
- Generate the Firebase Data Connect SDK from schema files
- Bootstrap all packages (install dependencies)
- Generate localization files
Note: The Firebase Data Connect SDK files (dataconnect_generated/) are auto-generated and not committed to the repository. They will be regenerated automatically when you run make mobile-install or any mobile development commands.
3. Running the Apps
You can run the applications using Melos scripts or through the Makefile:
First, find your device ID:
flutter devices
Client App
# Using Melos
melos run start:client -- -d <device_id>
# Using Makefile (DEVICE defaults to 'android' if not specified)
make mobile-client-dev-android DEVICE=<device_id>
Staff App
# Using Melos
melos run start:staff -- -d <device_id>
# Using Makefile (DEVICE defaults to 'android' if not specified)
make mobile-staff-dev-android DEVICE=<device_id>
🛠 Useful Commands
- Bootstrap:
melos bootstrap(Installs all dependencies) - Generate All:
melos run gen:all(Localization + Code Generation) - Analyze:
melos run analyze:all - Test:
melos run test:all - Help:
melos run info(Shows all available custom scripts)
🏗 Coding Principles
- Clean Architecture: We strictly follow Domain-Driven Design and Clean Architecture.
- Modularity: Every feature should be its own package in
packages/features/. Client and staff specific features should be in their respective packages. - Consistency: Use the
design_systempackage for all UI elements to ensure a premium, unified look.