feat(client_auth): implement error handling with localized messages feat(client_hubs): implement error handling with localized messages feat(client_billing): navigate to home after billing feat(client_coverage): navigate to home after coverage feat(client_create_order): navigate to home after create order feat(client_settings): navigate to home after settings feat(client_view_orders): show hub name in order card fix(client_auth): handle existing firebase accounts during sign-up This commit introduces a new utility function, `translateErrorKey`, to translate error message keys to localized strings. It also adds new error messages to the localization files for both English and Spanish. The commit also implements error handling with localized messages in the client authentication and hubs features. This makes it easier for users to understand what went wrong and how to fix it. Additionally, the commit updates the navigation flow for the billing, coverage, create order, and settings features to navigate to the home page after the user completes the action. Finally, the commit fixes a bug where the hub name was not being displayed in the order card.
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, and generate localization files:
# Using Makefile
make mobile-install
# Using Melos
melos bootstrap
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 - 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.