Merge branch 'dev' into 592-migrate-frontend-applications-to-v2-backend-and-database
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
> **Status: LEGACY / ARCHIVED REFERENCE**
|
||||
> This document is based on a historical export from the Base44 platform.
|
||||
> It is maintained in this repository solely for reference purposes during the rebuild and is **not** to be considered the definitive or active API specification for the production system.
|
||||
> The actual data schemas and operations are now defined directly within `backend/dataconnect/`.
|
||||
> The historical V1 Data Connect schemas and operations now live in `legacy/dataconnect-v1/`.
|
||||
> The active V2 backend source of truth is the unified/backend service stack under `backend/command-api`, `backend/query-api`, `backend/core-api`, and `backend/unified-api`.
|
||||
|
||||
**Original Version:** 3.0
|
||||
**Original Date:** 2025-11-20
|
||||
@@ -1423,4 +1424,4 @@ firebase functions:config:set \
|
||||
|
||||
---
|
||||
|
||||
© 2025 KROW Workforce / Oloodi Technologies Inc. All rights reserved.
|
||||
© 2025 KROW Workforce / Oloodi Technologies Inc. All rights reserved.
|
||||
|
||||
@@ -926,7 +926,7 @@ Via modular `profile_sections/` architecture:
|
||||
| Legacy Client Mobile | `_legacy/apps/krow_client_context.md` | Flutter (context doc) |
|
||||
| Legacy Worker (Legacy Staff) Mobile | `_legacy/apps/krow_staff_context.md` | Flutter (context doc) |
|
||||
| Legacy Backend | `_legacy/apps/php_backend_context.md` | PHP/Laravel |
|
||||
| New Backend | `backend/dataconnect/` | Firebase Data Connect |
|
||||
| Legacy V1 Data Connect Backend | `legacy/dataconnect-v1/` | Firebase Data Connect |
|
||||
|
||||
---
|
||||
|
||||
@@ -974,7 +974,7 @@ For each feature in Sprint 3:
|
||||
|
||||
2. **Write Schema Incrementally**
|
||||
```gql
|
||||
# backend/dataconnect/schema/event.gql
|
||||
# legacy/dataconnect-v1/schema/event.gql
|
||||
type Event @table {
|
||||
id: UUID! @default(expr: "uuidV4()")
|
||||
name: String!
|
||||
@@ -989,7 +989,7 @@ For each feature in Sprint 3:
|
||||
|
||||
3. **Define Queries/Mutations**
|
||||
```gql
|
||||
# backend/dataconnect/queries/events.gql
|
||||
# legacy/dataconnect-v1/queries/events.gql
|
||||
query ListEvents($status: EventStatus) @auth(level: USER) {
|
||||
events(where: { status: { eq: $status } }) {
|
||||
id, name, status, date
|
||||
@@ -1308,7 +1308,7 @@ Business (1) ──┬── (1) BusinessSetting
|
||||
| Legacy Client context | `_legacy/apps/krow_client_context.md` |
|
||||
| Legacy Staff context | `_legacy/apps/krow_staff_context.md` |
|
||||
| Architecture diagrams | `internal/launchpad/assets/diagrams/` |
|
||||
| Data Connect schemas | `backend/dataconnect/` |
|
||||
| Data Connect schemas | `legacy/dataconnect-v1/` |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Data Connect Connectors Pattern
|
||||
|
||||
> [!WARNING]
|
||||
> This document describes the legacy V1 Data Connect connector pattern.
|
||||
> For current backend work, use the V2 unified API docs under `docs/BACKEND/API_GUIDES/V2/`.
|
||||
|
||||
## Overview
|
||||
|
||||
This document describes the **Data Connect Connectors** pattern implemented in the KROW mobile app. This pattern centralizes all backend query logic by mirroring backend connector structure in the mobile data layer.
|
||||
@@ -45,9 +49,9 @@ apps/mobile/packages/data_connect/lib/src/connectors/
|
||||
└── ...
|
||||
```
|
||||
|
||||
**Maps to backend structure:**
|
||||
**Maps to legacy backend structure:**
|
||||
```
|
||||
backend/dataconnect/connector/
|
||||
legacy/dataconnect-v1/connector/
|
||||
├── staff/
|
||||
├── order/
|
||||
├── user/
|
||||
@@ -260,7 +264,7 @@ When backend adds new connector (e.g., `order`):
|
||||
- `staff_main` - Guards bottom nav items requiring profile completion
|
||||
|
||||
**Backend Queries Used**:
|
||||
- `backend/dataconnect/connector/staff/queries/profile_completion.gql`
|
||||
- `legacy/dataconnect-v1/connector/staff/queries/profile_completion.gql`
|
||||
|
||||
### Shifts Connector
|
||||
|
||||
@@ -271,15 +275,15 @@ When backend adds new connector (e.g., `order`):
|
||||
- `applyForShifts()` - Handles shift application with error tracking
|
||||
|
||||
**Backend Queries Used**:
|
||||
- `backend/dataconnect/connector/shifts/queries/list_shift_roles_by_vendor.gql`
|
||||
- `backend/dataconnect/connector/shifts/mutations/apply_for_shifts.gql`
|
||||
- `legacy/dataconnect-v1/connector/shifts/queries/list_shift_roles_by_vendor.gql`
|
||||
- `legacy/dataconnect-v1/connector/shifts/mutations/apply_for_shifts.gql`
|
||||
|
||||
## Future Expansion
|
||||
|
||||
As the app grows, additional connectors will be added:
|
||||
- `order_connector_repository` (queries from `backend/dataconnect/connector/order/`)
|
||||
- `user_connector_repository` (queries from `backend/dataconnect/connector/user/`)
|
||||
- `emergency_contact_connector_repository` (queries from `backend/dataconnect/connector/emergencyContact/`)
|
||||
- `order_connector_repository` (queries from `legacy/dataconnect-v1/connector/order/`)
|
||||
- `user_connector_repository` (queries from `legacy/dataconnect-v1/connector/user/`)
|
||||
- `emergency_contact_connector_repository` (queries from `legacy/dataconnect-v1/connector/emergencyContact/`)
|
||||
- etc.
|
||||
|
||||
Each following the same Clean Architecture pattern implemented for Staff Connector.
|
||||
|
||||
Reference in New Issue
Block a user