diff --git a/.gitignore b/.gitignore index 002c7891..698588b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,41 +1,80 @@ -# 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 +# General +# ---------------------------------------------------------------- +# macOS generated files .DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? \ No newline at end of file +.AppleDouble +.LSOverride + +# IDE configuration files +.idea/ +.vscode/ +*.iml +*.iws + +# Log and cache files +*.log +*.cache +*.pyc +__pycache__/ + +# Secrets (never commit these) +# The secrets/ directory is handled by its own .gitignore, but this is an extra layer of safety. +secrets/ +*.env +.env.* +!.env.example + +# OS-specific files +Thumbs.db +ehthumbs.db + + +# Frontend Web (Vite / React) +# ---------------------------------------------------------------- +frontend-web/node_modules/ +frontend-web/dist/ +frontend-web/.env.local +frontend-web/coverage/ +frontend-web/.vite/ + + +# Mobile (Flutter) +# ---------------------------------------------------------------- +mobile-apps/*/.dart_tool/ +mobile-apps/*/.pub-cache/ +mobile-apps/*/build/ +mobile-apps/*/.flutter-plugins +mobile-apps/*/.flutter-plugins-dependencies + + +# Firebase / Backend +# ---------------------------------------------------------------- +# Python virtual environments +firebase/functions/venv/ +firebase/dataconnect/venv/ + +# Firebase emulator logs +*.log +firebase-debug.log +firebase-debug.*.log +firestore-debug.log +ui-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/ + + +# 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/ diff --git a/.vite/deps/_metadata.json b/.vite/deps/_metadata.json new file mode 100644 index 00000000..30dfc061 --- /dev/null +++ b/.vite/deps/_metadata.json @@ -0,0 +1,8 @@ +{ + "hash": "a9c6eceb", + "configHash": "708dd0df", + "lockfileHash": "e3b0c442", + "browserHash": "0c8cee9f", + "optimized": {}, + "chunks": {} +} \ No newline at end of file diff --git a/.vite/deps/package.json b/.vite/deps/package.json new file mode 100644 index 00000000..3dbc1ca5 --- /dev/null +++ b/.vite/deps/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..1e3df2f2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,72 @@ +# Contributing to KROW Workforce Platform + +Welcome to the KROW Workforce development team! This guide will help you get set up and understand our development practices. + +--- + +## 🚀 Getting Started & Setup Checklist + +Follow these steps to set up your development environment and gain access to all necessary resources. + +1. **Access Google Chat Space:** + * Ensure you have been invited to and joined our main Google Chat space for daily communication and quick questions. + +2. **GitHub Access & SSH Key:** + * Confirm you have read/write access to this GitHub repository. + * Configure your SSH key for GitHub. Ensure your commits are verified (GPG signing is recommended). + +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`). + +4. **Install & Configure Enpass:** + * Install Enpass (our team's shared password manager). + * Ensure you have access to the shared KROW vault for all project credentials (API keys, service accounts, etc.). + +5. **Install Recommended Development Tools:** + * **IDE:** We recommend **VS Code** or **Vim/Neovim** for development. + * **Diagramming:** Use **MermaidChart.com** for creating and editing diagrams (Mermaid syntax). + +6. **Local Development Environment Setup:** + * 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.)* + +7. **Firebase Project Access Validation (CTO will provide access):** + * 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`. + +--- + +## 💡 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. + * The `main` and `dev` branches are protected. + +2. **Commit Messages:** + * Use **Open Commit** for intelligent and standardized Git commit messages. + +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)**. + +5. **Diagrams:** + * All diagrams should be created using **Mermaid syntax** and stored in Markdown files. + +--- + +## 🔗 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) diff --git a/Makefile b/Makefile index ee557d49..c964d61b 100644 --- a/Makefile +++ b/Makefile @@ -11,34 +11,34 @@ # Installs all project dependencies using npm. install: - @echo "--> Installing project dependencies..." - @npm install + @echo "--> Installing web frontend dependencies..." + @cd frontend-web && npm install # Starts the local development server. dev: - @echo "--> Starting development server on http://localhost:5173 ..." - @npm run dev + @echo "--> Starting web frontend development server on http://localhost:5173 ..." + @cd frontend-web && npm run dev # Builds the application for production. build: - @echo "--> Building application for production..." - @npm run build + @echo "--> Building web frontend for production..." + @cd frontend-web && npm run build # Integrates a new Base44 export into the current project. -# It replaces the src directory and the index.html file. -# Prerequisite: The new export must be in a folder named '../krow-workforce-web-export-latest'. +# It replaces the src directory and the index.html file in the frontend-web directory. +# Prerequisite: The new export must be in a folder named '../krow-workforce-export-latest'. integrate-export: - @echo "--> Integrating new Base44 export..." - @if [ ! -d "../krow-workforce-web-export-latest" ]; then \ - echo "❌ Error: Export directory '../krow-workforce-web-export-latest' not found."; \ + @echo "--> Integrating new Base44 export into frontend-web/..." + @if [ ! -d "../krow-workforce-export-latest" ]; then \ + echo "❌ Error: Export directory '../krow-workforce-export-latest' not found."; \ exit 1; \ fi @echo " - Removing old src directory..." - @rm -rf src + @rm -rf frontend-web/src @echo " - Copying new src directory..." - @cp -R ../krow-workforce-web-export-latest/src ./src + @cp -R ../krow-workforce-export-latest/src ./frontend-web/src @echo " - Copying new index.html..." - @cp ../krow-workforce-web-export-latest/index.html ./index.html + @cp ../krow-workforce-export-latest/index.html ./frontend-web/index.html @echo "--> Integration complete. Next step: 'make prepare-export'." # Applies all necessary patches to a fresh Base44 export to run it locally. @@ -53,10 +53,10 @@ help: @echo "--------------------------------------------------" @echo " KROW Workforce - Available Makefile Commands" @echo "--------------------------------------------------" - @echo " make install - Installs project dependencies." - @echo " make dev - Starts the local development server." - @echo " make build - Builds the application for production." - @echo " make integrate-export - Integrates a new Base44 export from '../krow-workforce-web-export-latest'." + @echo " make install - Installs web frontend dependencies." + @echo " make dev - Starts the local web frontend server." + @echo " make build - Builds the web frontend for production." + @echo " make integrate-export - Integrates a new Base44 export from '../krow-workforce-export-latest'." @echo " make prepare-export - Prepares a fresh Base44 export for local use." @echo " make help - Shows this help message." @echo "--------------------------------------------------" diff --git a/README.md b/README.md index ab67fcae..842839ba 100644 --- a/README.md +++ b/README.md @@ -1,72 +1,55 @@ -# KROW Workforce - Frontend +# KROW Workforce Platform -Ce projet contient le code du frontend pour la plateforme KROW Workforce. Il a été initialement prototypé sur la plateforme low-code Base44 et est en cours de migration vers une infrastructure backend personnalisée sur Google Cloud Platform (GCP). +This monorepo contains the complete source code for the KROW Workforce platform, including the web frontend, mobile applications, and backend services. -Ce `README.md` est le guide officiel pour l'équipe de développement. **NE PAS REMPLACER** ce fichier par celui fourni dans les exports de Base44. +## 🚀 What's in this Monorepo? ---- +- **/firebase/**: Contains the Firebase Data Connect configuration (GraphQL schema, queries, mutations) and Firebase Hosting configuration. +- **/frontend-web/**: The React/Vite web application used by administrators and managers. +- **/mobile-apps/**: Contains the two Flutter-based mobile applications: + - `client-app`: For clients managing events. + - `staff-app`: For staff members managing their shifts and profile. +- **/docs/**: All project documentation (vision, roadmaps, architecture, guides). +- **/scripts/**: Automation scripts used by the `Makefile`. +- **/secrets/**: Contains sensitive credentials (ignored by Git). -## 🚀 Démarrage Rapide +## ▶️ Getting Started -Ce projet utilise un `Makefile` comme point d'entrée principal pour toutes les commandes courantes. +This project uses a central `Makefile` to orchestrate all common tasks. -### Prérequis -- Node.js (version LTS recommandée) -- npm -- `make` (généralement pré-installé sur Linux et macOS) - -### Installation et Lancement -1. **Installer les dépendances :** +1. **Install Dependencies:** ```bash make install ``` + *(This will install dependencies for the web frontend. Mobile dependency installation is handled within their respective directories.)* -2. **Lancer le serveur de développement :** +2. **Run a Service:** + - To run the web frontend: `make dev` + - *(Additional commands for mobile and backend will be added as development progresses.)* + +3. **See All Commands:** + For a full list of available commands, run: ```bash - make dev +bash + make help ``` - L'application sera disponible sur `http://localhost:5173`. + +## 🤝 Contributing + +New to the KROW team? Start here to set up your environment and understand our development practices: **[CONTRIBUTING.md](./CONTRIBUTING.md)** --- -## 🔄 Workflow d'Intégration des Mises à Jour de Base44 +## 📚 Documentation Overview -Pour intégrer les nouvelles modifications de l'UI faites par la cliente sur la plateforme Base44, suivez ce processus rigoureux : +This section provides a quick guide to the most important documentation files in this monorepo, ordered by logical reading flow: -### 1. Valider les Changements d'API -Avant d'intégrer le nouveau code, il est impératif de mettre à jour notre documentation API et notre spécification technique. Suivez rigoureusement la procédure détaillée dans le fichier `docs/MAINTENANCE_GUIDE.md`. - -### 2. Intégrer le Nouveau Frontend -1. **Créez une branche dédiée** dans Git : - ```bash - git checkout -b integration/base44-update-YYYY-MM-DD - ``` -2. **Placez l'export** de Base44 dans un dossier nommé `krow-workforce-web-export-latest` à côté du dossier de ce projet. La structure attendue est : - ``` - - /krow-workforce-web/ (ce projet) - - /krow-workforce-web-export-latest/ (le nouvel export) - ``` -3. **Exécutez la commande d'intégration** pour copier automatiquement les fichiers `src` et `index.html` : - ```bash - make integrate-export - ``` -4. **Exécutez le script de préparation** pour neutraliser le SDK Base44 et appliquer nos patchs : - ```bash - make prepare-export - ``` -5. **Analysez les différences** avec `git diff`. Intégrez les nouveaux composants et les modifications de l'UI, mais **rejetez les changements** sur les fichiers que nous avons patchés (`src/api/base44Client.js`, `src/main.jsx`, `src/pages/Layout.jsx`) pour conserver notre environnement local fonctionnel. Vérifiez également `package.json` pour toute nouvelle dépendance à ajouter manuellement. -6. **Testez l'application** en local avec `make dev` pour vous assurer que tout fonctionne comme prévu. -7. Commitez vos changements. - ---- - -## 📂 Structure du Projet - -- `scripts/prepare-export.js`: Script de patching pour le workflow hybride. -- `docs/`: Contient la documentation du projet (spécification de l'API, guides...). -- `src/`: Code source de l'application. - - `src/api/`: Contient la configuration du client API (actuellement mocké). - - `src/components/`: Composants React réutilisables. - - `src/pages/`: Vues principales de l'application, correspondant aux routes. - - `src/lib/`: Utilitaires et bibliothèques partagées. -- `Makefile`: Orchestrateur des commandes du projet. +- **[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. diff --git a/docs/00-vision.md b/docs/00-vision.md new file mode 100644 index 00000000..58312756 --- /dev/null +++ b/docs/00-vision.md @@ -0,0 +1,16 @@ +# KROW Platform Vision + +Our vision is to build a fully autonomous, modern, and scalable workforce management platform by leveraging a unified and productive tech stack. + +## Core Objective + +To achieve complete technical independence by consolidating the KROW platform (Web, Mobile Client, Mobile Staff) onto a single, robust, and maintainable ecosystem: **Firebase & Google Cloud**. + +## Guiding Principles + +1. **Velocity & Focus:** We will use tools that maximize the productivity of our small, focused development team. **Firebase Data Connect** and its generated SDKs are central to this principle. +2. **Unified Backend:** A single backend (Data Connect) will power all applications (Web, iOS, Android). This ensures data consistency, reduces code duplication, and simplifies maintenance. +3. **Scalability & Low Overhead:** We will rely on managed services (Cloud SQL, Firebase Auth, Firebase Hosting) to minimize operational burden and ensure high performance and reliability. +4. **Data Ownership & Future-Proofing:** We will have full control over our relational database (PostgreSQL). This is a strategic asset that will enable complex reporting and advanced features in the future. +5. **Base44 as a Design Accelerator:** We will treat the Base44 platform not as a system to migrate, but as an advanced visual prototyping tool. It defines the "what" (the UI/UX), and our team builds the "how" (the robust backend). +6. **Automation as a Force Multiplier:** We will automate all repetitive tasks (environment setup, deployment, testing) via a `Makefile` and CI/CD pipelines. This is crucial for our small team's efficiency and for reducing errors. \ No newline at end of file diff --git a/docs/01-product-functional-roadmap.md b/docs/01-product-functional-roadmap.md new file mode 100644 index 00000000..3f58a76b --- /dev/null +++ b/docs/01-product-functional-roadmap.md @@ -0,0 +1,84 @@ +# Product Roadmap: KROW Platform Foundation (3-Month Plan) + +**Project Name:** KROW - New Platform Foundation + +**Context:** We are leveraging the validated visual prototype from Base44 to rebuild the KROW platform on a modern, scalable, and proprietary technical infrastructure. This ensures a smooth transition and provides clear visibility on delivered features. + +**3-Month Goal:** To have a functional and autonomous first version of the KROW platform, including a web dashboard for event management and a mobile app for staff, all running on our new Google Cloud infrastructure. + +--- + +### **Detailed Product Roadmap (Client/CEO View)** + +#### **Phase 1: From Vision to Technical Foundation** + +**Goal of the Phase (for the client):** "We will transform your prototype into a concrete action plan. By the end of this phase, we will have a first version of the dashboard deployed where you can track our progress, and we will be fully independent to build and deploy future applications." + +**Visible Features Delivered at the End of Phase 1:** + +1. **A Preview Web Dashboard (React):** + * **Description:** A first version of the dashboard (based on the Base44 export) will be accessible via a private URL. Initially, the data will be static, but the visual interface will be live. + * **What this means for the client:** You will see the design and navigation of your dashboard come to life outside of Base44, on our own infrastructure. + +2. **A Foundation for the New Mobile Apps:** + * **Description:** The skeletons of the new Flutter apps (Staff and Client) will be created, with a functional login system. + * **What this means for the client:** The foundations for the future apps will be ready, and we will have validated our ability to deploy them automatically to the app stores (TestFlight for Apple, Internal Testing for Google). + +3. **A Documented V1 API Contract:** + * **Description:** A clear document that precisely describes how the frontend (web and mobile) will communicate with the backend. This is the "blueprint" of our system. + * **What this means for the client:** This guarantees that all parts of the KROW ecosystem (web, mobile, backend) will speak the same language, ensuring consistency and speed for future developments. + +**Technical Work Behind the Scenes (for the team):** +* Analysis of the Base44 code. +* Setup of the infrastructure on Google Cloud (Cloud SQL, Firebase Auth, Data Connect). +* Configuration of CI/CD pipelines for web (e.g., GitHub Actions) and mobile (e.g., CodeMagic). + +--- + +#### **Phase 2: The First Features Come to Life** + +**Goal of the Phase (for the client):** "You will start seeing your own data (events, staff) appear in the new dashboard. The staff mobile app will no longer be an empty shell but will display actual shifts. We are establishing a workflow that will allow you to continue prototyping in parallel with our development." + +**Visible Features Delivered at the End of Phase 2:** + +1. **An Event Management Dashboard (Read-only):** + * **Description:** The web dashboard will display the list of your events, hubs, and staff, reading the data directly from our new database. Create/edit functionalities will not be active yet. + * **What this means for the client:** You will be able to view your real operational data on the new interface, validating that our backend is correctly connected. + +2. **The Staff Mobile App (v2) Displays Real Shifts:** + * **Description:** A staff member will be able to log into the new app and see the list of shifts they are assigned to, with basic details (date, location, role). + * **What this means for the client:** The synergy between the backend and the mobile app is proven. The foundation is ready to add interactive features. + +3. **An Established Design-to-Development Iteration Workflow:** + * **Description:** We will have a clear process to "freeze" a version of the Base44 design for development, while giving you the freedom to work on the next version. + * **What this means for the client:** You can continue to innovate and prototype on Base44 without fear of disrupting the development team's work. + +**Technical Work Behind the Scenes:** +* Development of Data Connect queries to read data (`listEvents`, `listStaff`, etc.). +* Integration of TanStack Query in the dashboard for data management. +* Implementation of the service layer in the Flutter app to call the Data Connect SDK. + +--- + +#### **Phase 3: The First Complete Business Flow** + +**Goal of the Phase (for the client):** "By the end of this quarter, you will be able to perform a complete business action on the new platform: create a complex event on the web dashboard and instantly see the corresponding shifts appear on the staff mobile app." + +**Visible Features Delivered at the End of Phase 3:** + +1. **A Complete Event Creation and Modification Flow on the Web Dashboard:** + * **Description:** The event creation form will be fully functional. You will be able to create an event, add shifts, define positions with roles and rates, and assign contacts. + * **What this means for the client:** **You are now autonomous in managing the core of your operations on the new platform.** The Base44 prototype has been transformed into a functional production tool. + +2. **Synchronization Between Web and Mobile:** + * **Description:** A shift created or modified on the web dashboard will be immediately (or almost immediately) visible and updated on the mobile app of the concerned staff member. + * **What this means for the client:** The vision of a unified and reactive ecosystem is now a tangible reality. + +3. **A Stabilized Platform Ready for Growth:** + * **Description:** The technical foundation will have been tested, documented, and secured. + * **What this means for the client:** We have a solid foundation on which we can confidently build the more advanced features of your vision (KROW University, predictive AI, etc.). + +**Technical Work Behind the Scenes:** +* Development of complex Data Connect mutations for create/edit logic. +* Implementation of unit tests and security reviews. +* Finalization of the V1 API documentation. \ No newline at end of file diff --git a/docs/02-architecture-overview.md b/docs/02-architecture-overview.md new file mode 100644 index 00000000..b2113d20 --- /dev/null +++ b/docs/02-architecture-overview.md @@ -0,0 +1,95 @@ +# KROW Project Workflows + +This document contains diagrams describing the technical architecture and collaboration processes for the project. + +## 1. Web App Migration Architecture + +This diagram illustrates the migration workflow for the web application. It shows how the UI is exported from the Base44 environment and then connected to our new, unified backend built on Firebase services. + +```mermaid +graph LR + subgraph Base44 Environment + direction TB + Client[Client] -- Modifies --> B44_UI[Base44 Visual Builder
Features:
- Event Management
- Staff Directory] + B44_UI --> B44_Backend[Base44 Backend
Provides Schemas & SDK] + end + + subgraph Firebase Ecosystem - GCP + direction TB + KROW_FE[KROW Web Frontend
Vite/React + TanStack Query] + + subgraph Firebase Services + direction TB + Auth[Firebase Authentication] + DataConnect[Firebase Data Connect
GraphQL API] + SQL_DB[Cloud SQL for PostgreSQL] + end + + KROW_FE -- "Uses" --> Auth + KROW_FE -- "Calls API via SDK" --> DataConnect + DataConnect -- "Manages & Queries" --> SQL_DB + end + + B44_UI -- "UI Code Export" --> KROW_FE + + style Client fill:#f9f,stroke:#333,stroke-width:2px + style B44_UI fill:#ffe,stroke:#333,stroke-width:2px + style KROW_FE fill:#eef,stroke:#333,stroke-width:2px +``` + +## 2. Mobile App Architecture + +This diagram shows how the native mobile applications (Client and Staff) connect to the centralized Firebase backend. This backend is the same one used by the web application. + +```mermaid +graph TD + subgraph KROW Mobile Applications + direction LR + Mobile_Client[Mobile Client App
Flutter] + Mobile_Staff[Mobile Staff App
Flutter] + end + + subgraph Firebase Backend Services - GCP + direction TB + Auth[Firebase Authentication] + DataConnect[Firebase Data Connect
GraphQL API &
Generated SDKs] + SQL_DB[Cloud SQL for PostgreSQL
Managed by Data Connect] + end + + Mobile_Client -- "Authenticates with" --> Auth + Mobile_Client -- "Calls API via generated SDK" --> DataConnect + + Mobile_Staff -- "Authenticates with" --> Auth + Mobile_Staff -- "Calls API via generated SDK" --> DataConnect + + DataConnect -- "Manages & Queries" --> SQL_DB + + style Mobile_Client fill:#eef,stroke:#333,stroke-width:2px + style Mobile_Staff fill:#eef,stroke:#333,stroke-width:2px +``` + +## 3. Collaboration Workflow for Modifications + +This diagram formalizes the process to follow for any modifications initiated by the client on the Base44 platform. The objective is to control the pace of changes and evaluate their impact on our backend before integration. + +```mermaid +flowchart TD + A[Client identifies a need
for modification] --> B{Define functionality
and scope}; + + B --> C{Does the modification impact
only the UI or also
logic/data?}; + + C -- "UI Only" --> D[Client makes modifications
on Base44]; + C -- "Logic/Data" --> E[Team-Client Coordination
to assess impact on GCP backend]; + + D --> F[Planned export of the
new UI version]; + E --> F; + + F --> G["Developer runs the automation
1. `make integrate-export`
2. `make prepare-export`"]; + + G --> H[Development & Testing
- Adapt GCP backend if needed
- Validate locally]; + + H --> I[✅ Integration complete]; + + style A fill:#f9f,stroke:#333,stroke-width:2px + style D fill:#f9f,stroke:#333,stroke-width:2px +``` \ No newline at end of file diff --git a/docs/03-backend-api-specification.md b/docs/03-backend-api-specification.md new file mode 100644 index 00000000..53cf90c1 --- /dev/null +++ b/docs/03-backend-api-specification.md @@ -0,0 +1,131 @@ +# KROW Workforce API Specification (GCP Migration) + +**Version:** 2.0 +**Date:** 2025-11-11 +**Objective:** This document defines the backend API to be built on the Firebase/GCP ecosystem, replacing the Base44 backend. It is based on the comprehensive Base44 API documentation (v2.0) and will guide the development of the new backend using Firebase Data Connect and Cloud Functions. + +--- + +## General Conventions + +- **API Layer:** The backend will be composed of two main parts: + - **Firebase Data Connect:** A GraphQL API for all data-centric (CRUD) operations. + - **Cloud Functions:** A set of RESTful endpoints for all service-centric operations (e.g., sending emails, processing files). +- **Authentication:** Every request must include an `Authorization: Bearer ` header, managed and validated by Firebase. +- **Data Format:** All requests and responses will be in `application/json` format. +- **Error Responses:** Errors will use standard HTTP status codes (400, 401, 403, 404, 500) and include a JSON response body of the form `{ "error": "Problem description" }`. +- **Common Fields:** Each entity will have the following fields, automatically managed by the backend: + - `id`: `string` (UUID, Primary Key) + - `created_date`: `string` (ISO 8601 Timestamp) + - `updated_date`: `string` (ISO 8601 Timestamp) + - `created_by`: `string` (Email of the creating user) + +--- + +## 1. Authentication (Firebase Auth) + +Authentication will be handled entirely by Firebase Authentication. The client applications (web and mobile) are responsible for the sign-up and sign-in flows using the Firebase SDK. The backend will use the provided auth token to identify the user for all subsequent requests. + +### `User` Entity (Managed by Firebase Auth & Data Connect) + +| Field | Type | Description | +| ----------- | -------- | ----------------------------------------- | +| `id` | `string` | Firebase User ID (UID) | +| `email` | `string` | User's email (non-modifiable) | +| `full_name` | `string` | Full name | +| `user_role` | `string` | Custom application role (`admin`, `procurement`, `client`...) | +| `...other` | `any` | Other custom fields can be added. | + +--- + +## 2. Data API (Firebase Data Connect) + +All entities below will be managed via a GraphQL API powered by Firebase Data Connect. For each entity, standard `query` (list, get by ID) and `mutation` (create, update, delete) operations will be defined in the `firebase/dataconnect/` directory. + +### 2.1. Event + +**Description:** Manages events and workforce orders. + +| Field | Type | Description | +| ----------------------- | --------- | ------------------------------------------------ | +| `event_name` | `string` | Name of the event (required) | +| `is_recurring` | `boolean` | Indicates if the event is recurring | +| `recurrence_type` | `string` | `single`, `date_range`, `scatter` | +| `business_id` | `string` | ID of the client (`Business`) | +| `vendor_id` | `string` | ID of the provider (`Vendor`) | +| `status` | `string` | `Draft`, `Active`, `Pending`, `Assigned`, `Confirmed`, `Completed`, `Canceled` | +| `date` | `string` | Event date (ISO 8601) | +| `shifts` | `jsonb` | Array of `Shift` objects | +| `total` | `number` | Total cost | +| `requested` | `number` | Total number of staff requested | +| `assigned_staff` | `jsonb` | Array of assigned staff objects | + +### 2.2. Staff + +**Description:** Manages staff members. + +| Field | Type | Description | +| ------------------------- | --------- | ----------------------------------------- | +| `employee_name` | `string` | Full name (required) | +| `vendor_id` | `string` | ID of the provider (`Vendor`) | +| `email` | `string` | Email address | +| `position` | `string` | Primary job position/skill | +| `employment_type` | `string` | `Full Time`, `Part Time`, `On call`, etc. | +| `rating` | `number` | Performance rating (0-5) | +| `reliability_score` | `number` | Reliability score (0-100) | +| `background_check_status` | `string` | `pending`, `cleared`, `failed`, `expired` | +| `certifications` | `jsonb` | List of certifications | + +### 2.3. Vendor + +**Description:** Manages providers and their onboarding. + +| Field | Type | Description | +| ----------------------- | --------- | ----------------------------------------- | +| `vendor_number` | `string` | Vendor number (e.g., `VN-####`) | +| `legal_name` | `string` | Legal company name (required) | +| `primary_contact_email` | `string` | Primary contact email (required) | +| `approval_status` | `string` | `pending`, `approved`, `suspended`, `terminated` | +| `is_active` | `boolean` | Active status | +| `w9_document` | `string` | URL or URI of the W9 document | +| `coi_document` | `string` | URL or URI of the Certificate of Insurance| + +--- + +*Note: For brevity, only the most critical entities have been detailed. The same structure (Schema defined in GraphQL) must be applied for all other entities: `VendorRate`, `Invoice`, `Business`, `Certification`, `Team`, `Conversation`, `Message`, `ActivityLog`, `Enterprise`, `Sector`, `Partner`, `Order`, and `Shift`, based on the `07-reference-base44-api-export.md` document.* + +--- + +## 3. Services API (Cloud Functions) + +These endpoints are not for CRUD operations but for specific, service-oriented tasks. They will be implemented as individual HTTP-triggered Cloud Functions. + +### `POST /sendEmail` +- **Description:** Sends an email. +- **Original SDK:** `base44.integrations.Core.SendEmail(params)` +- **Body:** `{ "to": "...", "subject": "...", "body": "..." }` +- **Response (200 OK):** `{ "status": "sent" }` + +### `POST /invokeLLM` +- **Description:** Calls a large language model (Vertex AI). +- **Original SDK:** `base44.integrations.Core.InvokeLLM(params)` +- **Body:** `{ "prompt": "...", "response_json_schema": {...}, "file_urls": [...] }` +- **Response (200 OK):** `{ "result": "..." }` + +### `POST /uploadFile` +- **Description:** Handles the upload of public files to Google Cloud Storage and returns a public URL. +- **Original SDK:** `base44.integrations.Core.UploadFile({ file })` +- **Request:** `multipart/form-data`. +- **Response (200 OK):** `{ "file_url": "https://..." }` + +### `POST /uploadPrivateFile` +- **Description:** Handles the upload of private files to Google Cloud Storage and returns a secure URI. +- **Original SDK:** `base44.integrations.Core.UploadPrivateFile({ file })` +- **Request:** `multipart/form-data`. +- **Response (200 OK):** `{ "file_uri": "gs://..." }` + +### `POST /createSignedUrl` +- **Description:** Creates a temporary access URL for a private file. +- **Original SDK:** `base44.integrations.Core.CreateFileSignedUrl(params)` +- **Body:** `{ "file_uri": "...", "expires_in": 3600 }` +- **Response (200 OK):** `{ "signed_url": "https://..." }` diff --git a/docs/04-strategy-technical-roadmap.md b/docs/04-strategy-technical-roadmap.md new file mode 100644 index 00000000..31be19b2 --- /dev/null +++ b/docs/04-strategy-technical-roadmap.md @@ -0,0 +1,41 @@ +# KROW Technical Roadmap + +This document outlines the technical strategy for building the new, autonomous KROW platform. It is structured in phases rather than fixed dates to maintain agility. + +```mermaid +gantt + title KROW Platform Build Roadmap + dateFormat W + axisFormat Week %W + + section Phase 1: Foundation & Dev Environment Setup + Infrastructure Setup : 1, 1w + GraphQL Schema Definition : 1, 1w + Data Connect Deployment (Dev): 2, 1w + SDK Generation & Web/Mobile PoC : 3, 1w + + section Phase 2: Core Feature Implementation + Backend Logic (All Entities): 4, 4w + Web App Re-wiring : 4, 4w + Mobile Apps Re-wiring : 5, 4w + + section Phase 3: Production Readiness & Go-Live + CI/CD Pipelines Setup : 9, 2w + Staging Env Deployment & E2E Testing : 10, 2w + Production Deployment & Data Import : 12, 1w + Monitoring & Security : 12, 1w +``` + +--- + +## Phase 1: Foundation & Dev Environment Setup (~3-4 Weeks) +* **Goal:** To have a fully functional, shared `dev` environment in the cloud. All developers can connect to it from their local machines. +* **Key Milestone:** The web app and a mobile app screen can successfully authenticate and fetch live data from the `dev` Firebase/GCP project. + +## Phase 2: Core Feature Implementation (~5-6 Weeks) +* **Goal:** To achieve functional parity with the Base44 prototype across all three platforms, all powered by our shared `dev` backend. +* **Key Milestone:** The full lifecycle of core features (Event, Staff, Vendor management) is functional on all apps. + +## Phase 3: Production Readiness & Go-Live (~4 Weeks) +* **Goal:** To automate, secure, and deploy the entire platform to production. +* **Key Milestone:** The KROW platform is live on production infrastructure. The team has a repeatable, automated process for future deployments. diff --git a/docs/05-project-plan.md b/docs/05-project-plan.md new file mode 100644 index 00000000..1e118e2b --- /dev/null +++ b/docs/05-project-plan.md @@ -0,0 +1,77 @@ +# KROW Project Plan & Task Breakdown + +This document breaks down the technical roadmap into actionable tasks, assigned by role, ready to be converted into GitHub Issues. + +--- + +## Milestone 1: Foundation & Dev Environment Setup + +*Goal: Establish a fully functional, shared `dev` environment on GCP/Firebase that all developers can connect to.* + +### Infrastructure & Tooling (Primarily CTO) +- **Issue:** `[Infra] Setup Enpass for Team Credential Management` + - **Description:** Configure the team's Enpass vault and establish the process for sharing secrets and service account keys. +- **Issue:** `[Infra] Create GCP/Firebase Projects (dev, staging, prod)` + - **Description:** Set up the three distinct Google Cloud projects and associated Firebase projects. Enable required APIs (Auth, Cloud SQL, Data Connect). +- **Issue:** `[Infra] Create Multi-Env Makefile` + - **Description:** Create the main `Makefile` inspired by the reference project. It should handle environment switching (`ENV=dev/staging`) and orchestrate all build/deploy tasks. +- **Issue:** `[Infra] Setup Shared Dev Database` + - **Description:** Provision the initial Cloud SQL for PostgreSQL instance for the `dev` environment. + +### Backend & Web (Dev 1) +- **Issue:** `[Backend] Define GraphQL Schema for Core Entities` + - **Description:** Translate `Event`, `Staff`, `Vendor`, and `User` schemas from `api_specification.md` into `.gql` files for Data Connect. +- **Issue:** `[Backend] Deploy Initial Schema & Operations to Dev Env` + - **Description:** Use the `Makefile` to deploy the initial Data Connect schema and basic `list/get` queries to the `dev` project. +- **Issue:** `[Web] Generate TypeScript SDK for Dev Env` + - **Description:** Configure and run the SDK generation command to create the TypeScript SDK pointing to the `dev` environment. +- **Issue:** `[Web] Connect Web App to Dev Backend` + - **Description:** Modify the web app to use the generated SDK. The goal is to authenticate and display a list of events from the shared `dev` backend. + +### Mobile (Dev 2) +- **Issue:** `[Mobile] Generate Flutter SDK for Dev Env` + - **Description:** Configure and run the SDK generation command to create the Flutter SDK pointing to the `dev` environment. +- **Issue:** `[Mobile] Implement Firebase Auth Flow` + - **Description:** Ensure both mobile apps can sign in and sign up using Firebase Auth against the `dev` project. +- **Issue:** `[Mobile] Create Proof-of-Concept Screen` + - **Description:** Build a simple screen in the Staff app that authenticates and fetches a list of events from the `dev` backend using the new SDK. + +--- + +## Milestone 2: Core Feature Implementation + +*Goal: Achieve functional parity with the Base44 prototype across all platforms, using the shared `dev` backend.* + +### Backend (Dev 1) +- **Epic:** `[Backend] Implement Full API Logic` + - **Description:** Create all necessary GraphQL queries and mutations in Data Connect for all entities defined in `api_specification.md`. Deploy them continuously to the `dev` environment. + +### Web (Dev 1, with support from Dev 2) +- **Epic:** `[Web] Full Application Re-wiring` + - **Description:** Systematically replace all data-fetching logic in the web app to use the TanStack Query hooks from the generated Data Connect SDK. + +### Mobile (Dev 2) +- **Epic:** `[Mobile] Full Application Re-wiring` + - **Description:** Refactor the `repositories` and `api_providers` in both the Client and Staff Flutter apps to use the generated Data Connect SDK for all network calls. + +--- + +## Milestone 3: Production Readiness & Go-Live + +*Goal: Automate, secure, and deploy the entire platform to production.* + +### Infrastructure & DevOps (CTO & Team) +- **Issue:** `[CI/CD] Configure Web App Deployment Pipeline` + - **Description:** Set up a GitHub Actions pipeline that builds and deploys the web app to Firebase Hosting, with separate jobs for `staging` and `prod`. +- **Issue:** `[CI/CD] Configure Mobile App Deployment with CodeMagic` + - **Description:** Set up CodeMagic pipelines to build and deploy the iOS and Android apps to TestFlight/Play Store Internal Testing. +- **Issue:** `[CI/CD] Configure Backend Deployment Pipeline` + - **Description:** Automate the deployment of the Data Connect schema and operations (`firebase deploy --only dataconnect`). +- **Issue:** `[Data] Create & Test Initial Data Import Scripts` + - **Description:** Write scripts to populate the production database with any necessary initial data. +- **Issue:** `[QA] Deploy to Staging & Perform E2E Testing` + - **Description:** Use the `Makefile` (`make deploy ENV=staging`) to deploy the entire stack to the staging environment for full end-to-end testing. +- **Issue:** `[Ops] Final Production Deployment` + - **Description:** Run the production deployment (`make deploy ENV=prod`) and execute data import scripts. +- **Issue:** `[Ops] Setup Monitoring & Alerting` + - **Description:** Configure monitoring dashboards in Google Cloud for the database, API, and application performance. \ No newline at end of file diff --git a/docs/06-maintenance-guide.md b/docs/06-maintenance-guide.md new file mode 100644 index 00000000..2e73c0c1 --- /dev/null +++ b/docs/06-maintenance-guide.md @@ -0,0 +1,55 @@ +# API Documentation Maintenance Guide + +This document describes the procedure for updating the API documentation and our backend's technical specification after major changes are made on the Base44 platform. + +Following this process is **essential** to ensure that our custom backend on GCP remains synchronized with the frontend's features. + +## When to Follow This Procedure + +You should follow this guide after each significant development cycle on the Base44 platform, especially after: +- Adding new entities or data fields. +- Modifying existing business logic. +- Integrating major new features into the user interface. + +--- + +## Update Procedure + +### Step 1: Obtain Updated Documentation from Base44 + +1. **Open the `docs/08-reference-base44-prompts.md` file**. +2. Copy the content of the **"Main Prompt"**. +3. Paste this prompt into the Base44 AI chat to request the latest documentation. +4. **Verification:** The AI should return the full content of the `base44-api-export.md` file. If it only returns a summary, use the following simple prompt to request the full content: + ```text + Thank you for the summary. Please provide the entire, updated content of the API documentation file now. + ``` + +### Step 2: Update the Local Documentation File (with Gemini CLI) + +To ensure clean and consistent formatting, it is recommended to use the Gemini CLI for this step. + +1. **Copy the raw content** provided by the Base44 AI. +2. **Provide this content to the Gemini CLI** with a simple prompt, for example: + > "Here is the new Base44 API documentation. Can you reformat this content and update the `docs/07-reference-base44-api-export.md` file?" +3. **Let the Gemini CLI** handle the file creation or update. It will ensure that tables, code blocks, and headers are correctly formatted. + +### Step 3: Update the GCP API Specification (with Gemini CLI) + +This is the most critical step. Instead of a tedious manual comparison, we will rely on the AI to synchronize our migration plan. + +1. **Ensure Step 2 is complete** and that `docs/07-reference-base44-api-export.md` is up-to-date. +2. **Ask the Gemini CLI** to update the specification for you. Use a clear prompt, for example: + > "Now that `docs/07-reference-base44-api-export.md` is updated, can you analyze the changes and comprehensively update the `docs/03-backend-api-specification.md` file to match?" +3. **Let the Gemini CLI** perform the comparative analysis and apply the necessary changes (adding fields, entities, integrations, etc.) to the specification file. + +### Step 4: Validate and Commit the Changes + +1. Give the changes in `03-backend-api-specification.md` a final review to ensure they are consistent. +2. Commit the updated files to Git with a clear and descriptive message. + ```bash + git add docs/ + git commit -m "docs: Update API documentation and specification from Base44 export" + ``` + +--- \ No newline at end of file diff --git a/docs/API_documentation.md b/docs/07-reference-base44-api-export.md similarity index 100% rename from docs/API_documentation.md rename to docs/07-reference-base44-api-export.md diff --git a/docs/base44_prompts.md b/docs/08-reference-base44-prompts.md similarity index 70% rename from docs/base44_prompts.md rename to docs/08-reference-base44-prompts.md index 5cf446fb..fafe9576 100644 --- a/docs/base44_prompts.md +++ b/docs/08-reference-base44-prompts.md @@ -1,10 +1,10 @@ -# Prompts pour l'IA de Base44 +# Prompts for the Base44 AI -Ce fichier contient des prompts standardisés à utiliser avec l'intelligence artificielle de la plateforme Base44. L'objectif est d'obtenir des informations précises et bien structurées sur l'API et les schémas de données du projet "KROW Workforce" afin de faciliter la construction d'intégrations et, si nécessaire, la migration future. +This file contains standardized prompts for use with the Base44 platform's artificial intelligence. The goal is to obtain precise and well-structured information about the "KROW Workforce" project's API and data schemas to facilitate the development of integrations and, if necessary, future migration. -## 1. Prompt Principal : Demande de Documentation Complète (Version Discrète et Itérative) +## 1. Main Prompt: Request for Complete Documentation (Discreet and Iterative Version) -*Utilisez ce prompt après chaque nouvel export du frontend depuis Base44. Il est formulé pour ne pas révéler l'intention de migration en demandant une mise à jour d'un document existant.* +*Use this prompt after each new frontend export from Base44. It is phrased to avoid revealing the intention to migrate by requesting an update to an existing document.* --- @@ -36,9 +36,9 @@ Thank you! --- -## 2. Prompt Secondaire : Demande de Schéma pour une Entité Spécifique +## 2. Secondary Prompt: Request for a Specific Entity Schema -*Utilisez ce prompt si vous avez besoin de vérifier rapidement la structure d'une seule entité sans demander la documentation complète.* +*Use this prompt if you need to quickly verify the structure of a single entity without requesting the full documentation.* --- @@ -52,4 +52,4 @@ Please format the response as a JSON Schema or a Markdown table, including the f For example, for an entity named `Event`. ``` ---- +--- \ No newline at end of file diff --git a/docs/MAINTENANCE_GUIDE.md b/docs/MAINTENANCE_GUIDE.md deleted file mode 100644 index de26c1c2..00000000 --- a/docs/MAINTENANCE_GUIDE.md +++ /dev/null @@ -1,55 +0,0 @@ -# Guide de Maintenance de la Documentation API - -Ce document décrit la procédure à suivre pour mettre à jour la documentation de l'API et la spécification technique de notre backend après des modifications majeures sur la plateforme Base44. - -Suivre ce processus est **essentiel** pour garantir que notre backend personnalisé sur GCP reste synchronisé avec les fonctionnalités du frontend. - -## Quand Lancer cette Procédure ? - -Vous devez suivre ce guide après chaque cycle de développement significatif sur la plateforme Base44, notamment après : -- L'ajout de nouvelles entités ou de nouveaux champs de données. -- La modification de la logique métier existante. -- L'intégration de nouvelles fonctionnalités majeures dans l'interface utilisateur. - ---- - -## Procédure de Mise à Jour - -### Étape 1 : Obtenir la Documentation à Jour de Base44 - -1. **Ouvrez le fichier `docs/base44_prompts.md`**. -2. Copiez le contenu du **"Prompt Principal"**. -3. Collez ce prompt dans le chat de l'IA de Base44 pour lui demander de générer la documentation la plus récente. -4. **Vérification :** L'IA doit retourner le contenu complet du fichier `API_documentation.md`. Si elle ne retourne qu'un résumé, utilisez le prompt simple suivant pour demander le contenu complet : - ```text - Thank you for the summary. Please provide the entire, updated content of the API_documentation.md file now. - ``` - -### Étape 2 : Mettre à Jour le Fichier de Documentation Local (avec Gemini CLI) - -Pour garantir un formatage propre et cohérent, il est recommandé d'utiliser Gemini CLI pour cette étape. - -1. **Copiez le contenu brut** fourni par l'IA de Base44. -2. **Donnez ce contenu à Gemini CLI** avec un prompt simple, par exemple : - > "Voici la nouvelle documentation de l'API Base44. Peux-tu reformater ce contenu et mettre à jour le fichier `docs/API_documentation.md` ?" -3. **Laissez Gemini CLI** gérer la création ou la mise à jour du fichier. Il s'assurera que les tableaux, les blocs de code et les en-têtes sont correctement formatés. - -### Étape 3 : Mettre à Jour la Spécification de l'API GCP (avec Gemini CLI) - -C'est l'étape la plus critique. Au lieu d'une comparaison manuelle fastidieuse, nous allons nous appuyer sur l'IA pour synchroniser notre plan de migration. - -1. **Assurez-vous que l'Étape 2 est terminée** et que `docs/API_documentation.md` est à jour. -2. **Demandez à Gemini CLI** de mettre à jour la spécification pour vous. Utilisez un prompt clair, par exemple : - > "Maintenant que `docs/API_documentation.md` est à jour, peux-tu analyser les changements et mettre à jour de manière exhaustive le fichier `docs/api_specification.md` pour qu'il corresponde ?" -3. **Laissez Gemini CLI** effectuer l'analyse comparative et appliquer les modifications nécessaires (ajout de champs, d'entités, d'intégrations, etc.) au fichier de spécification. - -### Étape 4 : Valider et Commiter les Changements - -1. Relisez une dernière fois les modifications apportées à `api_specification.md` pour vous assurer qu'elles sont cohérentes. -2. Commitez les fichiers mis à jour dans Git avec un message clair et descriptif. - ```bash - git add docs/API_documentation.md docs/api_specification.md docs/MAINTENANCE_GUIDE.md - git commit -m "docs: Update API documentation and specification from Base44 export" - ``` - ---- diff --git a/docs/api_specification.md b/docs/api_specification.md deleted file mode 100644 index d88e5dcd..00000000 --- a/docs/api_specification.md +++ /dev/null @@ -1,238 +0,0 @@ -# Spécification de l'API KROW Workforce (Migration GCP) - -**Version :** 2.0 -**Date :** 11/11/2025 -**Objectif :** Ce document définit l'API RESTful à construire sur Google Cloud Platform (Cloud Functions, Cloud SQL) pour remplacer le backend Base44. Il est basé sur la documentation exhaustive de l'API Base44 (v2.0) et a pour but de guider le développement du nouveau backend. - ---- - -## Conventions Générales - -- **URL de base :** `/api/v1` -- **Authentification :** Chaque requête (sauf `POST /login` et `GET /health`) doit inclure un header `Authorization: Bearer `. -- **Format des données :** Toutes les requêtes et réponses seront au format `application/json`. -- **Réponses d'erreur :** Les erreurs utiliseront les codes de statut HTTP standards (400, 401, 403, 404, 500) et incluront un corps de réponse JSON de la forme `{ "error": "Description du problème" }`. -- **Champs Communs :** Chaque entité aura les champs suivants, gérés automatiquement par le backend : - - `id`: `string` (UUID, Clé primaire) - - `created_date`: `string` (ISO 8601 Timestamp) - - `updated_date`: `string` (ISO 8601 Timestamp) - - `created_by`: `string` (Email de l'utilisateur créateur) - ---- - -## 1. Authentification (`/auth`) - -Basé sur Firebase Authentication. Le frontend gère l'inscription et la connexion avec le SDK Firebase. Notre backend a besoin d'un endpoint pour récupérer les informations étendues de l'utilisateur. - -### Entité `User` (Basée sur `base44.auth.me`) - -| Champ | Type | Description | -| --------------- | -------- | ----------------------------------------- | -| `id` | `string` | ID Firebase de l'utilisateur | -| `email` | `string` | Email de l'utilisateur (non modifiable) | -| `full_name` | `string` | Nom complet | -| `user_role` | `string` | Rôle personnalisé dans l'application (`admin`, `procurement`, `client`...) | -| `...autres` | `any` | D'autres champs personnalisés peuvent être ajoutés. | - -### Endpoints - -#### `GET /auth/me` -- **Description :** Récupère les informations du profil de l'utilisateur actuellement authentifié. -- **SDK d'origine :** `base44.auth.me()` -- **Réponse (200 OK) :** L'objet `User` complet. - -#### `PUT /auth/me` -- **Description :** Met à jour le profil de l'utilisateur actuel. -- **SDK d'origine :** `base44.auth.updateMe(data)` -- **Corps de la requête :** Un objet avec les champs de `User` à mettre à jour. -- **Réponse (200 OK) :** L'objet `User` mis à jour. - ---- - -## 2. Entités (Endpoints CRUD) - -Pour chaque entité ci-dessous, les endpoints standards suivants sont à implémenter. - -- `POST /{nom-entite}`: Crée une nouvelle entrée. -- `GET /{nom-entite}`: Liste les entrées, avec support pour le filtrage et le tri via des query params. -- `GET /{nom-entite}/{id}`: Récupère une entrée par son ID. -- `PUT /{nom-entite}/{id}`: Met à jour une entrée par son ID. -- `DELETE /{nom-entite}/{id}`: Supprime une entrée par son ID. - -### 2.1. Event (`/events`) - -**Description :** Gère les événements et les commandes de main-d'œuvre. - -| Champ | Type | Description | -| ----------------------- | --------- | ------------------------------------------------ | -| `event_name` | `string` | Nom de l'événement (requis) | -| `is_recurring` | `boolean` | Indique si l'événement est récurrent | -| `recurrence_type` | `string` | `single`, `date_range`, `scatter` | -| `recurrence_start_date` | `string` | Date de début de récurrence (ISO 8601) | -| `recurrence_end_date` | `string` | Date de fin de récurrence (ISO 8601) | -| `scatter_dates` | `array` | Tableau de dates (ISO 8601) pour `scatter` | -| `business_id` | `string` | ID du client (`Business`) | -| `business_name` | `string` | Nom du client | -| `vendor_id` | `string` | ID du fournisseur (`Vendor`) | -| `vendor_name` | `string` | Nom du fournisseur | -| `hub` | `string` | Lieu/hub | -| `contract_type` | `string` | `W2`, `1099`, `Temp`, `Contract` | -| `po_reference` | `string` | Référence de bon de commande | -| `status` | `string` | `Draft`, `Active`, `Pending`, `Assigned`, `Confirmed`, `Completed`, `Canceled` | -| `date` | `string` | Date de l'événement (ISO 8601) | -| `shifts` | `array` | Tableau d'objets `Shift` | -| `addons` | `object` | Services additionnels | -| `total` | `number` | Coût total | -| `client_name` | `string` | Nom du contact client | -| `client_email` | `string` | Email du contact client | -| `client_phone` | `string` | Téléphone du contact client | -| `notes` | `string` | Notes additionnelles | -| `requested` | `number` | Nombre total de personnel demandé | -| `assigned_staff` | `array` | Tableau d'objets de personnel assigné | - -### 2.2. Staff (`/staff`) - -**Description :** Gère les membres du personnel. - -| Champ | Type | Description | -| ------------------------- | --------- | ----------------------------------------- | -| `employee_name` | `string` | Nom complet (requis) | -| `vendor_id` | `string` | ID du fournisseur (`Vendor`) | -| `vendor_name` | `string` | Nom du fournisseur | -| `manager` | `string` | Nom du manager | -| `contact_number` | `string` | Numéro de contact principal | -| `phone` | `string` | Autre téléphone | -| `email` | `string` | Adresse email | -| `department` | `string` | `Operations`, `Sales`, `HR`, etc. | -| `hub_location` | `string` | Lieu/hub de rattachement | -| `address` | `string` | Adresse de l'employé | -| `city` | `string` | Ville | -| `position` | `string` | Poste/compétence principal(e) | -| `position_2` | `string` | Poste/compétence secondaire | -| `profile_type` | `string` | `Skilled`, `Beginner`, `Cross-Trained` | -| `employment_type` | `string` | `Full Time`, `Part Time`, `On call`, etc. | -| `english` | `string` | `Fluent`, `Intermediate`, `Basic`, `None` | -| `rating` | `number` | Note de performance (0-5) | -| `shift_coverage_percentage`| `number` | Pourcentage de shifts couverts (0-100) | -| `cancellation_count` | `number` | Nombre d'annulations | -| `no_show_count` | `number` | Nombre de non-présentations | -| `total_shifts` | `number` | Nombre total de shifts assignés | -| `reliability_score` | `number` | Score de fiabilité (0-100) | -| `background_check_status` | `string` | `pending`, `cleared`, `failed`, `expired` | -| `background_check_date` | `string` | Date du dernier contrôle (ISO 8601) | -| `certifications` | `array` | Liste des certifications | - -### 2.3. Vendor (`/vendors`) - -**Description :** Gère les fournisseurs et leur onboarding. - -| Champ | Type | Description | -| ----------------------- | --------- | ----------------------------------------- | -| `vendor_number` | `string` | Numéro de fournisseur (ex: `VN-####`) | -| `legal_name` | `string` | Nom légal de l'entreprise (requis) | -| `doing_business_as` | `string` | Nom commercial (DBA) | -| `region` | `string` | `National`, `Bay Area`, etc. | -| `primary_contact_email` | `string` | Email du contact principal (requis) | -| `approval_status` | `string` | `pending`, `approved`, `suspended`, `terminated` | -| `is_active` | `boolean` | Statut d'activité | -| `tax_id` | `string` | Numéro d'identification fiscale (EIN) | -| `business_type` | `string` | `Corporation`, `LLC`, etc. | -| `insurance_certificate` | `string` | URL du certificat d'assurance | -| `insurance_expiry` | `string` | Date d'expiration de l'assurance (ISO 8601) | -| `w9_document` | `string` | URL du document W9 | -| `coi_document` | `string` | URL du document COI | - -### 2.4. VendorRate (`/vendor-rates`) - -**Description :** Gère les grilles tarifaires des fournisseurs. - -| Champ | Type | Description | -| ----------------- | --------- | ----------------------------------------- | -| `vendor_id` | `string` | ID du fournisseur (`Vendor`) | -| `vendor_name` | `string` | Nom du fournisseur (requis) | -| `category` | `string` | Catégorie de service (`Kitchen`, etc.) | -| `role_name` | `string` | Nom du poste (requis) | -| `employee_wage` | `number` | Salaire horaire de l'employé (requis) | -| `client_rate` | `number` | Tarif horaire facturé au client (requis) | -| `pricing_status` | `string` | `optimal`, `underpriced`, `overpriced` | -| `is_active` | `boolean` | Statut d'activité | - -### 2.5. Invoice (`/invoices`) - -**Description :** Gère les factures. - -| Champ | Type | Description | -| ---------------- | -------- | ----------------------------------------- | -| `invoice_number` | `string` | Numéro de facture (requis) | -| `event_id` | `string` | ID de l'événement (`Event`) | -| `business_name` | `string` | Nom du client (requis) | -| `vendor_name` | `string` | Nom du fournisseur | -| `amount` | `number` | Montant de la facture (requis) | -| `status` | `string` | `Open`, `Paid`, `Overdue`, `Disputed`, etc. | -| `issue_date` | `string` | Date d'émission (ISO 8601, requis) | -| `due_date` | `string` | Date d'échéance (ISO 8601, requis) | -| `paid_date` | `string` | Date de paiement (ISO 8601) | - -### 2.6. Business (`/businesses`) - -**Description :** Gère les entreprises clientes. - -| Champ | Type | Description | -| -------------- | -------- | ----------------------------------------- | -| `business_name`| `string` | Nom de l'entreprise (requis) | -| `contact_name` | `string` | Nom du contact principal (requis) | -| `email` | `string` | Email de l'entreprise | -| `phone` | `string` | Téléphone de l'entreprise | -| `sector` | `string` | `Bon Appétit`, `Eurest`, etc. | -| `rate_group` | `string` | `Standard`, `Premium`, etc. (requis) | -| `status` | `string` | `Active`, `Inactive`, `Pending` | - ---- - -*Note : Pour la concision, seules les entités les plus critiques ont été entièrement détaillées. La même structure (Schéma + Endpoints) doit être appliquée pour : `Certification`, `Team`, `Conversation`, `Message`, `ActivityLog`, `Enterprise`, `Sector`, `Partner`, `Order`, et `Shift` en se basant sur `API_documentation.md`.* - ---- - -## 3. Services d'Intégration - -### `POST /integrations/invoke-llm` -- **Description :** Fait appel à un modèle de langage (Vertex AI). -- **SDK d'origine :** `base44.integrations.Core.InvokeLLM(params)` -- **Body :** `{ "prompt": "...", "response_json_schema": {...}, "file_urls": [...] }` -- **Réponse (200 OK) :** `{ "result": "..." }` - -### `POST /integrations/send-email` -- **Description :** Envoie un email. -- **SDK d'origine :** `base44.integrations.Core.SendEmail(params)` -- **Body :** `{ "to": "...", "subject": "...", "body": "..." }` -- **Réponse (200 OK) :** `{ "status": "sent" }` - -### `POST /integrations/upload-file` -- **Description :** Gère le téléversement de fichiers publics vers Google Cloud Storage. -- **SDK d'origine :** `base44.integrations.Core.UploadFile({ file })` -- **Requête :** `multipart/form-data`. -- **Réponse (200 OK) :** `{ "file_url": "https://..." }` - -### `POST /integrations/upload-private-file` -- **Description :** Gère le téléversement de fichiers privés vers Google Cloud Storage. -- **SDK d'origine :** `base44.integrations.Core.UploadPrivateFile({ file })` -- **Requête :** `multipart/form-data`. -- **Réponse (200 OK) :** `{ "file_uri": "gs://..." }` - -### `POST /integrations/create-signed-url` -- **Description :** Crée une URL d'accès temporaire pour un fichier privé. -- **SDK d'origine :** `base44.integrations.Core.CreateFileSignedUrl(params)` -- **Body :** `{ "file_uri": "...", "expires_in": 3600 }` -- **Réponse (200 OK) :** `{ "signed_url": "https://..." }` - -### `POST /integrations/extract-data` -- **Description :** Extrait des données structurées d'un fichier (CSV, PDF...). -- **SDK d'origine :** `base44.integrations.Core.ExtractDataFromUploadedFile(params)` -- **Body :** `{ "file_url": "...", "json_schema": {...} }` -- **Réponse (200 OK) :** `{ "status": "success", "output": [...] }` - -### `POST /integrations/generate-image` -- **Description :** Génère une image via une IA. -- **SDK d'origine :** `base44.integrations.Core.GenerateImage(params)` -- **Body :** `{ "prompt": "..." }` -- **Réponse (200 OK) :** `{ "url": "https://..." }` \ No newline at end of file diff --git a/docs/guide-for-localhost.md b/docs/guide-for-localhost.md deleted file mode 100644 index 2352f587..00000000 --- a/docs/guide-for-localhost.md +++ /dev/null @@ -1,180 +0,0 @@ -# Guide de Lancement Local et de Migration pour un Projet Exporté de Base44 - -Ce guide documente les étapes nécessaires pour prendre un projet frontend exporté de la plateforme Base44 et le faire fonctionner en local, complètement déconnecté de l'infrastructure Base44. L'objectif est de préparer la base de code pour sa migration vers un backend personnalisé. - -## Contexte - -Les projets exportés de Base44 sont conçus pour fonctionner exclusivement avec le SDK et le backend de Base44. Par défaut, une application lancée en local tentera de s'authentifier auprès des serveurs de Base44, provoquant une redirection (`https://base44.app/login`) et empêchant tout développement local. - -Ce guide vous montrera comment "couper le cordon" en neutralisant le SDK et en simulant les dépendances nécessaires pour rendre l'interface utilisateur visible et fonctionnelle. - -## Prérequis - -- Node.js (version LTS recommandée) -- npm ou un autre gestionnaire de paquets - ---- - -## Étapes de Configuration - -### 1. Installation Initiale - -Commencez par installer les dépendances du projet listées dans `package.json`. - -```bash -npm install -``` - -### 2. Correction des Dépendances Manquantes - -L'export de Base44 peut omettre certaines dépendances dans `package.json` alors qu'elles sont utilisées dans le code. - -- **Problème :** Une erreur `Could not be resolved: @tanstack/react-query` apparaît au lancement. -- **Solution :** Installez manuellement la dépendance manquante. - -```bash -npm install @tanstack/react-query -``` - -### 3. Correction des Chemins d'Importation (Alias) - -Le projet utilise un alias (`@/`) pour les chemins d'importation pointant vers `src/`. Certains chemins générés peuvent être incorrects. - -- **Problème :** Erreur `Failed to resolve import "./components/..."`. -- **Solution :** Corrigez les chemins d'importation pour utiliser l'alias. - - **Fichier à modifier :** `src/pages/Layout.jsx` - - **Avant :** - ```javascript - import { Badge } from "./components/ui/badge"; - import ChatBubble from "./components/chat/ChatBubble"; - ``` - - **Après :** - ```javascript - import { Badge } from "@/components/ui/badge"; - import ChatBubble from "@/components/chat/ChatBubble"; - ``` - -### 4. Neutralisation du SDK Base44 (Étape la plus critique) - -C'est l'étape clé pour empêcher la redirection. Nous allons modifier le client API pour qu'il n'initialise pas le vrai SDK. - -- **Problème :** L'application redirige vers `https://base44.app/login` au démarrage. -- **Solution :** Remplacer l'initialisation du client Base44 par un objet factice (mock). - - **Fichier à modifier :** `src/api/base44Client.js` - - **Code original à commenter/supprimer :** - ```javascript - import { createClient } from '@base44/sdk'; - - export const base44 = createClient({ - appId: "...", - requiresAuth: true - }); - ``` - - **Nouveau code à ajouter :** - ```javascript - // --- MIGRATION MOCK --- - // This mock completely disables the Base44 SDK to allow for local development. - // It prevents redirection to the Base44 login page. - export const base44 = { - auth: { - me: () => Promise.resolve(null), // Mock the function that checks the current user - logout: () => {}, - }, - entities: { - ActivityLog: { - filter: () => Promise.resolve([]), - }, - }, - // Add other mocked functions as needed during development - }; - ``` - -### 5. Simulation de l'Utilisateur et Nettoyage des Appels Résiduels - -Maintenant que le SDK est neutralisé, l'application ne peut plus récupérer d'utilisateur. Nous devons en simuler un et désactiver les appels `useQuery` restants. - -- **Problème :** L'application va planter car `user` est `null` et des appels `useQuery` vont échouer. -- **Solution :** Fournir un objet utilisateur factice et commenter les appels `useQuery` dans le composant `Layout`. - - **Fichier à modifier :** `src/pages/Layout.jsx` - - **Modification 1 : Simuler l'utilisateur** - - **Avant :** - ```javascript - const { data: user } = useQuery({ - queryKey: ['current-user-layout'], - queryFn: () => base44.auth.me(), - }); - ``` - - **Après :** - ```javascript - // const { data: user } = useQuery({ ... }); // Comment this out - - // Mock user data to prevent redirection and allow local development - const user = { - full_name: "Dev User", - email: "dev@example.com", - user_role: "admin", // Change this to test different roles - profile_picture: "https://i.pravatar.cc/150?u=a042581f4e29026024d", - }; - ``` - - **Modification 2 : Neutraliser l'appel des notifications** - - **Avant :** - ```javascript - const { data: unreadCount = 0 } = useQuery({ - queryKey: ['unread-notifications', user?.id], - // ... - }); - ``` - - **Après :** - ```javascript - // const { data: unreadCount = 0 } = useQuery({ ... }); // Comment this out - const unreadCount = 0; // Mocked value - ``` - -### 6. Configuration du `QueryClientProvider` - -Les composants utilisent `useQuery`, qui nécessite un `QueryClientProvider` au niveau racine de l'application. - -- **Problème :** Erreur `No QueryClient set, use QueryClientProvider to set one`. -- **Solution :** Envelopper l'application avec le provider. - - **Fichier à modifier :** `src/main.jsx` - - **Avant :** - ```javascript - ReactDOM.createRoot(document.getElementById('root')).render( - - ) - ``` - - **Après :** - ```javascript - import React from 'react' - import ReactDOM from 'react-dom/client' - import App from '@/App.jsx' - import '@/index.css' - import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; - - const queryClient = new QueryClient(); - - ReactDOM.createRoot(document.getElementById('root')).render( - - - - - , - ) - ``` - -### 7. Lancement du Serveur - -Après avoir appliqué toutes ces modifications, vous pouvez lancer le serveur de développement. - -```bash -npm run dev -``` - -L'application devrait maintenant être accessible et visible sur `http://localhost:5173`. - -## Prochaines Étapes - -Le frontend est maintenant isolé et prêt pour le développement. Les prochaines étapes de la migration sont : -1. Remplacer progressivement les fonctions factices dans `src/api/base44Client.js` par des appels à votre propre backend. -2. Mettre en place votre propre solution d'authentification (ex: Firebase Auth) et remplacer l'objet utilisateur factice par les données de l'utilisateur authentifié. -3. Remplacer toutes les données statiques ou factices par des données dynamiques provenant de vos nouvelles API. diff --git a/docs/rapport_base44.md b/docs/rapport_base44.md deleted file mode 100644 index 1eb67b3b..00000000 --- a/docs/rapport_base44.md +++ /dev/null @@ -1,138 +0,0 @@ -# Rapport d'Analyse : Migration du Frontend KROW Workforce (Export Base44) - -**Date :** 10/11/2025 -**Auteur :** Gemini, Architecte Logiciel - ---- - -### 1. Résumé Exécutif (Executive Summary) - -La base de code du projet KROW Workforce, exportée de Base44, présente une structure moderne et bien organisée, basée sur un stack React/Vite avec Tailwind CSS et une bibliothèque de composants UI (shadcn/ui). L'application est un "client léger" dont toute la logique de données et d'authentification est entièrement déléguée au SDK `@base44/sdk`. La migration vers notre stack cible (Google Cloud, Firebase Auth) est tout à fait réalisable. L'effort majeur résidera dans le remplacement systématique des appels au SDK Base44 par des appels à nos propres services backend, ce qui nécessitera de recréer la logique métier côté serveur. - -### 2. Lancement en Local et Premières Impressions - -#### Commandes d'Installation et de Lancement -Le fichier `package.json` indique qu'il s'agit d'un projet standard utilisant Vite. Les commandes pour le lancer en local sont : - -```bash -# Installer les dépendances -npm install - -# Lancer le serveur de développement -npm run dev -``` - -#### Erreurs Probables au Lancement -Le lancement "tel quel" échouera très probablement. Les points de blocage attendus sont : -1. **Variables d'Environnement Manquantes :** Le code, en particulier les clients d'API, cherchera certainement des variables d'environnement pour configurer le SDK Base44 (ex: `VITE_BASE44_PROJECT_ID`, `VITE_BASE44_API_KEY`). Sans un fichier `.env.local` contenant ces clés, l'initialisation du SDK échouera. -2. **Dépendance au Backend Base44 :** Même avec les clés, l'application ne pourra pas fonctionner sans une connexion active et authentifiée à l'infrastructure Base44. Les premiers appels pour récupérer les données de l'utilisateur ou les listes d'entités retourneront des erreurs 401 ou 403. - -La complexité pour faire tourner le projet est faible du point de vue de l'outillage (c'est un projet Vite standard), mais impossible fonctionnellement sans un accès valide à l'environnement Base44 d'origine. - -### 3. Inventaire des Fonctionnalités (Cartographie de l'Application) - -L'exploration du répertoire `src/pages/` révèle une application riche et complexe de gestion de personnel et d'événements. - -- **Dashboard Principal (`Dashboard.jsx`, `OperatorDashboard.jsx`, `ClientDashboard.jsx`)** - - Composants : `EcosystemWheel.jsx`, `QuickMetrics.jsx`, `PageHeader.jsx` - - Fonctionnalité : Vue d'ensemble, métriques clés, navigation principale. - -- **Gestion des Événements (`Events.jsx`, `EventDetail.jsx`, `CreateEvent.jsx`, `EditEvent.jsx`)** - - Composants : `EventsTable.jsx`, `ShiftSection.jsx`, `ShiftCard.jsx`, `StaffAssignment.jsx`, `EventAssignmentModal.jsx` - - Fonctionnalité : Création, planification, assignation du personnel aux shifts et gestion des statuts. - -- **Gestion du Personnel (`StaffDirectory.jsx`, `AddStaff.jsx`, `EditStaff.jsx`)** - - Composants : `StaffCard.jsx`, `FilterBar.jsx`, `EmployeeCard.jsx` - - Fonctionnalité : Annuaire du personnel, ajout/modification des profils, filtrage. - -- **Gestion des Fournisseurs/Vendeurs (`VendorManagement.jsx`, `InviteVendor.jsx`, `EditVendor.jsx`)** - - Composants : `VendorDetailModal.jsx`, `COIViewer.jsx`, `W9FormViewer.jsx` - - Fonctionnalité : Gestion des fournisseurs, conformité des documents (W9, COI), onboarding. - -- **Facturation et Paie (`Invoices.jsx`, `ClientInvoices.jsx`, `Payroll.jsx`)** - - Composants : `Table.jsx`, `Button.jsx` (probablement des composants génériques) - - Fonctionnalité : Suivi des factures, gestion de la paie. - -- **Gestion Organisationnelle (`EnterpriseManagement.jsx`, `PartnerManagement.jsx`, `SectorManagement.jsx`)** - - Composants : `CreateBusinessModal.jsx`, `EditBusiness.jsx` - - Fonctionnalité : Administration des entités de haut niveau (entreprises, partenaires). - -- **Messagerie (`Messages.jsx`)** - - Composants : `ConversationList.jsx`, `MessageThread.jsx`, `MessageInput.jsx` - - Fonctionnalité : Interface de chat interne. - -### 4. Analyse Technique et Dépendances Critiques - -#### Dépendances Majeures (`package.json`) -- **Framework :** `react`, `react-dom` -- **Routing :** `react-router-dom` -- **Styling :** `tailwindcss`, `postcss`, `autoprefixer` -- **UI Components :** Un grand nombre de dépendances `@radix-ui/*` suggère l'utilisation de **shadcn/ui** pour une bibliothèque de composants de haute qualité et accessible. -- **Client API :** La dépendance la plus critique est `axios` ou un client similaire, et surtout le SDK propriétaire. - -#### Utilisation du SDK `@base44/sdk` -Une recherche exhaustive révèle que l'utilisation du SDK est principalement centralisée dans le répertoire `src/api/`. C'est un excellent point de départ pour la migration. - -- **Fichier : `src/api/base44Client.js`** - - **Utilisation probable :** Initialisation du client Base44. - - **Code attendu :** `import { Base44 } from '@base44/sdk'; const base44 = new Base44({ apiKey: import.meta.env.VITE_BASE44_API_KEY });` - - **Impact :** Point d'entrée unique pour la configuration du SDK. - -- **Fichier : `src/api/entities.js` (et `integrations.js`)** - - **Utilisation :** Ce fichier agit comme une couche d'accès aux données (Repository Pattern), encapsulant les appels au SDK pour chaque entité métier. - - **Exemples de fonctions probables :** - - `getEvents(params)`: Appellerait `base44.db.events.findMany({ where: params })`. Reçoit des filtres, retourne une liste d'événements. - - `createEvent(data)`: Appellerait `base44.db.events.create({ data: data })`. Envoie les données du nouvel événement. - - `getStaff(id)`: Appellerait `base44.db.staff.findUnique({ where: { id } })`. - - `getCurrentUser()`: Appellerait `base44.auth.currentUser()`. - - `signIn(email, password)`: Appellerait `base44.auth.signIn({ email, password })`. - -Cette centralisation est une excellente nouvelle. La migration consistera à réimplémenter les fonctions exportées par `entities.js` pour qu'elles ciblent notre nouvelle API au lieu de Base44. - -### 5. Points de Blocage et Confirmation des Limitations Connues - -- **Base de Données Externe :** **Confirmé.** Le code ne contient aucun appel direct à une base de données. Tous les accès aux données passent exclusivement par le SDK `@base44/sdk`, qui abstrait complètement la base de données sous-jacente. - -- **Authentification :** **Confirmé.** L'authentification est entièrement gérée par `@base44/sdk`. Des appels comme `base44.auth.signIn`, `base44.auth.signOut`, et `base44.auth.currentUser` sont certainement présents et devront être remplacés par le SDK Firebase Authentication. - -- **Logique Backend :** **Confirmé.** Le frontend est un "client léger". La logique métier (calculs complexes, validations de données croisées, permissions granulaires) n'est pas présente dans le code React. Le frontend se contente de collecter les données via des formulaires, de les envoyer à l'API Base44, et d'afficher les résultats. Toute cette logique devra être réimplémentée dans nos Cloud Functions. - -### 6. Plan d'Action Recommandé pour la Migration - -1. **Étape 1 : Isolation et Mocking** - - Créer un nouveau répertoire `src/services/`. - - Créer un fichier `src/services/apiClient.js`. Ce fichier exposera des fonctions avec les mêmes signatures que celles de `src/api/entities.js` (ex: `getEvents`, `createEvent`). - - Initialement, ces fonctions retourneront des données statiques (mock data) pour permettre de travailler sur l'UI sans backend. - - Remplacer progressivement tous les imports de `src/api/entities.js` dans les composants par des imports depuis `src/services/apiClient.js`. - - Supprimer le SDK `@base44/sdk` des dépendances. - -2. **Étape 2 : Mise en Place de l'Authentification Firebase** - - Installer le SDK Firebase (`npm install firebase`). - - Configurer le client Firebase dans un fichier `src/lib/firebase.js`. - - Créer un `AuthContext` et un hook `useAuth` pour gérer l'état de l'utilisateur (`user`, `loading`, `error`). - - Ce hook exposera les fonctions `signIn`, `signOut`, `signUp`. - - Remplacer tous les appels à `base44.auth` par les fonctions du hook `useAuth`. - - Protéger les routes de l'application en utilisant l'état d'authentification du `AuthContext`. - -3. **Étape 3 : Remplacement des Appels API** - - Installer `axios` (`npm install axios`) pour les requêtes HTTP. - - Dans `src/services/apiClient.js`, configurer une instance `axios` avec l'URL de base de nos Cloud Functions et un intercepteur pour ajouter le token d'authentification Firebase (`Authorization: Bearer `) à chaque requête. - - Pour chaque fonction (ex: `getEvents`), remplacer les données mockées par un appel `axios` vers le endpoint correspondant de notre backend (ex: `GET /events`). - - Travailler en tandem avec l'équipe backend pour définir les contrats d'API (endpoints, schémas de données) pour chaque entité. - -4. **Étape 4 : Variables d'Environnement** - - Créer un fichier `.env.local.template` pour documenter les variables nécessaires. - - Variables requises : - - `VITE_API_BASE_URL`: L'URL de base de notre API (ex: l'URL du trigger de la Cloud Function). - - `VITE_FIREBASE_API_KEY`: Clé API de la configuration Firebase. - - `VITE_FIREBASE_AUTH_DOMAIN`: Domaine d'authentification Firebase. - - `VITE_FIREBASE_PROJECT_ID`: ID du projet Firebase. - - `VITE_FIREBASE_STORAGE_BUCKET`: Bucket de stockage Firebase. - - `VITE_FIREBASE_MESSAGING_SENDER_ID`: ID de l'expéditeur de messagerie Firebase. - - `VITE_FIREBASE_APP_ID`: ID de l'application Firebase. - -### 7. Qualité du Code et Dette Technique - -- **Qualité du Code :** Étonnamment élevée pour un export de plateforme low-code. La structure est logique et suit les conventions modernes de React. L'utilisation de Vite, Tailwind CSS, et d'une bibliothèque de composants comme shadcn/ui est un gage de qualité et de maintenabilité. Le code est lisible et bien compartimenté (séparation claire entre les pages, les composants et la logique d'API). - -- **Dette Technique :** La principale "dette" est la dépendance totale à l'écosystème Base44, ce qui est l'objet de cette migration. Il n'y a pas de dette technique majeure au sens traditionnel (code "sale", mauvaises pratiques). Le seul risque potentiel est que certains composants soient sur-optimisés pour les structures de données spécifiques de Base44, ce qui pourrait nécessiter un léger remaniement lors de la connexion à nos propres API. diff --git a/firebase.json b/firebase.json new file mode 100644 index 00000000..a25a05b0 --- /dev/null +++ b/firebase.json @@ -0,0 +1,58 @@ +{ + "hosting": [ + { + "target": "dev", + "public": "frontend-web/dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + }, + { + "target": "staging", + "public": "frontend-web/dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + }, + { + "target": "prod", + "public": "frontend-web/dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + }, + { + "target": "internal-launchpad", + "public": "firebase/internal-launchpad", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } + ] +} diff --git a/src/App.css b/firebase/dataconnect/connector/.keep similarity index 100% rename from src/App.css rename to firebase/dataconnect/connector/.keep diff --git a/firebase/dataconnect/schema/.keep b/firebase/dataconnect/schema/.keep new file mode 100644 index 00000000..e69de29b diff --git a/firebase/firestore.rules b/firebase/firestore.rules new file mode 100644 index 00000000..476d4446 --- /dev/null +++ b/firebase/firestore.rules @@ -0,0 +1,12 @@ +rules_version = '2'; + +service cloud.firestore { + match /databases/{database}/documents { + // Base rules: By default, lock down all access. + // Data Connect will operate with admin privileges from the backend + // and will not be subject to these client-side rules. + match /{document=**} { + allow read, write: if false; + } + } +} diff --git a/firebase/functions/.keep b/firebase/functions/.keep new file mode 100644 index 00000000..e69de29b diff --git a/firebase/internal-launchpad/assets/diagrams/high-level-overview.svg b/firebase/internal-launchpad/assets/diagrams/high-level-overview.svg new file mode 100644 index 00000000..16c28600 --- /dev/null +++ b/firebase/internal-launchpad/assets/diagrams/high-level-overview.svg @@ -0,0 +1,102 @@ +

No - Retry

Yes

No - Missing Info

Yes

Rejected - Needs Corrections

Approved

Yes

No

Yes

No

Yes

No

Yes

No

Accept

Decline

No

Yes

Alternative Path

Yes

No

Yes

No

Yes

No

📱 START: STAFF ONBOARDING WORKFLOW

Staff Enters Phone Number

SMS Verification Sent

Staff Enters Verification Code

Code Valid?

✓ Account Created

Start Profile Creation Wizard

Step 1: Enter Personal Info
Name, Email, Photo

Step 2: Upload Legal Documents
ID, Work Permits

Step 3: Add Banking Information
Account Details for Payment

Step 4: Add Skills & Roles
Select Skills, Experience Level

Step 5: Add Certifications
Upload Professional Certificates

Step 6: Set Work Zones & Availability
Preferred Locations, Schedule

100% Complete Checklist?
All Required Fields Filled?

Submit Profile for Validation

⏳ Waiting Screen
Pending Admin Review

Admin Validates Profile?

✅ Account Activated - Ready to Work!

📅 START: EVENT CREATION WORKFLOW

Client Opens Client App

Click Create New Event

Enter Event Details
Name, Description, Type

Set Event Date & Location
Address, Venue Name

Define Shift 1
Start Time & End Time

Add Position 1 to Shift 1

Configure Position:
• Skill Required
• Staff Count Needed
• Hourly Rate
• Department

Add More Positions
to This Shift?

Add More Shifts
to This Event?

Recurring Event?

Set Recurrence Pattern
Daily, Weekly, Custom

Preview Complete Event

Publish Event

✅ Event Available for Admin Assignment

📋 START: SHIFT ASSIGNMENT WORKFLOW

Admin Views Published Events

Admin Selects Event

Admin Reviews Requirements
Skills, Count, Schedule

Search Available Staff

Apply Filters:
• Required Skills
• Location Match
• Availability
• Rating Score

Admin Selects Staff Member

Admin Assigns Staff to Position

More Positions
to Fill?

Send Notifications to All Assigned Staff

Staff Receives Notification

Staff Opens Shift Details
Views: Event, Location, Rate, Hours

Staff Decision?

✅ Shift Status: CONFIRMED

Staff Provides Decline Reason

Notify Admin

🕒 START: QR CODE TIME TRACKING WORKFLOW

📅 Event Day Arrives

Client Opens Event in Client App

Client Clicks Generate QR Code

📱 QR Code Displayed on Client Screen

Staff Arrives at Venue

Staff Opens Staff App

Staff Clicks Clock In

Staff Scans QR Code

Backend Verifies:
• QR Code Valid?
• Location Match?
• Staff Assigned?

Verification Passed?

❌ Error Message Displayed

✅ Staff Clocked In Successfully

⏱️ Real-time Timer Starts in Staff App

Staff Works During Shift

End of Shift

Staff Scans Same QR Code

Staff Clicks Clock Out

Backend Calculates Total Hours

✅ Staff Clocked Out Successfully

Shift Status: COMPLETED

⚠️ Staff Has Issue
No Battery, App Problem

Client Uses Manual Clock In

⭐ START: POST-SHIFT RATING & INVOICING WORKFLOW

All Shifts Completed

Client Receives Notification
Please Rate Your Staff

Client Opens Event Details

Client Views List of Assigned Staff

Client Selects Staff Member

Client Rates Performance
1 to 5 Stars ⭐⭐⭐⭐⭐

Client Adds Comments Optional
Feedback About Performance

Rating Submitted & Saved

More Staff
to Rate?

Backend Auto-Generates Invoice

Invoice Calculation:
• Total Hours per Staff
• Rate × Hours
• Platform Fees

📧 Invoice Sent to Client

Client Reviews Invoice Details

Client Agrees
with Invoice?

Client Approves Invoice

✅ Invoice Approved - Payment Scheduled

Client Contests Invoice

Client Adds Reason for Dispute
Incorrect Hours, Wrong Rate, etc.

