Architecture: Should Platform Elements be a preview-only tool, or a full p...
Documentation for Sessions
🏗️ Architecture: Should Platform Elements be a preview-only tool, or a full p...
Date: 2026-03-25
Time: 04:13:40 UTC
Session: gspace1-268.7
Agent: angular
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
Should Platform Elements be a preview-only tool, or a full production framework for deployed platforms?
Task: S268: Strategic decision — Platform Elements as production framework
🎯 Decision Made
Chosen:
Full production framework. Platform Elements IS the deployed application — not a preview inside Studio. The framework must handle: authentication (login, token refresh, session management), route guards (role-based access control), error boundaries (global recovery), navigation (history API, deep linking), and all CRUD lifecycle. Angular export remains as an escape hatch for platforms that outgrow Platform Elements. The framework must be groundbreaking: AI-agent-ready (self-describing elements via manifests), zero-compilation (HTML is the artifact), production-secure (auth, guards), and well-documented for both human developers and AI agents.
Options Considered:
- Platform Elements for preview only, Angular for production (rejected — two renderers, visual mismatch)
- Platform Elements for simple platforms, Angular for complex (rejected — unclear boundary, two deployment paths)
- Full production framework with Angular escape hatch (chosen)
💭 Reasoning
Critical correction from user: generated platforms deploy as standalone apps at subdomains like restaurant.gograb.space. They are NOT modules inside gograb-space — they ARE the entire frontend. There is no parent app providing auth context, route guards, or error handling. This means Platform Elements must be a self-sufficient application framework, not just a component library. The user explicitly stated they are not opposed to building a framework as long as it produces robust, secure outcomes. The tradeoff: ~400-600 lines of application infrastructure (auth, guards, error handling) buys us: (1) one artifact from generation to deploy (HTML + runtime.js), (2) zero compilation anywhere, (3) instant preview = production, (4) AI generates simple HTML instead of complex Angular TypeScript. The escape hatch (Angular export) covers the 20% of platforms that need SSR, complex forms, or custom business logic.
📁 Files Involved
libs/libs-structural/platform-elements/APIs/backend-vitto-api/src/prompts/module-gen/implement-platform-elements.prompt.md
🔗 Related
- Decision ID:
dev_1774412020594_fr6m88y - Session: 268
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation