Architecture: Deployment E2E: How should Quick Deploy connect to Cloudflar...

Documentation for Sessions

🏗️ Architecture: Deployment E2E: How should Quick Deploy connect to Cloudflar...

Date: 2026-02-26
Time: 12:55:04 UTC
Session: gspace1-142.19
Agent: angular
Confidence: 92%
Status: ✅ Documented


📋 Decision Context

Question:

Deployment E2E: How should Quick Deploy connect to Cloudflare and GitLab? What is the status flow?

Task: Not specified


🎯 Decision Made

Chosen:

Quick Deploy triggers cloud deploy asynchronously (local preview immediate, cloud background)

Options Considered:

  1. Quick Deploy remains local-only, cloud deploy is separate action
  2. Quick Deploy triggers cloud deploy synchronously (blocks until uploaded)
  3. Quick Deploy triggers cloud deploy asynchronously (local preview immediate, cloud background)

💭 Reasoning

ROOT CAUSE of original bug: PlatformDeploymentService.deployPlatform() only did router.resetConfig() + storage.put(). It never called DeploymentService or CloudflarePagesService. Result: local routes worked until page refresh, Launch Station showed DRAFT, no cloud URL existed. FIX: After router.resetConfig() succeeds, PlatformDeploymentService now (a) updates MongoDB status to 'deployed' via SpaceService.updateUniverse(), (b) calls DeploymentService.deployUniverse() which triggers Cloudflare Pages upload. The cloud deploy is fire-and-forget — the local preview works immediately while Cloudflare processes in background. DeploymentResult now includes cloudUrl field. DeploymentModalComponent shows the cloud preview URL when available. GITLAB PATH: New endpoint POST /api/:tenantId/deployment/:universeId/deploy-gitlab creates a GitLab repo, pushes .gitlab-ci.yml, and triggers the pipeline. This is a separate action in Launch Station ('Deploy via GitLab CI/CD' button). STATUS FLOW: Generate → Quick Deploy (local router + cloud background) → cloudUrl available → Launch Station shows real status. WHAT WOULD MAKE THIS WRONG: If Cloudflare upload consistently fails, the user sees 'deployed' status but no working cloud URL. The failure is logged but not surfaced in the UI beyond the missing URL. REMAINING GAP: No SSE subscription in the Quick Deploy flow for real-time cloud upload progress.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation