Architecture: How should PageCodeGeneratorService generate code from the v...
Documentation for Sessions
🏗️ Architecture: How should PageCodeGeneratorService generate code from the v...
Date: 2026-02-05
Time: 22:28:52 UTC
Session: editor2-94.2
Agent: angular
Confidence: 88%
Status: ✅ Documented
📋 Decision Context
Question:
How should PageCodeGeneratorService generate code from the visual page builder?
Task: SEAM 2: Page Builder to Code Generation
🎯 Decision Made
Chosen:
Two-output service: Output A (Angular standalone component with template+SCSS+TS) and Output B (Deployment HTML with data-attributes for GoGrabRuntime hydration)
Options Considered:
- No alternatives documented
💭 Reasoning
The service needs to serve two purposes: (1) developers who want Angular code from the visual editor, and (2) the deployment pipeline that needs static HTML. Both walk the same widget tree but produce different formats. Using data-widget-type and data-config attributes in Output B allows GoGrabRuntime to hydrate widgets at runtime without Angular dependency.
📁 Files Involved
libs/libs-structural/page-builder/src/lib/services/page-code-generator.service.tslibs/libs-structural/page-builder/src/lib/services/index.ts
🔗 Related
- Decision ID:
dev_1770330532366_k31yytf - Session: 94
- Workspace: editor2
Auto-generated by MCP Smart Consolidation