Architecture: How should generated modules integrate with the visual edito...

Documentation for Sessions

🏗️ Architecture: How should generated modules integrate with the visual edito...

Date: 2026-02-25
Time: 14:48:10 UTC
Session: gspace1-138.10
Agent: backend
Confidence: 92%
Status: ✅ Documented


📋 Decision Context

Question:

How should generated modules integrate with the visual editor (modular-universe)?

Task: Visual editor integration architecture


🎯 Decision Made

Chosen:

Use page-renderer moduleId with Page documents in space_pages

Options Considered:

  1. Generate custom renderer components
  2. Use page-renderer moduleId with Page documents
  3. Direct component registration

💭 Reasoning

The visual editor uses UniversalModule trees where page-module nodes reference moduleId:'page-renderer' and config.pageId linking to Page documents in space_pages. The pipeline generates: (1) UniversalModule tree with galaxy>world>page-modules hierarchy, (2) Page documents matching the Page interface from page-builder.types.ts (WidgetInstance with type/config/positions/timestamps, PageLayout with grid settings, metadata with isPublished/tags), (3) Each page-module node has pageId referencing the created Page document. The page-renderer module loads pages via PagesService and renders widgets. No custom renderers needed.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation