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:
- Ship as-is with hardcoded values
- Build-time env injection
- 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
apps/gograb-ai/src/cloudflare/_redirectsapps/gograb-ai/project.jsonapps/gograb-ai/src/app/app.config.tsapps/gograb-ai/src/app/core/services/mcp-status.service.tsapps/gograb-ai/src/app/core/services/bridge-mcp-connector.service.tsapps/gograb-ai/src/environments/environment.tsapps/gograb-ai/src/environments/environment.prod.ts
🔗 Related
- Decision ID:
dev_1770829941756_6ytes4y - Session: 105
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation