Architecture: How to ensure production-readiness of gograb-ai for Cloudfla...

Documentation for Sessions

🏗️ Architecture: How to ensure production-readiness of gograb-ai for Cloudfla...

Date: 2026-02-11
Time: 17:12:21 UTC
Session: gspace1-105.17
Agent: angular
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

How to ensure production-readiness of gograb-ai for Cloudflare deployment?

Task: Session 105.3: gograb-ai production-readiness audit and fixes


🎯 Decision Made

Chosen:

Six-part fix: (1) _redirects for SPA routing, (2) runtime workspace detection from port, (3) remove localhost fallbacks, (4) dynamic cross-app URLs, (5) mock data uses runtime workspace, (6) home embed URL dynamic

Options Considered:

  1. Ship as-is with hardcoded values
  2. Build-time env injection
  3. Six-part runtime + config fix

💭 Reasoning

CRITICAL: Without _redirects, direct navigation to /panel or /observatory on Cloudflare Pages returns 404. Hardcoded 'editor2' workspace in app.config.ts would break gspace1 and production. Localhost fallbacks (4 instances) were fail-open — in production, a missing env value would silently call localhost:3001 which doesn't exist, causing silent failures instead of visible errors. Port-based workspace detection (5xxx=editor2, 6xxx=gspace1, 4xxx=gmodules1) is robust because port ranges already encode workspace identity by convention. Cross-app URLs (adminAppUrl, devAppUrl) added to both environment files for proper deep linking between apps.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation