Problem (P1 — blocks deploy of any UI-authored project)
Projects created in the UI exist only in browser storage; there is no backend Project row, so they cannot be deployed.
createProject() is localStorage-only (src/stores/projectStore.js, called from src/views/CatalogList.vue:108, CatalogEntryDetail.vue:182,196).
- There is no
POST /v1/projects call anywhere in src/.
- The backend deploy path requires a Project row:
DeploymentCreate.project_id is an FK (range42-backend-api app/schemas/v1/deployments.py:9).
checkout_project() builds the clone URL from the Project's source_id + repo_owner/repo_name (range42-backend-api app/core/project.py:57, app/core/models.py:62).
Result: deploying a UI-authored project fails — the project_id the UI would send does not resolve server-side.
Backend contract (already implemented)
POST /v1/projects (range42-backend-api app/routes/v1/projects/crud.py:24) creates a Project with: source_id, branch_strategy (shared_repo_subdir | dedicated_repo), repo_owner, repo_name, subdir, base_catalog_url, base_catalog_sha.
Work
- On git-binding (or first git-backed save), call
POST /v1/projects and persist the returned backend project id on the local project.
- Reconcile the local (UI) project id ↔ backend project id; send the backend id as
project_id in the deploy request.
- Handle the already-registered case (idempotent re-bind / patch via
PATCH /v1/projects/{id}).
Dependencies / relations
Problem (P1 — blocks deploy of any UI-authored project)
Projects created in the UI exist only in browser storage; there is no backend Project row, so they cannot be deployed.
createProject()is localStorage-only (src/stores/projectStore.js, called fromsrc/views/CatalogList.vue:108,CatalogEntryDetail.vue:182,196).POST /v1/projectscall anywhere insrc/.DeploymentCreate.project_idis an FK (range42-backend-api app/schemas/v1/deployments.py:9).checkout_project()builds the clone URL from the Project'ssource_id+repo_owner/repo_name(range42-backend-api app/core/project.py:57,app/core/models.py:62).Result: deploying a UI-authored project fails — the
project_idthe UI would send does not resolve server-side.Backend contract (already implemented)
POST /v1/projects(range42-backend-api app/routes/v1/projects/crud.py:24) creates a Project with:source_id,branch_strategy(shared_repo_subdir|dedicated_repo),repo_owner,repo_name,subdir,base_catalog_url,base_catalog_sha.Work
POST /v1/projectsand persist the returned backend project id on the local project.project_idin the deploy request.PATCH /v1/projects/{id}).Dependencies / relations
source_id+ repo coords).target_host_id,secrets) is tracked separately in U1: DeployForm v1 deploy/preflight request does not match backend contract (target_host_id, vault, preflight) #91 — confirmed againstDeploymentCreate; not duplicated here.