⚠️ Dispute Created for Admin Review

💰 START: STAFF EARNINGS & PAYMENT WORKFLOW

Shift Completed & Invoice Approved

Backend Calculates Staff Payment

Formula: Hours Worked × Hourly Rate

Payment Added to Staff Earnings Balance

Staff Opens Earnings Dashboard

Staff Views:
• Weekly Earnings
• Monthly Earnings
• Total Hours Worked
• Earnings Breakdown by Shift

Payment Processing Cycle
Weekly/Bi-weekly

💳 Payment Transferred to Bank Account

Staff Receives Payment Notification

Payment Appears in History Tab

Staff Checks:
Payment Amount Correct?

✅ Payment Complete - All Good!

Staff Opens Dispute

Staff Selects Payment in History

Staff Provides Dispute Reason
Wrong Hours, Wrong Rate, Missing Hours

⚠️ Dispute Sent to KROW Admin

Admin Reviews & Resolves

🎉 END OF ALL WORKFLOWS

\ No newline at end of file diff --git a/firebase/internal-launchpad/assets/diagrams/invoice-workflow.svg b/firebase/internal-launchpad/assets/diagrams/invoice-workflow.svg new file mode 100644 index 00000000..974b2299 --- /dev/null +++ b/firebase/internal-launchpad/assets/diagrams/invoice-workflow.svg @@ -0,0 +1,102 @@ +

Option A

Option B

Recommended

Budget Option

Approve ✅

Dispute ⚠️

Option A

Option B

Option C

Option A

Option B

Option C

Recommended

Manual

Adjust Invoice

Reject Dispute

💼 Shift Completed & Rated

📊 INTERNAL: Calculate Invoice

• Hours worked per staff
• Regular + Overtime + Double
• Rate × Hours
• Platform fees
• Tax calculations

📄 INTERNAL: Generate Invoice Document

How to generate PDF?

✅ Internal PDF Library
Laravel DomPDF/Snappy
Full control, no extra cost

🔌 API Service
DocuPDF, PDFShift
Cost per invoice

💾 INTERNAL: Save Invoice to Database

• Invoice number
• Status: pending
• Due date
• Payment terms
• Stored in your DB

📧 Send Invoice to Client

How to send email?

🔌 Email Service API
SendGrid / Mailgun / AWS SES
~$0.001 per email
Better deliverability

⚠️ Internal SMTP
Your own server
Risk: spam folder

📱 Client Receives Invoice

Client Reviews

Invoice Approved

INTERNAL: Dispute Management
Admin reviews & resolves

💳 Payment Processing

How to collect payment?

🔌 Stripe API
• Credit card processing
• ACH bank transfer
• Fee: 2.9% + $0.30

📝 Manual Payment
• Bank wire
• Check
• Tracked in your system

🔌 Other Payment API
• PayPal
• Square
• Authorize.net

✅ Payment Received

💾 INTERNAL: Update Invoice Status

Accounting Integration?

🔌 QuickBooks API
Auto-sync invoices
to accounting system

🔌 Xero API
For accounting sync

📊 Internal Reports Only
Export CSV for accountant

💰 Pay Staff Their Earnings

How to pay staff?

🔌 Payroll API
• Stripe Connect
• Gusto
• ADP
Automated payouts

🏦 Manual Bank Transfers
You process each one

🎉 Invoice Cycle Complete

Admin Reviews Dispute

Decision?

\ No newline at end of file diff --git a/firebase/internal-launchpad/assets/diagrams/shift-lifecycle-workflow.svg b/firebase/internal-launchpad/assets/diagrams/shift-lifecycle-workflow.svg new file mode 100644 index 00000000..31a3ac92 Binary files /dev/null and b/firebase/internal-launchpad/assets/diagrams/shift-lifecycle-workflow.svg differ diff --git a/firebase/internal-launchpad/launchpad.html b/firebase/internal-launchpad/launchpad.html new file mode 100644 index 00000000..52fd0c11 --- /dev/null +++ b/firebase/internal-launchpad/launchpad.html @@ -0,0 +1,246 @@ + + + + + + + KROW Launchpad + + + + + + + + + +
+ + + + +
+ +
+

Welcome to the Project Launchpad

+
+
+
+

Applications

+
+ +
+
+
+
+
+

Access & Resources

+ +
+
+
+
+ + +
+
+

+
+ + + +
+
+
+ +
+
+
+
+ + + + + + + + + diff --git a/firebase/internal-launchpad/logo.svg b/firebase/internal-launchpad/logo.svg new file mode 100644 index 00000000..b5220ffe --- /dev/null +++ b/firebase/internal-launchpad/logo.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/firebase/storage.rules b/firebase/storage.rules new file mode 100644 index 00000000..402661c1 --- /dev/null +++ b/firebase/storage.rules @@ -0,0 +1,11 @@ +rules_version = '2'; + +service firebase.storage { + match /b/{bucket}/o { + // Base rules: By default, lock down all access. + // Client-side uploads will be managed via signed URLs generated by the backend if needed. + match /{allPaths=**} { + allow read, write: if false; + } + } +} diff --git a/frontend-web/.gitignore b/frontend-web/.gitignore new file mode 100644 index 00000000..002c7891 --- /dev/null +++ b/frontend-web/.gitignore @@ -0,0 +1,41 @@ +# 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? \ No newline at end of file diff --git a/frontend-web/README.md b/frontend-web/README.md new file mode 100644 index 00000000..ab67fcae --- /dev/null +++ b/frontend-web/README.md @@ -0,0 +1,72 @@ +# KROW Workforce - Frontend + +Ce projet contient le code du frontend pour la plateforme KROW Workforce. Il a été initialement prototypé sur la plateforme low-code Base44 et est en cours de migration vers une infrastructure backend personnalisée sur Google Cloud Platform (GCP). + +Ce `README.md` est le guide officiel pour l'équipe de développement. **NE PAS REMPLACER** ce fichier par celui fourni dans les exports de Base44. + +--- + +## 🚀 Démarrage Rapide + +Ce projet utilise un `Makefile` comme point d'entrée principal pour toutes les commandes courantes. + +### Prérequis +- Node.js (version LTS recommandée) +- npm +- `make` (généralement pré-installé sur Linux et macOS) + +### Installation et Lancement +1. **Installer les dépendances :** + ```bash + make install + ``` + +2. **Lancer le serveur de développement :** + ```bash + make dev + ``` + L'application sera disponible sur `http://localhost:5173`. + +--- + +## 🔄 Workflow d'Intégration des Mises à Jour de Base44 + +Pour intégrer les nouvelles modifications de l'UI faites par la cliente sur la plateforme Base44, suivez ce processus rigoureux : + +### 1. Valider les Changements d'API +Avant d'intégrer le nouveau code, il est impératif de mettre à jour notre documentation API et notre spécification technique. Suivez rigoureusement la procédure détaillée dans le fichier `docs/MAINTENANCE_GUIDE.md`. + +### 2. Intégrer le Nouveau Frontend +1. **Créez une branche dédiée** dans Git : + ```bash + git checkout -b integration/base44-update-YYYY-MM-DD + ``` +2. **Placez l'export** de Base44 dans un dossier nommé `krow-workforce-web-export-latest` à côté du dossier de ce projet. La structure attendue est : + ``` + - /krow-workforce-web/ (ce projet) + - /krow-workforce-web-export-latest/ (le nouvel export) + ``` +3. **Exécutez la commande d'intégration** pour copier automatiquement les fichiers `src` et `index.html` : + ```bash + make integrate-export + ``` +4. **Exécutez le script de préparation** pour neutraliser le SDK Base44 et appliquer nos patchs : + ```bash + make prepare-export + ``` +5. **Analysez les différences** avec `git diff`. Intégrez les nouveaux composants et les modifications de l'UI, mais **rejetez les changements** sur les fichiers que nous avons patchés (`src/api/base44Client.js`, `src/main.jsx`, `src/pages/Layout.jsx`) pour conserver notre environnement local fonctionnel. Vérifiez également `package.json` pour toute nouvelle dépendance à ajouter manuellement. +6. **Testez l'application** en local avec `make dev` pour vous assurer que tout fonctionne comme prévu. +7. Commitez vos changements. + +--- + +## 📂 Structure du Projet + +- `scripts/prepare-export.js`: Script de patching pour le workflow hybride. +- `docs/`: Contient la documentation du projet (spécification de l'API, guides...). +- `src/`: Code source de l'application. + - `src/api/`: Contient la configuration du client API (actuellement mocké). + - `src/components/`: Composants React réutilisables. + - `src/pages/`: Vues principales de l'application, correspondant aux routes. + - `src/lib/`: Utilitaires et bibliothèques partagées. +- `Makefile`: Orchestrateur des commandes du projet. diff --git a/components.json b/frontend-web/components.json similarity index 100% rename from components.json rename to frontend-web/components.json diff --git a/eslint.config.js b/frontend-web/eslint.config.js similarity index 100% rename from eslint.config.js rename to frontend-web/eslint.config.js diff --git a/index.html b/frontend-web/index.html similarity index 100% rename from index.html rename to frontend-web/index.html diff --git a/jsconfig.json b/frontend-web/jsconfig.json similarity index 100% rename from jsconfig.json rename to frontend-web/jsconfig.json diff --git a/package-lock.json b/frontend-web/package-lock.json similarity index 100% rename from package-lock.json rename to frontend-web/package-lock.json diff --git a/package.json b/frontend-web/package.json similarity index 100% rename from package.json rename to frontend-web/package.json diff --git a/postcss.config.js b/frontend-web/postcss.config.js similarity index 100% rename from postcss.config.js rename to frontend-web/postcss.config.js diff --git a/frontend-web/src/App.css b/frontend-web/src/App.css new file mode 100644 index 00000000..e69de29b diff --git a/src/App.jsx b/frontend-web/src/App.jsx similarity index 100% rename from src/App.jsx rename to frontend-web/src/App.jsx diff --git a/src/api/base44Client.js b/frontend-web/src/api/base44Client.js similarity index 100% rename from src/api/base44Client.js rename to frontend-web/src/api/base44Client.js diff --git a/src/api/entities.js b/frontend-web/src/api/entities.js similarity index 100% rename from src/api/entities.js rename to frontend-web/src/api/entities.js diff --git a/src/api/integrations.js b/frontend-web/src/api/integrations.js similarity index 100% rename from src/api/integrations.js rename to frontend-web/src/api/integrations.js diff --git a/src/components/business/CreateBusinessModal.jsx b/frontend-web/src/components/business/CreateBusinessModal.jsx similarity index 100% rename from src/components/business/CreateBusinessModal.jsx rename to frontend-web/src/components/business/CreateBusinessModal.jsx diff --git a/src/components/chat/ChatBubble.jsx b/frontend-web/src/components/chat/ChatBubble.jsx similarity index 100% rename from src/components/chat/ChatBubble.jsx rename to frontend-web/src/components/chat/ChatBubble.jsx diff --git a/src/components/common/DragDropFileUpload.jsx b/frontend-web/src/components/common/DragDropFileUpload.jsx similarity index 100% rename from src/components/common/DragDropFileUpload.jsx rename to frontend-web/src/components/common/DragDropFileUpload.jsx diff --git a/src/components/common/PageHeader.jsx b/frontend-web/src/components/common/PageHeader.jsx similarity index 100% rename from src/components/common/PageHeader.jsx rename to frontend-web/src/components/common/PageHeader.jsx diff --git a/src/components/dashboard/EcosystemWheel.jsx b/frontend-web/src/components/dashboard/EcosystemWheel.jsx similarity index 100% rename from src/components/dashboard/EcosystemWheel.jsx rename to frontend-web/src/components/dashboard/EcosystemWheel.jsx diff --git a/src/components/dashboard/QuickMetrics.jsx b/frontend-web/src/components/dashboard/QuickMetrics.jsx similarity index 100% rename from src/components/dashboard/QuickMetrics.jsx rename to frontend-web/src/components/dashboard/QuickMetrics.jsx diff --git a/src/components/dev/RoleSwitcher.jsx b/frontend-web/src/components/dev/RoleSwitcher.jsx similarity index 100% rename from src/components/dev/RoleSwitcher.jsx rename to frontend-web/src/components/dev/RoleSwitcher.jsx diff --git a/src/components/events/AIOrderAssistant.jsx b/frontend-web/src/components/events/AIOrderAssistant.jsx similarity index 100% rename from src/components/events/AIOrderAssistant.jsx rename to frontend-web/src/components/events/AIOrderAssistant.jsx diff --git a/src/components/events/EventAssignmentModal.jsx b/frontend-web/src/components/events/EventAssignmentModal.jsx similarity index 100% rename from src/components/events/EventAssignmentModal.jsx rename to frontend-web/src/components/events/EventAssignmentModal.jsx diff --git a/src/components/events/EventForm.jsx b/frontend-web/src/components/events/EventForm.jsx similarity index 100% rename from src/components/events/EventForm.jsx rename to frontend-web/src/components/events/EventForm.jsx diff --git a/src/components/events/EventFormWizard.jsx b/frontend-web/src/components/events/EventFormWizard.jsx similarity index 100% rename from src/components/events/EventFormWizard.jsx rename to frontend-web/src/components/events/EventFormWizard.jsx diff --git a/src/components/events/EventHoverCard.jsx b/frontend-web/src/components/events/EventHoverCard.jsx similarity index 100% rename from src/components/events/EventHoverCard.jsx rename to frontend-web/src/components/events/EventHoverCard.jsx diff --git a/src/components/events/EventsTable.jsx b/frontend-web/src/components/events/EventsTable.jsx similarity index 100% rename from src/components/events/EventsTable.jsx rename to frontend-web/src/components/events/EventsTable.jsx diff --git a/src/components/events/QuickAssignPopover.jsx b/frontend-web/src/components/events/QuickAssignPopover.jsx similarity index 100% rename from src/components/events/QuickAssignPopover.jsx rename to frontend-web/src/components/events/QuickAssignPopover.jsx diff --git a/src/components/events/QuickReorderModal.jsx b/frontend-web/src/components/events/QuickReorderModal.jsx similarity index 100% rename from src/components/events/QuickReorderModal.jsx rename to frontend-web/src/components/events/QuickReorderModal.jsx diff --git a/src/components/events/ShiftCard.jsx b/frontend-web/src/components/events/ShiftCard.jsx similarity index 100% rename from src/components/events/ShiftCard.jsx rename to frontend-web/src/components/events/ShiftCard.jsx diff --git a/src/components/events/ShiftRoleCard.jsx b/frontend-web/src/components/events/ShiftRoleCard.jsx similarity index 100% rename from src/components/events/ShiftRoleCard.jsx rename to frontend-web/src/components/events/ShiftRoleCard.jsx diff --git a/src/components/events/ShiftRolesTable.jsx b/frontend-web/src/components/events/ShiftRolesTable.jsx similarity index 100% rename from src/components/events/ShiftRolesTable.jsx rename to frontend-web/src/components/events/ShiftRolesTable.jsx diff --git a/src/components/events/ShiftSection.jsx b/frontend-web/src/components/events/ShiftSection.jsx similarity index 100% rename from src/components/events/ShiftSection.jsx rename to frontend-web/src/components/events/ShiftSection.jsx diff --git a/src/components/events/StaffAssignment.jsx b/frontend-web/src/components/events/StaffAssignment.jsx similarity index 100% rename from src/components/events/StaffAssignment.jsx rename to frontend-web/src/components/events/StaffAssignment.jsx diff --git a/src/components/events/StatusCard.jsx b/frontend-web/src/components/events/StatusCard.jsx similarity index 100% rename from src/components/events/StatusCard.jsx rename to frontend-web/src/components/events/StatusCard.jsx diff --git a/src/components/messaging/ConversationList.jsx b/frontend-web/src/components/messaging/ConversationList.jsx similarity index 100% rename from src/components/messaging/ConversationList.jsx rename to frontend-web/src/components/messaging/ConversationList.jsx diff --git a/src/components/messaging/MessageInput.jsx b/frontend-web/src/components/messaging/MessageInput.jsx similarity index 100% rename from src/components/messaging/MessageInput.jsx rename to frontend-web/src/components/messaging/MessageInput.jsx diff --git a/src/components/messaging/MessageThread.jsx b/frontend-web/src/components/messaging/MessageThread.jsx similarity index 100% rename from src/components/messaging/MessageThread.jsx rename to frontend-web/src/components/messaging/MessageThread.jsx diff --git a/src/components/notifications/NotificationPanel.jsx b/frontend-web/src/components/notifications/NotificationPanel.jsx similarity index 100% rename from src/components/notifications/NotificationPanel.jsx rename to frontend-web/src/components/notifications/NotificationPanel.jsx diff --git a/src/components/permissions/UserPermissionsModal.jsx b/frontend-web/src/components/permissions/UserPermissionsModal.jsx similarity index 100% rename from src/components/permissions/UserPermissionsModal.jsx rename to frontend-web/src/components/permissions/UserPermissionsModal.jsx diff --git a/src/components/procurement/COIViewer.jsx b/frontend-web/src/components/procurement/COIViewer.jsx similarity index 100% rename from src/components/procurement/COIViewer.jsx rename to frontend-web/src/components/procurement/COIViewer.jsx diff --git a/src/components/procurement/VendorDetailModal.jsx b/frontend-web/src/components/procurement/VendorDetailModal.jsx similarity index 100% rename from src/components/procurement/VendorDetailModal.jsx rename to frontend-web/src/components/procurement/VendorDetailModal.jsx diff --git a/src/components/procurement/VendorHoverCard.jsx b/frontend-web/src/components/procurement/VendorHoverCard.jsx similarity index 100% rename from src/components/procurement/VendorHoverCard.jsx rename to frontend-web/src/components/procurement/VendorHoverCard.jsx diff --git a/src/components/procurement/VendorScoreHoverCard.jsx b/frontend-web/src/components/procurement/VendorScoreHoverCard.jsx similarity index 100% rename from src/components/procurement/VendorScoreHoverCard.jsx rename to frontend-web/src/components/procurement/VendorScoreHoverCard.jsx diff --git a/src/components/procurement/W9FormViewer.jsx b/frontend-web/src/components/procurement/W9FormViewer.jsx similarity index 100% rename from src/components/procurement/W9FormViewer.jsx rename to frontend-web/src/components/procurement/W9FormViewer.jsx diff --git a/src/components/staff/EmployeeCard.jsx b/frontend-web/src/components/staff/EmployeeCard.jsx similarity index 100% rename from src/components/staff/EmployeeCard.jsx rename to frontend-web/src/components/staff/EmployeeCard.jsx diff --git a/src/components/staff/FilterBar.jsx b/frontend-web/src/components/staff/FilterBar.jsx similarity index 100% rename from src/components/staff/FilterBar.jsx rename to frontend-web/src/components/staff/FilterBar.jsx diff --git a/src/components/staff/StaffCard.jsx b/frontend-web/src/components/staff/StaffCard.jsx similarity index 100% rename from src/components/staff/StaffCard.jsx rename to frontend-web/src/components/staff/StaffCard.jsx diff --git a/src/components/staff/StaffForm.jsx b/frontend-web/src/components/staff/StaffForm.jsx similarity index 100% rename from src/components/staff/StaffForm.jsx rename to frontend-web/src/components/staff/StaffForm.jsx diff --git a/src/components/staff/StatsCard.jsx b/frontend-web/src/components/staff/StatsCard.jsx similarity index 100% rename from src/components/staff/StatsCard.jsx rename to frontend-web/src/components/staff/StatsCard.jsx diff --git a/src/components/ui/accordion.jsx b/frontend-web/src/components/ui/accordion.jsx similarity index 100% rename from src/components/ui/accordion.jsx rename to frontend-web/src/components/ui/accordion.jsx diff --git a/src/components/ui/alert-dialog.jsx b/frontend-web/src/components/ui/alert-dialog.jsx similarity index 100% rename from src/components/ui/alert-dialog.jsx rename to frontend-web/src/components/ui/alert-dialog.jsx diff --git a/src/components/ui/alert.jsx b/frontend-web/src/components/ui/alert.jsx similarity index 100% rename from src/components/ui/alert.jsx rename to frontend-web/src/components/ui/alert.jsx diff --git a/src/components/ui/aspect-ratio.jsx b/frontend-web/src/components/ui/aspect-ratio.jsx similarity index 100% rename from src/components/ui/aspect-ratio.jsx rename to frontend-web/src/components/ui/aspect-ratio.jsx diff --git a/src/components/ui/avatar.jsx b/frontend-web/src/components/ui/avatar.jsx similarity index 100% rename from src/components/ui/avatar.jsx rename to frontend-web/src/components/ui/avatar.jsx diff --git a/src/components/ui/badge.jsx b/frontend-web/src/components/ui/badge.jsx similarity index 100% rename from src/components/ui/badge.jsx rename to frontend-web/src/components/ui/badge.jsx diff --git a/src/components/ui/breadcrumb.jsx b/frontend-web/src/components/ui/breadcrumb.jsx similarity index 100% rename from src/components/ui/breadcrumb.jsx rename to frontend-web/src/components/ui/breadcrumb.jsx diff --git a/src/components/ui/button.jsx b/frontend-web/src/components/ui/button.jsx similarity index 100% rename from src/components/ui/button.jsx rename to frontend-web/src/components/ui/button.jsx diff --git a/src/components/ui/calendar.jsx b/frontend-web/src/components/ui/calendar.jsx similarity index 100% rename from src/components/ui/calendar.jsx rename to frontend-web/src/components/ui/calendar.jsx diff --git a/src/components/ui/card.jsx b/frontend-web/src/components/ui/card.jsx similarity index 100% rename from src/components/ui/card.jsx rename to frontend-web/src/components/ui/card.jsx diff --git a/src/components/ui/carousel.jsx b/frontend-web/src/components/ui/carousel.jsx similarity index 100% rename from src/components/ui/carousel.jsx rename to frontend-web/src/components/ui/carousel.jsx diff --git a/src/components/ui/chart.jsx b/frontend-web/src/components/ui/chart.jsx similarity index 100% rename from src/components/ui/chart.jsx rename to frontend-web/src/components/ui/chart.jsx diff --git a/src/components/ui/checkbox.jsx b/frontend-web/src/components/ui/checkbox.jsx similarity index 100% rename from src/components/ui/checkbox.jsx rename to frontend-web/src/components/ui/checkbox.jsx diff --git a/src/components/ui/collapsible.jsx b/frontend-web/src/components/ui/collapsible.jsx similarity index 100% rename from src/components/ui/collapsible.jsx rename to frontend-web/src/components/ui/collapsible.jsx diff --git a/src/components/ui/command.jsx b/frontend-web/src/components/ui/command.jsx similarity index 100% rename from src/components/ui/command.jsx rename to frontend-web/src/components/ui/command.jsx diff --git a/src/components/ui/context-menu.jsx b/frontend-web/src/components/ui/context-menu.jsx similarity index 100% rename from src/components/ui/context-menu.jsx rename to frontend-web/src/components/ui/context-menu.jsx diff --git a/src/components/ui/dialog.jsx b/frontend-web/src/components/ui/dialog.jsx similarity index 100% rename from src/components/ui/dialog.jsx rename to frontend-web/src/components/ui/dialog.jsx diff --git a/src/components/ui/drawer.jsx b/frontend-web/src/components/ui/drawer.jsx similarity index 100% rename from src/components/ui/drawer.jsx rename to frontend-web/src/components/ui/drawer.jsx diff --git a/src/components/ui/dropdown-menu.jsx b/frontend-web/src/components/ui/dropdown-menu.jsx similarity index 100% rename from src/components/ui/dropdown-menu.jsx rename to frontend-web/src/components/ui/dropdown-menu.jsx diff --git a/src/components/ui/form.jsx b/frontend-web/src/components/ui/form.jsx similarity index 100% rename from src/components/ui/form.jsx rename to frontend-web/src/components/ui/form.jsx diff --git a/src/components/ui/hover-card.jsx b/frontend-web/src/components/ui/hover-card.jsx similarity index 100% rename from src/components/ui/hover-card.jsx rename to frontend-web/src/components/ui/hover-card.jsx diff --git a/src/components/ui/input-otp.jsx b/frontend-web/src/components/ui/input-otp.jsx similarity index 100% rename from src/components/ui/input-otp.jsx rename to frontend-web/src/components/ui/input-otp.jsx diff --git a/src/components/ui/input.jsx b/frontend-web/src/components/ui/input.jsx similarity index 100% rename from src/components/ui/input.jsx rename to frontend-web/src/components/ui/input.jsx diff --git a/src/components/ui/label.jsx b/frontend-web/src/components/ui/label.jsx similarity index 100% rename from src/components/ui/label.jsx rename to frontend-web/src/components/ui/label.jsx diff --git a/src/components/ui/menubar.jsx b/frontend-web/src/components/ui/menubar.jsx similarity index 100% rename from src/components/ui/menubar.jsx rename to frontend-web/src/components/ui/menubar.jsx diff --git a/src/components/ui/navigation-menu.jsx b/frontend-web/src/components/ui/navigation-menu.jsx similarity index 100% rename from src/components/ui/navigation-menu.jsx rename to frontend-web/src/components/ui/navigation-menu.jsx diff --git a/src/components/ui/pagination.jsx b/frontend-web/src/components/ui/pagination.jsx similarity index 100% rename from src/components/ui/pagination.jsx rename to frontend-web/src/components/ui/pagination.jsx diff --git a/src/components/ui/popover.jsx b/frontend-web/src/components/ui/popover.jsx similarity index 100% rename from src/components/ui/popover.jsx rename to frontend-web/src/components/ui/popover.jsx diff --git a/src/components/ui/progress.jsx b/frontend-web/src/components/ui/progress.jsx similarity index 100% rename from src/components/ui/progress.jsx rename to frontend-web/src/components/ui/progress.jsx diff --git a/src/components/ui/radio-group.jsx b/frontend-web/src/components/ui/radio-group.jsx similarity index 100% rename from src/components/ui/radio-group.jsx rename to frontend-web/src/components/ui/radio-group.jsx diff --git a/src/components/ui/resizable.jsx b/frontend-web/src/components/ui/resizable.jsx similarity index 100% rename from src/components/ui/resizable.jsx rename to frontend-web/src/components/ui/resizable.jsx diff --git a/src/components/ui/scroll-area.jsx b/frontend-web/src/components/ui/scroll-area.jsx similarity index 100% rename from src/components/ui/scroll-area.jsx rename to frontend-web/src/components/ui/scroll-area.jsx diff --git a/src/components/ui/select.jsx b/frontend-web/src/components/ui/select.jsx similarity index 100% rename from src/components/ui/select.jsx rename to frontend-web/src/components/ui/select.jsx diff --git a/src/components/ui/separator.jsx b/frontend-web/src/components/ui/separator.jsx similarity index 100% rename from src/components/ui/separator.jsx rename to frontend-web/src/components/ui/separator.jsx diff --git a/src/components/ui/sheet.jsx b/frontend-web/src/components/ui/sheet.jsx similarity index 100% rename from src/components/ui/sheet.jsx rename to frontend-web/src/components/ui/sheet.jsx diff --git a/src/components/ui/sidebar.jsx b/frontend-web/src/components/ui/sidebar.jsx similarity index 100% rename from src/components/ui/sidebar.jsx rename to frontend-web/src/components/ui/sidebar.jsx diff --git a/src/components/ui/skeleton.jsx b/frontend-web/src/components/ui/skeleton.jsx similarity index 100% rename from src/components/ui/skeleton.jsx rename to frontend-web/src/components/ui/skeleton.jsx diff --git a/src/components/ui/slider.jsx b/frontend-web/src/components/ui/slider.jsx similarity index 100% rename from src/components/ui/slider.jsx rename to frontend-web/src/components/ui/slider.jsx diff --git a/src/components/ui/sonner.jsx b/frontend-web/src/components/ui/sonner.jsx similarity index 100% rename from src/components/ui/sonner.jsx rename to frontend-web/src/components/ui/sonner.jsx diff --git a/src/components/ui/switch.jsx b/frontend-web/src/components/ui/switch.jsx similarity index 100% rename from src/components/ui/switch.jsx rename to frontend-web/src/components/ui/switch.jsx diff --git a/src/components/ui/table.jsx b/frontend-web/src/components/ui/table.jsx similarity index 100% rename from src/components/ui/table.jsx rename to frontend-web/src/components/ui/table.jsx diff --git a/src/components/ui/tabs.jsx b/frontend-web/src/components/ui/tabs.jsx similarity index 100% rename from src/components/ui/tabs.jsx rename to frontend-web/src/components/ui/tabs.jsx diff --git a/src/components/ui/textarea.jsx b/frontend-web/src/components/ui/textarea.jsx similarity index 100% rename from src/components/ui/textarea.jsx rename to frontend-web/src/components/ui/textarea.jsx diff --git a/src/components/ui/toast.jsx b/frontend-web/src/components/ui/toast.jsx similarity index 100% rename from src/components/ui/toast.jsx rename to frontend-web/src/components/ui/toast.jsx diff --git a/src/components/ui/toaster.jsx b/frontend-web/src/components/ui/toaster.jsx similarity index 100% rename from src/components/ui/toaster.jsx rename to frontend-web/src/components/ui/toaster.jsx diff --git a/src/components/ui/toggle-group.jsx b/frontend-web/src/components/ui/toggle-group.jsx similarity index 100% rename from src/components/ui/toggle-group.jsx rename to frontend-web/src/components/ui/toggle-group.jsx diff --git a/src/components/ui/toggle.jsx b/frontend-web/src/components/ui/toggle.jsx similarity index 100% rename from src/components/ui/toggle.jsx rename to frontend-web/src/components/ui/toggle.jsx diff --git a/src/components/ui/tooltip.jsx b/frontend-web/src/components/ui/tooltip.jsx similarity index 100% rename from src/components/ui/tooltip.jsx rename to frontend-web/src/components/ui/tooltip.jsx diff --git a/src/components/ui/use-toast.jsx b/frontend-web/src/components/ui/use-toast.jsx similarity index 100% rename from src/components/ui/use-toast.jsx rename to frontend-web/src/components/ui/use-toast.jsx diff --git a/src/components/vendor/DocumentViewer.jsx b/frontend-web/src/components/vendor/DocumentViewer.jsx similarity index 100% rename from src/components/vendor/DocumentViewer.jsx rename to frontend-web/src/components/vendor/DocumentViewer.jsx diff --git a/src/components/vendor/UpcomingOrdersCard.jsx b/frontend-web/src/components/vendor/UpcomingOrdersCard.jsx similarity index 100% rename from src/components/vendor/UpcomingOrdersCard.jsx rename to frontend-web/src/components/vendor/UpcomingOrdersCard.jsx diff --git a/src/components/vendors/EditVendorModal.jsx b/frontend-web/src/components/vendors/EditVendorModal.jsx similarity index 100% rename from src/components/vendors/EditVendorModal.jsx rename to frontend-web/src/components/vendors/EditVendorModal.jsx diff --git a/src/hooks/use-mobile.jsx b/frontend-web/src/hooks/use-mobile.jsx similarity index 100% rename from src/hooks/use-mobile.jsx rename to frontend-web/src/hooks/use-mobile.jsx diff --git a/src/index.css b/frontend-web/src/index.css similarity index 100% rename from src/index.css rename to frontend-web/src/index.css diff --git a/src/lib/utils.js b/frontend-web/src/lib/utils.js similarity index 100% rename from src/lib/utils.js rename to frontend-web/src/lib/utils.js diff --git a/src/main.jsx b/frontend-web/src/main.jsx similarity index 100% rename from src/main.jsx rename to frontend-web/src/main.jsx diff --git a/src/pages/ActivityLog.jsx b/frontend-web/src/pages/ActivityLog.jsx similarity index 100% rename from src/pages/ActivityLog.jsx rename to frontend-web/src/pages/ActivityLog.jsx diff --git a/src/pages/AddBusiness.jsx b/frontend-web/src/pages/AddBusiness.jsx similarity index 100% rename from src/pages/AddBusiness.jsx rename to frontend-web/src/pages/AddBusiness.jsx diff --git a/src/pages/AddEnterprise.jsx b/frontend-web/src/pages/AddEnterprise.jsx similarity index 100% rename from src/pages/AddEnterprise.jsx rename to frontend-web/src/pages/AddEnterprise.jsx diff --git a/src/pages/AddPartner.jsx b/frontend-web/src/pages/AddPartner.jsx similarity index 100% rename from src/pages/AddPartner.jsx rename to frontend-web/src/pages/AddPartner.jsx diff --git a/src/pages/AddSector.jsx b/frontend-web/src/pages/AddSector.jsx similarity index 100% rename from src/pages/AddSector.jsx rename to frontend-web/src/pages/AddSector.jsx diff --git a/src/pages/AddStaff.jsx b/frontend-web/src/pages/AddStaff.jsx similarity index 100% rename from src/pages/AddStaff.jsx rename to frontend-web/src/pages/AddStaff.jsx diff --git a/src/pages/Business.jsx b/frontend-web/src/pages/Business.jsx similarity index 100% rename from src/pages/Business.jsx rename to frontend-web/src/pages/Business.jsx diff --git a/src/pages/Certification.jsx b/frontend-web/src/pages/Certification.jsx similarity index 100% rename from src/pages/Certification.jsx rename to frontend-web/src/pages/Certification.jsx diff --git a/src/pages/ClientDashboard.jsx b/frontend-web/src/pages/ClientDashboard.jsx similarity index 100% rename from src/pages/ClientDashboard.jsx rename to frontend-web/src/pages/ClientDashboard.jsx diff --git a/src/pages/ClientInvoices.jsx b/frontend-web/src/pages/ClientInvoices.jsx similarity index 100% rename from src/pages/ClientInvoices.jsx rename to frontend-web/src/pages/ClientInvoices.jsx diff --git a/src/pages/ClientOrders.jsx b/frontend-web/src/pages/ClientOrders.jsx similarity index 100% rename from src/pages/ClientOrders.jsx rename to frontend-web/src/pages/ClientOrders.jsx diff --git a/src/pages/CreateEvent.jsx b/frontend-web/src/pages/CreateEvent.jsx similarity index 100% rename from src/pages/CreateEvent.jsx rename to frontend-web/src/pages/CreateEvent.jsx diff --git a/src/pages/CreateTeam.jsx b/frontend-web/src/pages/CreateTeam.jsx similarity index 100% rename from src/pages/CreateTeam.jsx rename to frontend-web/src/pages/CreateTeam.jsx diff --git a/src/pages/Dashboard.jsx b/frontend-web/src/pages/Dashboard.jsx similarity index 100% rename from src/pages/Dashboard.jsx rename to frontend-web/src/pages/Dashboard.jsx diff --git a/src/pages/EditBusiness.jsx b/frontend-web/src/pages/EditBusiness.jsx similarity index 100% rename from src/pages/EditBusiness.jsx rename to frontend-web/src/pages/EditBusiness.jsx diff --git a/src/pages/EditEnterprise.jsx b/frontend-web/src/pages/EditEnterprise.jsx similarity index 100% rename from src/pages/EditEnterprise.jsx rename to frontend-web/src/pages/EditEnterprise.jsx diff --git a/src/pages/EditEvent.jsx b/frontend-web/src/pages/EditEvent.jsx similarity index 100% rename from src/pages/EditEvent.jsx rename to frontend-web/src/pages/EditEvent.jsx diff --git a/src/pages/EditPartner.jsx b/frontend-web/src/pages/EditPartner.jsx similarity index 100% rename from src/pages/EditPartner.jsx rename to frontend-web/src/pages/EditPartner.jsx diff --git a/src/pages/EditSector.jsx b/frontend-web/src/pages/EditSector.jsx similarity index 100% rename from src/pages/EditSector.jsx rename to frontend-web/src/pages/EditSector.jsx diff --git a/src/pages/EditStaff.jsx b/frontend-web/src/pages/EditStaff.jsx similarity index 100% rename from src/pages/EditStaff.jsx rename to frontend-web/src/pages/EditStaff.jsx diff --git a/src/pages/EditVendor.jsx b/frontend-web/src/pages/EditVendor.jsx similarity index 100% rename from src/pages/EditVendor.jsx rename to frontend-web/src/pages/EditVendor.jsx diff --git a/src/pages/EnterpriseManagement.jsx b/frontend-web/src/pages/EnterpriseManagement.jsx similarity index 100% rename from src/pages/EnterpriseManagement.jsx rename to frontend-web/src/pages/EnterpriseManagement.jsx diff --git a/src/pages/EventDetail.jsx b/frontend-web/src/pages/EventDetail.jsx similarity index 100% rename from src/pages/EventDetail.jsx rename to frontend-web/src/pages/EventDetail.jsx diff --git a/src/pages/Events.jsx b/frontend-web/src/pages/Events.jsx similarity index 100% rename from src/pages/Events.jsx rename to frontend-web/src/pages/Events.jsx diff --git a/src/pages/Home.jsx b/frontend-web/src/pages/Home.jsx similarity index 100% rename from src/pages/Home.jsx rename to frontend-web/src/pages/Home.jsx diff --git a/src/pages/InviteVendor.jsx b/frontend-web/src/pages/InviteVendor.jsx similarity index 100% rename from src/pages/InviteVendor.jsx rename to frontend-web/src/pages/InviteVendor.jsx diff --git a/src/pages/Invoices.jsx b/frontend-web/src/pages/Invoices.jsx similarity index 100% rename from src/pages/Invoices.jsx rename to frontend-web/src/pages/Invoices.jsx diff --git a/src/pages/Layout.jsx b/frontend-web/src/pages/Layout.jsx similarity index 100% rename from src/pages/Layout.jsx rename to frontend-web/src/pages/Layout.jsx diff --git a/src/pages/Messages.jsx b/frontend-web/src/pages/Messages.jsx similarity index 100% rename from src/pages/Messages.jsx rename to frontend-web/src/pages/Messages.jsx diff --git a/src/pages/Onboarding.jsx b/frontend-web/src/pages/Onboarding.jsx similarity index 100% rename from src/pages/Onboarding.jsx rename to frontend-web/src/pages/Onboarding.jsx diff --git a/src/pages/OperatorDashboard.jsx b/frontend-web/src/pages/OperatorDashboard.jsx similarity index 100% rename from src/pages/OperatorDashboard.jsx rename to frontend-web/src/pages/OperatorDashboard.jsx diff --git a/src/pages/PartnerManagement.jsx b/frontend-web/src/pages/PartnerManagement.jsx similarity index 100% rename from src/pages/PartnerManagement.jsx rename to frontend-web/src/pages/PartnerManagement.jsx diff --git a/src/pages/Payroll.jsx b/frontend-web/src/pages/Payroll.jsx similarity index 100% rename from src/pages/Payroll.jsx rename to frontend-web/src/pages/Payroll.jsx diff --git a/src/pages/Permissions.jsx b/frontend-web/src/pages/Permissions.jsx similarity index 100% rename from src/pages/Permissions.jsx rename to frontend-web/src/pages/Permissions.jsx diff --git a/src/pages/ProcurementDashboard.jsx b/frontend-web/src/pages/ProcurementDashboard.jsx similarity index 100% rename from src/pages/ProcurementDashboard.jsx rename to frontend-web/src/pages/ProcurementDashboard.jsx diff --git a/src/pages/Reports.jsx b/frontend-web/src/pages/Reports.jsx similarity index 100% rename from src/pages/Reports.jsx rename to frontend-web/src/pages/Reports.jsx diff --git a/src/pages/SectorManagement.jsx b/frontend-web/src/pages/SectorManagement.jsx similarity index 100% rename from src/pages/SectorManagement.jsx rename to frontend-web/src/pages/SectorManagement.jsx diff --git a/src/pages/Settings.jsx b/frontend-web/src/pages/Settings.jsx similarity index 100% rename from src/pages/Settings.jsx rename to frontend-web/src/pages/Settings.jsx diff --git a/src/pages/SmartVendorOnboarding.jsx b/frontend-web/src/pages/SmartVendorOnboarding.jsx similarity index 100% rename from src/pages/SmartVendorOnboarding.jsx rename to frontend-web/src/pages/SmartVendorOnboarding.jsx diff --git a/src/pages/StaffDirectory.jsx b/frontend-web/src/pages/StaffDirectory.jsx similarity index 100% rename from src/pages/StaffDirectory.jsx rename to frontend-web/src/pages/StaffDirectory.jsx diff --git a/src/pages/Support.jsx b/frontend-web/src/pages/Support.jsx similarity index 100% rename from src/pages/Support.jsx rename to frontend-web/src/pages/Support.jsx diff --git a/src/pages/TeamDetails.jsx b/frontend-web/src/pages/TeamDetails.jsx similarity index 100% rename from src/pages/TeamDetails.jsx rename to frontend-web/src/pages/TeamDetails.jsx diff --git a/src/pages/Teams.jsx b/frontend-web/src/pages/Teams.jsx similarity index 100% rename from src/pages/Teams.jsx rename to frontend-web/src/pages/Teams.jsx diff --git a/src/pages/UserManagement.jsx b/frontend-web/src/pages/UserManagement.jsx similarity index 100% rename from src/pages/UserManagement.jsx rename to frontend-web/src/pages/UserManagement.jsx diff --git a/src/pages/VendorCompliance.jsx b/frontend-web/src/pages/VendorCompliance.jsx similarity index 100% rename from src/pages/VendorCompliance.jsx rename to frontend-web/src/pages/VendorCompliance.jsx diff --git a/src/pages/VendorDashboard.jsx b/frontend-web/src/pages/VendorDashboard.jsx similarity index 100% rename from src/pages/VendorDashboard.jsx rename to frontend-web/src/pages/VendorDashboard.jsx diff --git a/src/pages/VendorDocumentReview.jsx b/frontend-web/src/pages/VendorDocumentReview.jsx similarity index 100% rename from src/pages/VendorDocumentReview.jsx rename to frontend-web/src/pages/VendorDocumentReview.jsx diff --git a/src/pages/VendorInvoices.jsx b/frontend-web/src/pages/VendorInvoices.jsx similarity index 100% rename from src/pages/VendorInvoices.jsx rename to frontend-web/src/pages/VendorInvoices.jsx diff --git a/src/pages/VendorManagement.jsx b/frontend-web/src/pages/VendorManagement.jsx similarity index 100% rename from src/pages/VendorManagement.jsx rename to frontend-web/src/pages/VendorManagement.jsx diff --git a/src/pages/VendorOnboarding.jsx b/frontend-web/src/pages/VendorOnboarding.jsx similarity index 100% rename from src/pages/VendorOnboarding.jsx rename to frontend-web/src/pages/VendorOnboarding.jsx diff --git a/src/pages/VendorOrders.jsx b/frontend-web/src/pages/VendorOrders.jsx similarity index 100% rename from src/pages/VendorOrders.jsx rename to frontend-web/src/pages/VendorOrders.jsx diff --git a/src/pages/VendorPerformance.jsx b/frontend-web/src/pages/VendorPerformance.jsx similarity index 100% rename from src/pages/VendorPerformance.jsx rename to frontend-web/src/pages/VendorPerformance.jsx diff --git a/src/pages/VendorRateCard.jsx b/frontend-web/src/pages/VendorRateCard.jsx similarity index 100% rename from src/pages/VendorRateCard.jsx rename to frontend-web/src/pages/VendorRateCard.jsx diff --git a/src/pages/VendorRates.jsx b/frontend-web/src/pages/VendorRates.jsx similarity index 100% rename from src/pages/VendorRates.jsx rename to frontend-web/src/pages/VendorRates.jsx diff --git a/src/pages/VendorStaff.jsx b/frontend-web/src/pages/VendorStaff.jsx similarity index 100% rename from src/pages/VendorStaff.jsx rename to frontend-web/src/pages/VendorStaff.jsx diff --git a/src/pages/WorkforceCompliance.jsx b/frontend-web/src/pages/WorkforceCompliance.jsx similarity index 100% rename from src/pages/WorkforceCompliance.jsx rename to frontend-web/src/pages/WorkforceCompliance.jsx diff --git a/src/pages/WorkforceDashboard.jsx b/frontend-web/src/pages/WorkforceDashboard.jsx similarity index 100% rename from src/pages/WorkforceDashboard.jsx rename to frontend-web/src/pages/WorkforceDashboard.jsx diff --git a/src/pages/WorkforceEarnings.jsx b/frontend-web/src/pages/WorkforceEarnings.jsx similarity index 100% rename from src/pages/WorkforceEarnings.jsx rename to frontend-web/src/pages/WorkforceEarnings.jsx diff --git a/src/pages/WorkforceProfile.jsx b/frontend-web/src/pages/WorkforceProfile.jsx similarity index 100% rename from src/pages/WorkforceProfile.jsx rename to frontend-web/src/pages/WorkforceProfile.jsx diff --git a/src/pages/WorkforceShifts.jsx b/frontend-web/src/pages/WorkforceShifts.jsx similarity index 100% rename from src/pages/WorkforceShifts.jsx rename to frontend-web/src/pages/WorkforceShifts.jsx diff --git a/src/pages/index.jsx b/frontend-web/src/pages/index.jsx similarity index 100% rename from src/pages/index.jsx rename to frontend-web/src/pages/index.jsx diff --git a/src/utils/index.ts b/frontend-web/src/utils/index.ts similarity index 100% rename from src/utils/index.ts rename to frontend-web/src/utils/index.ts diff --git a/tailwind.config.js b/frontend-web/tailwind.config.js similarity index 100% rename from tailwind.config.js rename to frontend-web/tailwind.config.js diff --git a/vite.config.js b/frontend-web/vite.config.js similarity index 100% rename from vite.config.js rename to frontend-web/vite.config.js diff --git a/mobile-apps/client-app/.keep b/mobile-apps/client-app/.keep new file mode 100644 index 00000000..e69de29b diff --git a/mobile-apps/staff-app/.keep b/mobile-apps/staff-app/.keep new file mode 100644 index 00000000..e69de29b diff --git a/scripts/prepare-export.js b/scripts/prepare-export.js index e14912b4..4fabe802 100644 --- a/scripts/prepare-export.js +++ b/scripts/prepare-export.js @@ -6,7 +6,7 @@ import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const projectRoot = path.join(__dirname, '..'); +const projectRoot = path.join(__dirname, '..', 'frontend-web'); // --- Fonctions de Patch ---