chore(legacy): relocate v1 dataconnect source
This commit is contained in:
2
Makefile
2
Makefile
@@ -60,7 +60,7 @@ help:
|
|||||||
@echo " make test-e2e-client Run Client Maestro E2E only"
|
@echo " make test-e2e-client Run Client Maestro E2E only"
|
||||||
@echo " make test-e2e-staff Run Staff Maestro E2E only"
|
@echo " make test-e2e-staff Run Staff Maestro E2E only"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " 🗄️ DATA CONNECT & BACKEND (backend/dataconnect)"
|
@echo " 🗄️ DATA CONNECT & LEGACY V1 BACKEND (legacy/dataconnect-v1)"
|
||||||
@echo " ────────────────────────────────────────────────────────────────────"
|
@echo " ────────────────────────────────────────────────────────────────────"
|
||||||
@echo " make dataconnect-init Initialize Firebase Data Connect"
|
@echo " make dataconnect-init Initialize Firebase Data Connect"
|
||||||
@echo " make dataconnect-deploy [ENV=dev] Deploy Data Connect schemas (dev/staging)"
|
@echo " make dataconnect-deploy [ENV=dev] Deploy Data Connect schemas (dev/staging)"
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ To ensure a consistent experience across all compliance uploads (documents, cert
|
|||||||
|
|
||||||
#### Data Connect Integration
|
#### Data Connect Integration
|
||||||
- `StaffConnectorRepository` interface updated with `getStaffDocuments()` and `upsertStaffDocument()`.
|
- `StaffConnectorRepository` interface updated with `getStaffDocuments()` and `upsertStaffDocument()`.
|
||||||
- `upsertStaffDocument` mutation in `backend/dataconnect/connector/staffDocument/mutations.gql` updated to accept `verificationId`.
|
- `upsertStaffDocument` mutation in `legacy/dataconnect-v1/connector/staffDocument/mutations.gql` updated to accept `verificationId`.
|
||||||
- `getStaffDocumentByKey` and `listStaffDocumentsByStaffId` queries updated to include `verificationId`.
|
- `getStaffDocumentByKey` and `listStaffDocumentsByStaffId` queries updated to include `verificationId`.
|
||||||
- SDK regenerated: `make dataconnect-generate-sdk ENV=dev`.
|
- SDK regenerated: `make dataconnect-generate-sdk ENV=dev`.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
> **Status: LEGACY / ARCHIVED REFERENCE**
|
> **Status: LEGACY / ARCHIVED REFERENCE**
|
||||||
> This document is based on a historical export from the Base44 platform.
|
> 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.
|
> 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 Version:** 3.0
|
||||||
**Original Date:** 2025-11-20
|
**Original Date:** 2025-11-20
|
||||||
|
|||||||
@@ -926,7 +926,7 @@ Via modular `profile_sections/` architecture:
|
|||||||
| Legacy Client Mobile | `_legacy/apps/krow_client_context.md` | Flutter (context doc) |
|
| 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 Worker (Legacy Staff) Mobile | `_legacy/apps/krow_staff_context.md` | Flutter (context doc) |
|
||||||
| Legacy Backend | `_legacy/apps/php_backend_context.md` | PHP/Laravel |
|
| 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**
|
2. **Write Schema Incrementally**
|
||||||
```gql
|
```gql
|
||||||
# backend/dataconnect/schema/event.gql
|
# legacy/dataconnect-v1/schema/event.gql
|
||||||
type Event @table {
|
type Event @table {
|
||||||
id: UUID! @default(expr: "uuidV4()")
|
id: UUID! @default(expr: "uuidV4()")
|
||||||
name: String!
|
name: String!
|
||||||
@@ -989,7 +989,7 @@ For each feature in Sprint 3:
|
|||||||
|
|
||||||
3. **Define Queries/Mutations**
|
3. **Define Queries/Mutations**
|
||||||
```gql
|
```gql
|
||||||
# backend/dataconnect/queries/events.gql
|
# legacy/dataconnect-v1/queries/events.gql
|
||||||
query ListEvents($status: EventStatus) @auth(level: USER) {
|
query ListEvents($status: EventStatus) @auth(level: USER) {
|
||||||
events(where: { status: { eq: $status } }) {
|
events(where: { status: { eq: $status } }) {
|
||||||
id, name, status, date
|
id, name, status, date
|
||||||
@@ -1308,7 +1308,7 @@ Business (1) ──┬── (1) BusinessSetting
|
|||||||
| Legacy Client context | `_legacy/apps/krow_client_context.md` |
|
| Legacy Client context | `_legacy/apps/krow_client_context.md` |
|
||||||
| Legacy Staff context | `_legacy/apps/krow_staff_context.md` |
|
| Legacy Staff context | `_legacy/apps/krow_staff_context.md` |
|
||||||
| Architecture diagrams | `internal/launchpad/assets/diagrams/` |
|
| 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
|
# 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
|
## 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.
|
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/
|
├── staff/
|
||||||
├── order/
|
├── order/
|
||||||
├── user/
|
├── user/
|
||||||
@@ -260,7 +264,7 @@ When backend adds new connector (e.g., `order`):
|
|||||||
- `staff_main` - Guards bottom nav items requiring profile completion
|
- `staff_main` - Guards bottom nav items requiring profile completion
|
||||||
|
|
||||||
**Backend Queries Used**:
|
**Backend Queries Used**:
|
||||||
- `backend/dataconnect/connector/staff/queries/profile_completion.gql`
|
- `legacy/dataconnect-v1/connector/staff/queries/profile_completion.gql`
|
||||||
|
|
||||||
### Shifts Connector
|
### Shifts Connector
|
||||||
|
|
||||||
@@ -271,15 +275,15 @@ When backend adds new connector (e.g., `order`):
|
|||||||
- `applyForShifts()` - Handles shift application with error tracking
|
- `applyForShifts()` - Handles shift application with error tracking
|
||||||
|
|
||||||
**Backend Queries Used**:
|
**Backend Queries Used**:
|
||||||
- `backend/dataconnect/connector/shifts/queries/list_shift_roles_by_vendor.gql`
|
- `legacy/dataconnect-v1/connector/shifts/queries/list_shift_roles_by_vendor.gql`
|
||||||
- `backend/dataconnect/connector/shifts/mutations/apply_for_shifts.gql`
|
- `legacy/dataconnect-v1/connector/shifts/mutations/apply_for_shifts.gql`
|
||||||
|
|
||||||
## Future Expansion
|
## Future Expansion
|
||||||
|
|
||||||
As the app grows, additional connectors will be added:
|
As the app grows, additional connectors will be added:
|
||||||
- `order_connector_repository` (queries from `backend/dataconnect/connector/order/`)
|
- `order_connector_repository` (queries from `legacy/dataconnect-v1/connector/order/`)
|
||||||
- `user_connector_repository` (queries from `backend/dataconnect/connector/user/`)
|
- `user_connector_repository` (queries from `legacy/dataconnect-v1/connector/user/`)
|
||||||
- `emergency_contact_connector_repository` (queries from `backend/dataconnect/connector/emergencyContact/`)
|
- `emergency_contact_connector_repository` (queries from `legacy/dataconnect-v1/connector/emergencyContact/`)
|
||||||
- etc.
|
- etc.
|
||||||
|
|
||||||
Each following the same Clean Architecture pattern implemented for Staff Connector.
|
Each following the same Clean Architecture pattern implemented for Staff Connector.
|
||||||
|
|||||||
@@ -79,10 +79,10 @@
|
|||||||
],
|
],
|
||||||
"emulators": {
|
"emulators": {
|
||||||
"dataconnect": {
|
"dataconnect": {
|
||||||
"dataDir": "backend/dataconnect/.dataconnect/pgliteData"
|
"dataDir": "legacy/dataconnect-v1/.dataconnect/pgliteData"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dataconnect": {
|
"dataconnect": {
|
||||||
"source": "backend/dataconnect"
|
"source": "legacy/dataconnect-v1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
23
legacy/dataconnect-v1/README.md
Normal file
23
legacy/dataconnect-v1/README.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Legacy Data Connect V1
|
||||||
|
|
||||||
|
This directory contains the archived V1 Firebase Data Connect source:
|
||||||
|
|
||||||
|
- GraphQL schemas
|
||||||
|
- connector queries and mutations
|
||||||
|
- seed and clean scripts
|
||||||
|
- Data Connect service YAML files
|
||||||
|
|
||||||
|
Status:
|
||||||
|
|
||||||
|
- Treat this directory as legacy infrastructure.
|
||||||
|
- Do not use it as the source of truth for new backend work.
|
||||||
|
- The active backend architecture is V2 and lives under:
|
||||||
|
- `backend/command-api`
|
||||||
|
- `backend/query-api`
|
||||||
|
- `backend/core-api`
|
||||||
|
- `backend/unified-api`
|
||||||
|
|
||||||
|
Why this was moved:
|
||||||
|
|
||||||
|
- The old V1 GraphQL source was being picked up by AI tooling and confusing current V2 implementation work.
|
||||||
|
- Relocating it under `legacy/` keeps the V1 toolchain available without presenting it as the active backend.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user