Architecture: Session 183 overall: What is the correct architecture for Vi...

Documentation for Sessions

🏗️ Architecture: Session 183 overall: What is the correct architecture for Vi...

Date: 2026-03-06
Time: 15:50:17 UTC
Session: gspace1-182.7
Agent: angular
Confidence: 92%
Status: ✅ Documented


📋 Decision Context

Question:

Session 183 overall: What is the correct architecture for Vitto Studio as a platform builder tool?

Task: Session 183: Vitto Studio architecture finalization


🎯 Decision Made

Chosen:

Studio is a universe-scoped tool in libs-structural, routed at /space/:spaceSlug/universe/:universeSlug/studio in app.routes.ts (not in vitto-hub). It reads ActivatedRoute params (same pattern as UnifiedBuilder), loads the space via GET /api/spaces/slug/:slug, hydrates VFS from space data, creates/resumes a dedicated chat session per universe via VittoSessionContext, opens the Vitto chat panel with platform-builder context via AIPanelCoreStateService.openWithContext(), and registers VittoPageContextProvider with Studio actions (generatePlatform, addEntity, addPage, deploy, generateDocs). No iframe preview. No fake chat panel. Vitto's existing chat sidebar IS the interface.

Options Considered:

  1. Studio as libs-ai library with own chat panel (rejected: duplicates chat infra)
  2. Studio with iframe preview of running app (rejected: app-inside-app recursion)
  3. Studio in vitto-hub routes (rejected: hub is agent config, not building tools)
  4. Studio as universe-scoped tool in libs-structural with dedicated session + existing chat (chosen)

💭 Reasoning

Multiple approaches were tried and rejected during this session: (1) Standalone VFS with static HTML preview - wrong because Studio operates on real GoGrab Spaces, not standalone files. (2) iframe embedding the running app - absurd recursion. (3) Fake StudioChatPanelComponent - duplicated existing chat infrastructure. (4) Route in vitto-hub - wrong location, hub is for Vitto agent configuration. (5) Library in libs-ai - wrong group, structural tools go in libs-structural. The correct architecture emerged by studying how UnifiedBuilder, VibeUniverse, and PageBuilder integrate: they're universe-scoped routes that read ActivatedRoute params, set AIPanelCoreState context, register VittoPageContextProvider, and let the existing chat panel do the AI interaction. Studio follows this same pattern.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation