Architecture: What is causing the "Module not registered" error in the dep...
Documentation for Sessions
🏗️ Architecture: What is causing the "Module not registered" error in the dep...
📋 Decision Context
Question:
What is causing the "Module not registered" error in the deployed platform preview?
Task: Session 24.3 - Complete Platform Building with real deployment and module rendering
🎯 Decision Made
Chosen:
AI-generated modules are stored in DB but never registered with ModuleRegistryService/ComponentRegistryService. The RuntimePreviewComponent's renderModulesInZones() method tries to find embeddable components from registry, but AI modules are data-only (config/metadata) without actual Angular components registered.
Options Considered:
- AI modules are not registered in ModuleRegistryService
- The PageModuleRenderer is missing dynamic component loader
- RuntimePreview doesn't have access to generated module manifests
- The deployment service doesn't create proper routes with renderers
💭 Reasoning
The analysis reveals the core gap: Vibe Generator creates AI-generated module metadata (entities, actions, descriptions) stored in MongoDB, but these are DATA-ONLY modules. The RuntimePreviewComponent tries to render modules by looking up embeddable components from ModuleRegistryService, but AI modules don't have registered Angular components - they only have configuration. The system needs a UniversalModuleRenderer that can take module metadata and dynamically render appropriate UI based on the module type (feature, navigation, widget) using a generic component that reads the module config.
📁 Files Involved
libs/libs-space/universe-canvas/src/lib/components/runtime-preview/runtime-preview.component.tslibs/libs-structural/vibe-universe/src/lib/components/vibe-universe-generator/vibe-universe-generator.component.tslibs/libs-core/module-base/src/lib/services/module-registry.service.ts
🔗 Related
- Decision ID:
dev_1767668738921_mfot9do - Session: 22
- Workspace: editor2
Auto-generated by MCP Smart Consolidation