# KROW Workforce Monorepo

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.

## 🚀 Repository Structure

### 📦 Apps (`/apps`)
These are the production-ready applications for our users:
-   **`web-dashboard/`**: The primary React/Vite dashboard for Admin, Vendors, and Clients.
-   **`mobile/`**: Flutter applications for client and staff.
  - `client`: The application for final clients to manage orders and billing.
  - `staff`: The application for staff members (scheduling, clock-in/out, earnings).

### ⚙️ Backend (`/backend`)
The core data engine powering all applications:
-   **`dataconnect/`**: Firebase Data Connect configuration, GraphQL schemas (PostgreSQL), and auto-generated SDKs.

### 🛠️ 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).

### 📂 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 (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

This project uses a modular `Makefile` for all common tasks.

1.  **View available commands:**
    ```bash
    make help
    ```

2.  **Install dependencies (Web):**
    ```bash
    make install
    ```

3.  **Run the Web Dashboard locally:**
    ```bash
    make dev
    ```

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.
-   **[04-sync-prototypes.md](./docs/04-sync-prototypes.md)**: How to sync prototypes for local dev and AI context.

### Mobile Development Documentation
-   **[MOBILE/01-architecture-principles.md](./docs/MOBILE/01-architecture-principles.md)**: Flutter clean architecture, package roles, and dependency flow.
-   **[MOBILE/02-design-system-usage.md](./docs/MOBILE/02-design-system-usage.md)**: Design system components and theming guidelines.
-   **[MOBILE/00-agent-development-rules.md](./docs/MOBILE/00-agent-development-rules.md)**: Rules and best practices for mobile development.

## 🤝 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.
