Skip to content

feat(projects): register UI projects with the backend (POST /v1/projects) so they are deployable #95

Description

@pparage

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or requesttrack_axis-02Operational end-user interfaces

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions