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:

  1. AI modules are not registered in ModuleRegistryService
  2. The PageModuleRenderer is missing dynamic component loader
  3. RuntimePreview doesn't have access to generated module manifests
  4. 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


🔗 Related


Auto-generated by MCP Smart Consolidation