@tamyla/clodo-framework 3.1.21 → 3.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +53 -0
  3. package/dist/bin/clodo-service.js +47 -15
  4. package/dist/bin/commands/deploy.js +115 -83
  5. package/dist/bin/commands/helpers/deployment-ui.js +138 -0
  6. package/dist/bin/commands/helpers/deployment-verification.js +251 -0
  7. package/dist/bin/commands/helpers/error-recovery.js +80 -0
  8. package/dist/bin/commands/helpers/resource-detection.js +113 -0
  9. package/dist/bin/commands/validate.js +1 -1
  10. package/dist/bin/security/security-cli.js +1 -1
  11. package/dist/bin/shared/cache/configuration-cache.js +82 -0
  12. package/dist/bin/shared/cloudflare/domain-manager.js +1 -1
  13. package/dist/bin/shared/cloudflare/index.js +1 -1
  14. package/dist/bin/shared/cloudflare/ops.js +6 -4
  15. package/dist/bin/shared/config/ConfigurationManager.js +23 -1
  16. package/dist/bin/shared/config/command-config-manager.js +19 -3
  17. package/dist/bin/shared/config/index.js +1 -1
  18. package/dist/bin/shared/deployment/credential-collector.js +30 -7
  19. package/dist/bin/shared/deployment/index.js +2 -2
  20. package/dist/bin/shared/deployment/rollback-manager.js +4 -520
  21. package/dist/bin/shared/deployment/utilities/d1-error-recovery.js +177 -0
  22. package/dist/bin/shared/deployment/validator.js +40 -10
  23. package/dist/bin/shared/deployment/workflows/deployment-summary.js +214 -0
  24. package/dist/bin/shared/deployment/workflows/interactive-confirmation.js +188 -0
  25. package/dist/bin/shared/deployment/workflows/interactive-database-workflow.js +234 -0
  26. package/dist/bin/shared/deployment/workflows/interactive-domain-info-gatherer.js +240 -0
  27. package/dist/bin/shared/deployment/workflows/interactive-secret-workflow.js +228 -0
  28. package/dist/bin/shared/deployment/workflows/interactive-testing-workflow.js +235 -0
  29. package/dist/bin/shared/deployment/workflows/interactive-validation.js +218 -0
  30. package/dist/bin/shared/error-handling/error-classifier.js +46 -0
  31. package/dist/bin/shared/monitoring/health-checker.js +129 -1
  32. package/dist/bin/shared/monitoring/memory-manager.js +17 -6
  33. package/dist/bin/shared/routing/domain-router.js +1 -1
  34. package/dist/bin/shared/utils/deployment-validator.js +97 -0
  35. package/dist/bin/shared/utils/formatters.js +10 -0
  36. package/dist/bin/shared/utils/index.js +13 -1
  37. package/dist/bin/shared/utils/interactive-prompts.js +34 -18
  38. package/dist/bin/shared/utils/progress-manager.js +2 -2
  39. package/dist/bin/shared/utils/progress-spinner.js +53 -0
  40. package/dist/bin/shared/utils/sensitive-redactor.js +91 -0
  41. package/dist/bin/shared/validation/ValidationRegistry.js +1 -1
  42. package/dist/security/index.js +1 -1
  43. package/dist/security/patterns/insecure-patterns.js +1 -1
  44. package/dist/utils/constants.js +102 -0
  45. package/dist/utils/deployment/wrangler-config-manager.js +215 -48
  46. package/dist/utils/framework-config.js +2 -2
  47. package/dist/utils/interactive-prompts.js +10 -59
  48. package/package.json +16 -8
  49. package/dist/bin/clodo-service-old.js +0 -868
  50. package/dist/bin/clodo-service-test.js +0 -10
  51. package/dist/bin/commands/assess.js +0 -91
  52. package/dist/bin/commands/create.js +0 -77
  53. package/dist/bin/commands/diagnose.js +0 -83
  54. package/dist/bin/commands/helpers.js +0 -138
  55. package/dist/bin/commands/update.js +0 -75
  56. package/dist/bin/database/deployment-db-manager.js +0 -423
  57. package/dist/bin/database/enterprise-db-manager.js +0 -457
  58. package/dist/bin/database/wrangler-d1-manager.js +0 -685
  59. package/dist/bin/deployment/enterprise-deploy.js +0 -877
  60. package/dist/bin/deployment/master-deploy.js +0 -1376
  61. package/dist/bin/deployment/modular-enterprise-deploy.js +0 -466
  62. package/dist/bin/deployment/modules/DeploymentConfiguration.js +0 -395
  63. package/dist/bin/deployment/modules/DeploymentOrchestrator.js +0 -492
  64. package/dist/bin/deployment/modules/EnvironmentManager.js +0 -517
  65. package/dist/bin/deployment/modules/MonitoringIntegration.js +0 -560
  66. package/dist/bin/deployment/modules/ValidationManager.js +0 -342
  67. package/dist/bin/deployment/orchestration/BaseDeploymentOrchestrator.js +0 -426
  68. package/dist/bin/deployment/orchestration/EnterpriseOrchestrator.js +0 -401
  69. package/dist/bin/deployment/orchestration/PortfolioOrchestrator.js +0 -273
  70. package/dist/bin/deployment/orchestration/SingleServiceOrchestrator.js +0 -231
  71. package/dist/bin/deployment/orchestration/UnifiedDeploymentOrchestrator.js +0 -662
  72. package/dist/bin/deployment/test-interactive-utils.js +0 -66
  73. package/dist/bin/portfolio/portfolio-manager.js +0 -487
  74. package/dist/bin/service-management/create-service.js +0 -122
  75. package/dist/bin/service-management/init-service.js +0 -79
  76. package/dist/config/customers.js +0 -623
  77. package/dist/config/domains.js +0 -186
  78. package/dist/config/index.js +0 -6
  79. package/dist/database/database-orchestrator.js +0 -795
  80. package/dist/database/index.js +0 -4
  81. package/dist/deployment/index.js +0 -11
  82. package/dist/deployment/orchestration/BaseDeploymentOrchestrator.js +0 -426
  83. package/dist/deployment/orchestration/EnterpriseOrchestrator.js +0 -401
  84. package/dist/deployment/orchestration/PortfolioOrchestrator.js +0 -273
  85. package/dist/deployment/orchestration/SingleServiceOrchestrator.js +0 -231
  86. package/dist/deployment/orchestration/UnifiedDeploymentOrchestrator.js +0 -662
  87. package/dist/deployment/orchestration/index.js +0 -17
  88. package/dist/deployment/rollback-manager.js +0 -36
  89. package/dist/deployment/wrangler-deployer.js +0 -640
  90. package/dist/handlers/GenericRouteHandler.js +0 -532
  91. package/dist/migration/MigrationAdapters.js +0 -562
  92. package/dist/modules/ModuleManager.js +0 -668
  93. package/dist/modules/security.js +0 -96
  94. package/dist/orchestration/cross-domain-coordinator.js +0 -1083
  95. package/dist/orchestration/index.js +0 -5
  96. package/dist/orchestration/modules/DeploymentCoordinator.js +0 -368
  97. package/dist/orchestration/modules/DomainResolver.js +0 -198
  98. package/dist/orchestration/modules/StateManager.js +0 -332
  99. package/dist/orchestration/multi-domain-orchestrator.js +0 -724
  100. package/dist/routing/EnhancedRouter.js +0 -158
  101. package/dist/schema/SchemaManager.js +0 -778
  102. package/dist/service-management/ConfirmationEngine.js +0 -412
  103. package/dist/service-management/ErrorTracker.js +0 -299
  104. package/dist/service-management/GenerationEngine.js +0 -447
  105. package/dist/service-management/InputCollector.js +0 -619
  106. package/dist/service-management/ServiceCreator.js +0 -265
  107. package/dist/service-management/ServiceInitializer.js +0 -453
  108. package/dist/service-management/ServiceOrchestrator.js +0 -633
  109. package/dist/service-management/generators/BaseGenerator.js +0 -233
  110. package/dist/service-management/generators/GeneratorRegistry.js +0 -254
  111. package/dist/service-management/generators/cicd/CiWorkflowGenerator.js +0 -87
  112. package/dist/service-management/generators/cicd/DeployWorkflowGenerator.js +0 -106
  113. package/dist/service-management/generators/code/ServiceHandlersGenerator.js +0 -235
  114. package/dist/service-management/generators/code/ServiceMiddlewareGenerator.js +0 -116
  115. package/dist/service-management/generators/code/ServiceUtilsGenerator.js +0 -246
  116. package/dist/service-management/generators/code/WorkerIndexGenerator.js +0 -143
  117. package/dist/service-management/generators/config/DevelopmentEnvGenerator.js +0 -101
  118. package/dist/service-management/generators/config/DomainsConfigGenerator.js +0 -175
  119. package/dist/service-management/generators/config/EnvExampleGenerator.js +0 -178
  120. package/dist/service-management/generators/config/ProductionEnvGenerator.js +0 -97
  121. package/dist/service-management/generators/config/StagingEnvGenerator.js +0 -97
  122. package/dist/service-management/generators/config/WranglerTomlGenerator.js +0 -238
  123. package/dist/service-management/generators/core/PackageJsonGenerator.js +0 -243
  124. package/dist/service-management/generators/core/SiteConfigGenerator.js +0 -115
  125. package/dist/service-management/generators/documentation/ApiDocsGenerator.js +0 -331
  126. package/dist/service-management/generators/documentation/ConfigurationDocsGenerator.js +0 -294
  127. package/dist/service-management/generators/documentation/DeploymentDocsGenerator.js +0 -244
  128. package/dist/service-management/generators/documentation/ReadmeGenerator.js +0 -196
  129. package/dist/service-management/generators/schemas/ServiceSchemaGenerator.js +0 -190
  130. package/dist/service-management/generators/scripts/DeployScriptGenerator.js +0 -123
  131. package/dist/service-management/generators/scripts/HealthCheckScriptGenerator.js +0 -101
  132. package/dist/service-management/generators/scripts/SetupScriptGenerator.js +0 -88
  133. package/dist/service-management/generators/service-types/StaticSiteGenerator.js +0 -342
  134. package/dist/service-management/generators/testing/EslintConfigGenerator.js +0 -85
  135. package/dist/service-management/generators/testing/IntegrationTestsGenerator.js +0 -237
  136. package/dist/service-management/generators/testing/JestConfigGenerator.js +0 -72
  137. package/dist/service-management/generators/testing/UnitTestsGenerator.js +0 -277
  138. package/dist/service-management/generators/tooling/DockerComposeGenerator.js +0 -71
  139. package/dist/service-management/generators/tooling/GitignoreGenerator.js +0 -143
  140. package/dist/service-management/generators/utils/FileWriter.js +0 -179
  141. package/dist/service-management/generators/utils/PathResolver.js +0 -157
  142. package/dist/service-management/generators/utils/ServiceManifestGenerator.js +0 -111
  143. package/dist/service-management/generators/utils/TemplateEngine.js +0 -185
  144. package/dist/service-management/generators/utils/index.js +0 -18
  145. package/dist/service-management/handlers/ConfirmationHandler.js +0 -71
  146. package/dist/service-management/handlers/GenerationHandler.js +0 -80
  147. package/dist/service-management/handlers/InputHandler.js +0 -59
  148. package/dist/service-management/handlers/ValidationHandler.js +0 -203
  149. package/dist/service-management/index.js +0 -14
  150. package/dist/service-management/routing/DomainRouteMapper.js +0 -311
  151. package/dist/service-management/routing/RouteGenerator.js +0 -266
  152. package/dist/service-management/routing/WranglerRoutesBuilder.js +0 -273
  153. package/dist/service-management/routing/index.js +0 -14
  154. package/dist/service-management/services/DirectoryStructureService.js +0 -56
  155. package/dist/service-management/services/GenerationCoordinator.js +0 -208
  156. package/dist/service-management/services/GeneratorRegistry.js +0 -174
  157. package/dist/services/GenericDataService.js +0 -501
  158. package/dist/ui-structures/concepts/second-order-acquisition-strategy.md +0 -286
  159. package/dist/ui-structures/concepts/service-lifecycle-management.md +0 -150
  160. package/dist/ui-structures/concepts/service-manifest-guide.md +0 -309
  161. package/dist/ui-structures/concepts/three-tier-categorization-strategy.md +0 -231
  162. package/dist/ui-structures/creation/automated-generation-ui.json +0 -246
  163. package/dist/ui-structures/creation/core-inputs-ui.json +0 -217
  164. package/dist/ui-structures/creation/smart-confirmable-ui.json +0 -451
  165. package/dist/ui-structures/reference/absolutely-required-inputs.json +0 -315
  166. package/dist/ui-structures/reference/service-manifest-template.json +0 -342
  167. package/dist/version/VersionDetector.js +0 -723
  168. package/dist/worker/index.js +0 -4
  169. package/dist/worker/integration.js +0 -351
@@ -1,246 +0,0 @@
1
- {
2
- "template": {
3
- "name": "automated-generation-ui",
4
- "description": "Transparency template showing what will be automatically generated from core inputs",
5
- "version": "1.0.0",
6
- "category": "absolutely-generatable",
7
- "inputCount": 67,
8
- "estimatedTime": "30 seconds",
9
- "uiType": "transparency-display"
10
- },
11
- "collectionStrategy": {
12
- "phase": 3,
13
- "title": "Automatic Generation",
14
- "description": "The following configurations will be generated automatically from your inputs",
15
- "progressIndicator": "Step 3 of 3: Automatic Setup",
16
- "validationMode": "none",
17
- "allowBackNavigation": true,
18
- "allowSkip": false,
19
- "automationLevel": "full"
20
- },
21
- "generationOverview": {
22
- "totalGenerated": 67,
23
- "categories": {
24
- "fileDiscovery": 8,
25
- "apiResolution": 12,
26
- "conventionBased": 28,
27
- "contextInference": 19
28
- },
29
- "estimatedTime": "5-10 seconds",
30
- "reliability": "99.9%",
31
- "fallbackHandling": "Smart defaults with error recovery"
32
- },
33
- "generatedCategories": [
34
- {
35
- "id": "file-discovery",
36
- "title": "File System Discovery",
37
- "description": "Automatically locate and read configuration files",
38
- "count": 8,
39
- "transparencyLevel": "high",
40
- "generatedItems": [
41
- {
42
- "name": "package.json location",
43
- "logic": "Recursive search from project root",
44
- "fallback": "Create default package.json",
45
- "impact": "Dependency management, scripts, metadata"
46
- },
47
- {
48
- "name": "wrangler.toml location",
49
- "logic": "Find Cloudflare configuration file",
50
- "fallback": "Generate from templates",
51
- "impact": "Cloudflare Workers deployment"
52
- },
53
- {
54
- "name": "tsconfig.json location",
55
- "logic": "Locate TypeScript configuration",
56
- "fallback": "Use default TypeScript config",
57
- "impact": "TypeScript compilation settings"
58
- },
59
- {
60
- "name": "eslint.config.js location",
61
- "logic": "Find ESLint configuration",
62
- "fallback": "Apply standard CLODO rules",
63
- "impact": "Code quality and linting"
64
- }
65
- ]
66
- },
67
- {
68
- "id": "api-resolution",
69
- "title": "API-Based Resolution",
70
- "description": "Fetch information from external APIs",
71
- "count": 12,
72
- "transparencyLevel": "medium",
73
- "generatedItems": [
74
- {
75
- "name": "Cloudflare Account ID",
76
- "logic": "API call: GET /accounts using token",
77
- "fallback": "Environment variable lookup",
78
- "impact": "Infrastructure management"
79
- },
80
- {
81
- "name": "Cloudflare Zone ID",
82
- "logic": "API call: match domain to zone",
83
- "fallback": "Manual zone lookup",
84
- "impact": "DNS and domain management"
85
- },
86
- {
87
- "name": "D1 Database ID",
88
- "logic": "API call: find database by name pattern",
89
- "fallback": "Create new database",
90
- "impact": "Database connections"
91
- },
92
- {
93
- "name": "Git Repository Info",
94
- "logic": "Execute: git config --get remote.origin.url",
95
- "fallback": "Current directory name",
96
- "impact": "Version control integration"
97
- }
98
- ]
99
- },
100
- {
101
- "id": "convention-based",
102
- "title": "Convention-Based Generation",
103
- "description": "Apply naming and structural conventions",
104
- "count": 28,
105
- "transparencyLevel": "high",
106
- "generatedItems": [
107
- {
108
- "name": "Service Template Selection",
109
- "logic": "Map service-type to template directory",
110
- "fallback": "Generic template",
111
- "impact": "Code structure and patterns"
112
- },
113
- {
114
- "name": "Deployment Strategy",
115
- "logic": "service-type + environment rules",
116
- "fallback": "Standard deployment",
117
- "impact": "CI/CD pipeline configuration"
118
- },
119
- {
120
- "name": "Monitoring Configuration",
121
- "logic": "Apply service-type monitoring profiles",
122
- "fallback": "Basic health checks",
123
- "impact": "Observability and alerting"
124
- },
125
- {
126
- "name": "Security Policies",
127
- "logic": "Environment-based security templates",
128
- "fallback": "Default security settings",
129
- "impact": "Authentication and authorization"
130
- },
131
- {
132
- "name": "Resource Limits",
133
- "logic": "Service-type resource allocation",
134
- "fallback": "Standard limits",
135
- "impact": "Performance and cost optimization"
136
- },
137
- {
138
- "name": "Environment Variables",
139
- "logic": "Generate prefixed variable names",
140
- "fallback": "Standard environment vars",
141
- "impact": "Configuration management"
142
- }
143
- ]
144
- },
145
- {
146
- "id": "context-inference",
147
- "title": "Context-Aware Inference",
148
- "description": "Derive settings from environment and context",
149
- "count": 18,
150
- "transparencyLevel": "high",
151
- "generatedItems": [
152
- {
153
- "name": "Debug Mode",
154
- "logic": "environment === 'development'",
155
- "fallback": "false",
156
- "impact": "Development tooling and logging"
157
- },
158
- {
159
- "name": "Node Environment",
160
- "logic": "Direct mapping from environment",
161
- "fallback": "production",
162
- "impact": "Runtime behavior"
163
- },
164
- {
165
- "name": "Cache Settings",
166
- "logic": "Environment-based cache profiles",
167
- "fallback": "Conservative caching",
168
- "impact": "Performance optimization"
169
- },
170
- {
171
- "name": "Backup Configurations",
172
- "logic": "Service-type backup policies",
173
- "fallback": "Standard backup schedule",
174
- "impact": "Data protection"
175
- },
176
- {
177
- "name": "Health Check Endpoints",
178
- "logic": "Service-type health patterns",
179
- "fallback": "/health endpoint",
180
- "impact": "Monitoring and load balancing"
181
- },
182
- {
183
- "name": "Service Manifest",
184
- "logic": "Create comprehensive service-manifest.json with all inputs and configurations",
185
- "fallback": "Generate minimal manifest",
186
- "impact": "Complete audit trail, service consumption, and rectification support",
187
- "file": "{service-directory}/service-manifest.json"
188
- }
189
- ]
190
- }
191
- ],
192
- "transparencyDisplay": {
193
- "showGenerationProcess": true,
194
- "showFallbacks": true,
195
- "showImpact": true,
196
- "allowInspection": true,
197
- "estimatedCompletionTime": "5-10 seconds"
198
- },
199
- "errorHandling": {
200
- "generationErrors": {
201
- "continueOnFailure": true,
202
- "useFallbacks": true,
203
- "logIssues": true,
204
- "userNotification": "non-blocking"
205
- },
206
- "apiFailures": {
207
- "retryAttempts": 3,
208
- "fallbackToManual": false,
209
- "degradedMode": true
210
- }
211
- },
212
- "completion": {
213
- "message": "Service generation complete! 🚀",
214
- "summary": "Successfully generated {successfulCount} of {totalCount} configurations",
215
- "generatedFiles": "Auto-created directories, config files, infrastructure, and service manifest",
216
- "nextSteps": [
217
- "Review generated code in {service-directory}",
218
- "Check service-manifest.json for complete configuration details",
219
- "Test the service with: npm run dev",
220
- "Deploy with: npm run deploy"
221
- ],
222
- "support": {
223
- "documentation": "See generated README.md for details",
224
- "serviceManifest": "Complete audit trail in {service-directory}/service-manifest.json",
225
- "troubleshooting": "Check logs/ directory for any issues",
226
- "customization": "Modify generated files as needed"
227
- }
228
- },
229
- "inspectionTools": {
230
- "viewGeneratedFiles": {
231
- "label": "View Generated Files",
232
- "description": "Browse the auto-created files and directories",
233
- "action": "openFileExplorer"
234
- },
235
- "showGenerationLog": {
236
- "label": "Generation Log",
237
- "description": "See detailed log of what was generated and why",
238
- "action": "displayLog"
239
- },
240
- "validateConfiguration": {
241
- "label": "Validate Setup",
242
- "description": "Run automated checks on the generated configuration",
243
- "action": "runValidation"
244
- }
245
- }
246
- }
@@ -1,217 +0,0 @@
1
- {
2
- "template": {
3
- "name": "core-inputs-ui",
4
- "description": "UI template for collecting the 6 absolutely required CLODO Framework inputs",
5
- "version": "1.0.0",
6
- "category": "absolutely-required",
7
- "inputCount": 6,
8
- "estimatedTime": "2-3 minutes",
9
- "uiType": "interactive-prompts"
10
- },
11
- "collectionStrategy": {
12
- "phase": 1,
13
- "title": "Core Service Configuration",
14
- "description": "Please provide the fundamental information needed to create your CLODO Framework service",
15
- "progressIndicator": "Step 1 of 3: Core Information",
16
- "validationMode": "strict",
17
- "allowBackNavigation": false,
18
- "allowSkip": false
19
- },
20
- "inputs": [
21
- {
22
- "id": "service-name",
23
- "order": 1,
24
- "ui": {
25
- "type": "text-input",
26
- "label": "Service Name",
27
- "description": "What should we call this service? This will be the fundamental identifier used throughout the system.",
28
- "placeholder": "e.g., user-service, data-processor, api-gateway",
29
- "helpText": "Use lowercase letters, numbers, and hyphens only. This name will be used for directories, databases, and other resources.",
30
- "required": true,
31
- "autoFocus": true
32
- },
33
- "validation": {
34
- "pattern": "^[a-z][a-z0-9-]*$",
35
- "minLength": 3,
36
- "maxLength": 50,
37
- "customMessage": "Service name must start with a letter and contain only lowercase letters, numbers, and hyphens"
38
- },
39
- "examples": ["user-service", "data-processor", "api-gateway", "auth-manager"],
40
- "followUp": {
41
- "message": "Great! We'll use '{value}' as the foundation for all your service components.",
42
- "preview": "This will create: {value}-db, {value}-worker, User Service (display name), etc."
43
- }
44
- },
45
- {
46
- "id": "environment",
47
- "order": 2,
48
- "ui": {
49
- "type": "select",
50
- "label": "Environment",
51
- "description": "Which environment will this service be deployed to?",
52
- "helpText": "This affects logging levels, security policies, and resource allocation.",
53
- "required": true,
54
- "options": [
55
- {
56
- "value": "development",
57
- "label": "Development",
58
- "description": "Local development with debug logging and relaxed security"
59
- },
60
- {
61
- "value": "staging",
62
- "label": "Staging",
63
- "description": "Pre-production testing environment"
64
- },
65
- {
66
- "value": "production",
67
- "label": "Production",
68
- "description": "Live production environment with full security and monitoring"
69
- }
70
- ],
71
- "default": "development"
72
- },
73
- "followUp": {
74
- "message": "Selected {value} environment - this will configure appropriate security and performance settings.",
75
- "preview": "Environment settings: {value === 'production' ? 'High security, optimized performance' : value === 'staging' ? 'Medium security, balanced performance' : 'Debug mode, development tools enabled'}"
76
- }
77
- },
78
- {
79
- "id": "domain-name",
80
- "order": 3,
81
- "ui": {
82
- "type": "text-input",
83
- "label": "Domain Name",
84
- "description": "What is your primary domain name for this service?",
85
- "placeholder": "e.g., mycompany.com, api.example.org",
86
- "helpText": "This will be used to generate API URLs, worker endpoints, and other domain-based configurations.",
87
- "required": true
88
- },
89
- "validation": {
90
- "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-\\.]*\\.[a-zA-Z]{2,}$",
91
- "minLength": 4,
92
- "maxLength": 253,
93
- "customMessage": "Please enter a valid domain name (e.g., mycompany.com)"
94
- },
95
- "examples": ["mycompany.com", "api.example.org", "staging.internal"],
96
- "followUp": {
97
- "message": "Domain '{value}' configured - we'll generate URLs like api.{value}, staging-api.{value}, etc.",
98
- "preview": "Generated URLs: api.{value}, staging-api.{value}, dev-api.{value}"
99
- }
100
- },
101
- {
102
- "id": "service-type",
103
- "order": 4,
104
- "ui": {
105
- "type": "select",
106
- "label": "Service Type",
107
- "description": "What type of service are you building?",
108
- "helpText": "This determines the architecture templates, deployment strategy, and default configurations.",
109
- "required": false,
110
- "default": "generic",
111
- "options": [
112
- {
113
- "value": "generic",
114
- "label": "Generic Service",
115
- "description": "Basic service with standard configurations (recommended for most cases)"
116
- },
117
- {
118
- "value": "api",
119
- "label": "API Service",
120
- "description": "REST or GraphQL API with request/response handling"
121
- },
122
- {
123
- "value": "worker",
124
- "label": "Background Worker",
125
- "description": "Asynchronous processing, queues, or scheduled tasks"
126
- },
127
- {
128
- "value": "database",
129
- "label": "Database Service",
130
- "description": "Data storage and retrieval focused service"
131
- },
132
- {
133
- "value": "hybrid",
134
- "label": "Hybrid Service",
135
- "description": "Combines multiple service types (API + Worker + Database)"
136
- }
137
- ]
138
- },
139
- "followUp": {
140
- "message": "Selected {value} service type - this will apply appropriate templates and configurations.",
141
- "preview": "Templates: {value} architecture, {value} deployment strategy, {value} monitoring config"
142
- }
143
- },
144
- {
145
- "id": "customer-name",
146
- "order": 5,
147
- "ui": {
148
- "type": "text-input",
149
- "label": "Customer Name (Optional)",
150
- "description": "If this is a customer-specific service, enter the customer identifier",
151
- "placeholder": "e.g., acme-corp, tech-startup",
152
- "helpText": "Leave blank for general services. This enables customer-specific configurations and isolation.",
153
- "required": false
154
- },
155
- "validation": {
156
- "pattern": "^[a-zA-Z][a-zA-Z0-9-_]*$",
157
- "minLength": 2,
158
- "maxLength": 30,
159
- "customMessage": "Customer name must start with a letter and contain only letters, numbers, hyphens, and underscores"
160
- },
161
- "conditional": {
162
- "showWhen": "multiTenantDeployment",
163
- "message": "Multi-tenant deployment detected - customer name recommended"
164
- },
165
- "followUp": {
166
- "message": "{value ? 'Customer-specific service for ' + value + ' - will apply customer configurations.' : 'General service - no customer-specific configurations applied.'}",
167
- "preview": "{value ? 'Customer config: ./customers/' + value + '/config.json' : 'No customer isolation'}"
168
- }
169
- },
170
- {
171
- "id": "cloudflare-api-token",
172
- "order": 6,
173
- "ui": {
174
- "type": "password-input",
175
- "label": "Cloudflare API Token (Optional)",
176
- "description": "Enter your Cloudflare API token for infrastructure management",
177
- "placeholder": "Leave blank to use environment variables",
178
- "helpText": "Required for Cloudflare Workers and D1 database management. Can be set via CLOUDFLARE_API_TOKEN environment variable instead.",
179
- "required": false
180
- },
181
- "validation": {
182
- "pattern": "^[A-Za-z0-9_-]{40,}$",
183
- "minLength": 40,
184
- "customMessage": "Cloudflare API tokens are typically 40+ characters long"
185
- },
186
- "conditional": {
187
- "showWhen": "cloudflareIntegration",
188
- "message": "Cloudflare integration detected - API token required for deployment"
189
- },
190
- "followUp": {
191
- "message": "{value ? 'Cloudflare API token configured - will manage infrastructure automatically.' : 'No API token provided - will attempt to use environment variables.'}",
192
- "preview": "{value ? 'Cloudflare integration: Enabled' : 'Cloudflare integration: Environment variables only'}"
193
- }
194
- }
195
- ],
196
- "completion": {
197
- "message": "Core configuration complete! 🎉",
198
- "summary": "Collected {service-name} for {environment} environment on {domain-name}",
199
- "nextPhase": "smart-confirmable",
200
- "estimatedNextTime": "3-5 minutes"
201
- },
202
- "errorHandling": {
203
- "validationErrors": {
204
- "displayMode": "inline",
205
- "allowContinue": false
206
- },
207
- "networkErrors": {
208
- "retryAttempts": 3,
209
- "fallbackMessage": "Unable to validate input. Please check your connection and try again."
210
- }
211
- },
212
- "accessibility": {
213
- "screenReaderSupport": true,
214
- "keyboardNavigation": true,
215
- "highContrastMode": true
216
- }
217
- }