Architecture: How should AI functionality be separated from gograb-space t...
Documentation for Sessions
🏗️ Architecture: How should AI functionality be separated from gograb-space t...
Date: 2026-01-28
Time: 17:08:00 UTC
Session: editor2-73.2
Agent: angular
Confidence: 85%
Status: ✅ Documented
📋 Decision Context
Question:
How should AI functionality be separated from gograb-space to reduce bundle size while maintaining drag-drop capabilities?
Task: Session 73.1: AI App Separation Strategy - Comprehensive analysis and planning for extracting AI functionality from gograb-space into separate NX apps
🎯 Decision Made
Chosen:
Two-app architecture: app-gograb-ai (user-facing AI assistant with embeddable iframe+postMessage) + app-mcp-dashboard (admin AI dashboard). Use iframe embedding with BroadcastChannel for cross-app communication and custom drag-drop bridge protocol.
Options Considered:
- One app (app-gograb-ai) for all AI functionality
- Two apps (app-gograb-ai + app-mcp-dashboard)
- Module Federation approach
- Angular Elements (Web Components)
- Keep AI in gograb-space with better lazy loading
💭 Reasoning
- Two apps provide maximum bundle reduction (20%+) vs one app (15%); 2) Clear separation of user-facing vs admin concerns improves security and deployment independence; 3) Iframe+postMessage is proven pattern (existing CrossToolSyncService uses BroadcastChannel); 4) Enables long-term vision of Chrome extension and external embedding; 5) Existing embeddable-component.model.ts already has iframe support with security isolation levels.
📁 Files Involved
apps/gograb-space/src/app/app.routes.tsapps/gograb-space/src/app/components/layout/main-layout/main-layout.component.tslibs/libs-ai/ai-panel-core/src/lib/services/ai-panel-state.service.tslibs/libs-foundational/core-angular/src/lib/services/cross-tool-sync.service.tslibs/libs-ai/gograb-ai/src/lib/ai.routes.ts
🔗 Related
- Decision ID:
dev_1769620076597_azf1fl5 - Session: 73
- Workspace: editor2
Auto-generated by MCP Smart Consolidation