Production Ready Improvements - Unified Schema v3
Comprehensive plan to unify module schemas across canvas, backend, and AI generation
🚀 Production Ready Improvements
Unified Module Schema v3
Date: November 30, 2025
Status: 🎯 COMPREHENSIVE PLAN
Purpose: Create a perfectly synchronized, AI-friendly, and performant module schema
📊 Current State Analysis
What We Have
| Component | Status | Location |
|---|---|---|
| Canvas Types | ✅ Working | universe-canvas/models/canvas.types.ts |
| UniversalModule | ✅ Working | core-models/types/modules/universal-module.types.ts |
| Backend API | ✅ Working | backend-api/modules/universal-modules.controller.ts |
| Module Registry | ✅ Working | module-base/services/ |
| Layout Templates | ✅ Working | canvas-builder-template.service.ts |
| Structural Modules | ✅ Built | modules/structural/* |
Current Schema Issues
❌ Canvas uses: { label, type: "container", flex: {...} }
❌ MongoDB uses: { name, slug, type: "page", config: {...}, layout: {...} }
❌ Redundant layout data in multiple places
❌ Missing hierarchy context (Galaxy → World → Page)
❌ No AI awareness priority system
❌ Empty children (no actual content)
🌌 Space Language Hierarchy
We retain the cosmic branding that makes space-building fun:
┌─────────────────────────────────────────────────────────────┐
│ UNIVERSE │
│ (The Project/Platform - deployed subdomain) │
│ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ GALAXY ││
│ │ (Route Group - e.g., /admin, /shop, /docs) ││
│ │ ││
│ │ ┌─────────────────────────────────────────────────────┐││
│ │ │ WORLD │││
│ │ │ (Page Container - holds layout + modules) │││
│ │ │ │││
│ │ │ ┌──────────────────────────────────────────────┐ │││
│ │ │ │ PAGE-MODULE │ │││
│ │ │ │ (Visual page with widgets - /menu, /about) │ │││
│ │ │ │ │ │││
│ │ │ │ ┌────────────┬────────────┬─────────────┐ │ │││
│ │ │ │ │ LAYOUT │ WIDGETS │ MODULES │ │ │││
│ │ │ │ │ MODULES │ (content) │ (nav,etc) │ │ │││
│ │ │ │ └────────────┴────────────┴─────────────┘ │ │││
│ │ │ └──────────────────────────────────────────────┘ │││
│ │ └─────────────────────────────────────────────────────┘││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘
📁 Documentation Structure
- index.md - This overview (START HERE)
- progress.md - Implementation progress tracking
- nov-30-prod-ready.plan.md - Detailed implementation plan
🎯 Key Objectives
1. Single Source of Truth
One schema used by Canvas, MongoDB, Backend API, and AI generation.
2. Preserve Space Language
Keep Galaxy, World, Universe terminology for fun space-building experience.
3. Smart Layout Module Reuse
Layout modules (split-sidebar, two-column) usable at any level, not just root.
4. AI Awareness Priority System
AI looks for resources in this order:
- User's space-specific modules
- User's space-specific widgets
- User's space theme system
- Global GoGrab modules
- Global GoGrab widgets
- Singularity basic flows
- Singularity custom flows
5. Backend Sync Perfection
Canvas → MongoDB → Backend API → Canvas cycle works flawlessly.
📚 Related Documentation
- UNIFIED_MODULE_SCHEMA.md - Previous schema proposal (v2)
- defining-modularity.md - Module philosophy
- GoGrab-modules - Foundation team patterns
- Backend API Reference - API endpoints
🔄 Quick Links
| Action | Document |
|---|---|
| Understand the Plan | nov-30-prod-ready.plan.md |
| Track Progress | progress.md |
| Review Schema | UNIFIED_MODULE_SCHEMA_V3.md |
Last Updated: November 30, 2025 - 7:30 PM
Status: 🎯 Planning Complete, Implementation Starting
Maintainer: Architecture Team