feat: add bug reports and screenshots to bugs directory feat(mobile): add device id to mobile makefile commands fix(mobile): update mobile readme with device id instructions fix(core_localization): update strings.g.dart with latest generation chore: add flutter ephemeral files to gitignore The CLAUDE.md and GEMINI.md files were added to provide AI assistants with the necessary context to understand the project structure, key commands, architecture patterns, and code conventions. This will help them generate more accurate and relevant code and documentation. The bugs directory was added to store bug reports and screenshots, providing a central location for tracking and analyzing issues. The mobile makefile commands were updated to include the device ID, allowing developers to specify the target device for running mobile apps. The mobile readme was updated with instructions on how to find the device ID. The strings.g.dart file was updated with the latest generation to ensure that the localization data is up-to-date. The flutter ephemeral files were added to gitignore to prevent them from being committed to the repository. These files are generated by Flutter for desktop platforms and should not be tracked.
74 lines
2.6 KiB
Markdown
74 lines
2.6 KiB
Markdown
# KROW Workforce Mobile 📱
|
|
|
|
This folder holds the mobile app code for the KROW Workforce apps.
|
|
This project uses [Melos](https://melos.invertase.dev/) 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:
|
|
|
|
```bash
|
|
# 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:
|
|
```bash
|
|
flutter devices
|
|
```
|
|
|
|
#### Client App
|
|
```bash
|
|
# 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
|
|
```bash
|
|
# 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_system` package for all UI elements to ensure a premium, unified look.
|