Architecture: How to make generated platforms truly standalone and deploya...
Documentation for Sessions
🏗️ Architecture: How to make generated platforms truly standalone and deploya...
Date: 2026-01-17
Time: 16:56:43 UTC
Session: editor2-50.7
Agent: angular
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
How to make generated platforms truly standalone and deployable without monorepo dependencies?
Task: Session 50.9: Make deployment process rock solid for standalone platform generation
🎯 Decision Made
Chosen:
Made platform code generator fully standalone: 1) Complete angular.json for Angular CLI (not NX), 2) Full package.json with all Angular 19 dependencies, 3) Standalone tsconfig without extending monorepo base, 4) Inline Logger class instead of @libs-core/log-system, 5) PlatformContext token instead of @libs-foundational/core-angular, 6) Force useRenderableTemplates=false to avoid @libs-renderable imports, 7) Added _redirects for Cloudflare SPA routing, 8) Changed CI from npm ci to npm install
Options Considered:
- Keep @libs-* imports and bundle them (complex, tight coupling)
- Make all generated code fully standalone (chosen)
- Generate a separate npm package for shared code (over-engineering)
💭 Reasoning
Generated platforms are pushed to GitLab and deployed to Cloudflare Pages independently of the editor2 monorepo. They cannot import from @libs-* because those packages don't exist in the standalone repo. All platform services must be self-contained or use standard Angular patterns.
📁 Files Involved
apis/backend-ai-api/src/app/workflow/generators/platform-code-generator.service.tsapis/backend-api/src/app/platform-code/platform-code.service.ts
🔗 Related
- Decision ID:
dev_1768668999821_4xagert - Session: 50
- Workspace: editor2
Auto-generated by MCP Smart Consolidation