@tamyla/clodo-framework 3.1.21 → 3.1.23

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 (150) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +283 -1
  3. package/dist/{bin → cli}/clodo-service.js +47 -15
  4. package/dist/cli/commands/assess.js +183 -0
  5. package/dist/{bin → cli}/commands/create.js +5 -5
  6. package/dist/{bin → cli}/commands/deploy.js +122 -90
  7. package/dist/{bin → cli}/commands/diagnose.js +5 -5
  8. package/dist/cli/commands/helpers/deployment-ui.js +138 -0
  9. package/dist/cli/commands/helpers/deployment-verification.js +250 -0
  10. package/dist/cli/commands/helpers/error-recovery.js +80 -0
  11. package/dist/cli/commands/helpers/resource-detection.js +113 -0
  12. package/dist/{bin → cli}/commands/helpers.js +0 -28
  13. package/dist/cli/commands/init-config.js +57 -0
  14. package/dist/{bin → cli}/commands/update.js +5 -5
  15. package/dist/{bin → cli}/commands/validate.js +5 -5
  16. package/dist/cli/security-cli.js +118 -0
  17. package/dist/config/FeatureManager.js +6 -0
  18. package/dist/config/clodo-create.example.json +26 -0
  19. package/dist/config/clodo-deploy.example.json +41 -0
  20. package/dist/config/clodo-update.example.json +46 -0
  21. package/dist/config/clodo-validate.example.json +41 -0
  22. package/dist/config/customers/template/development.env.template +37 -0
  23. package/dist/config/customers/template/production.env.template +39 -0
  24. package/dist/config/customers/template/staging.env.template +37 -0
  25. package/dist/config/customers.js +28 -26
  26. package/dist/config/domain-examples/README.md +464 -0
  27. package/dist/config/domain-examples/environment-mapped.json +168 -0
  28. package/dist/config/domain-examples/multi-domain.json +144 -0
  29. package/dist/config/domain-examples/single-domain.json +50 -0
  30. package/dist/config/examples +12 -0
  31. package/dist/config/features.js +61 -0
  32. package/dist/config/staging-deployment.json +60 -0
  33. package/dist/config/validation-config.json +347 -0
  34. package/dist/deployment/wrangler-deployer.js +1 -1
  35. package/dist/{bin → lib}/deployment/modules/DeploymentOrchestrator.js +2 -2
  36. package/dist/{bin → lib}/deployment/modules/EnvironmentManager.js +2 -2
  37. package/dist/lib/deployment/orchestration/EnterpriseOrchestrator.js +21 -0
  38. package/dist/lib/shared/cache/configuration-cache.js +82 -0
  39. package/dist/{bin → lib}/shared/cloudflare/domain-discovery.js +1 -1
  40. package/dist/{bin → lib}/shared/cloudflare/domain-manager.js +1 -1
  41. package/dist/{bin → lib}/shared/cloudflare/index.js +1 -1
  42. package/dist/{bin → lib}/shared/cloudflare/ops.js +10 -8
  43. package/dist/{bin → lib}/shared/config/ConfigurationManager.js +23 -1
  44. package/dist/{bin → lib}/shared/config/command-config-manager.js +19 -3
  45. package/dist/{bin → lib}/shared/config/index.js +1 -1
  46. package/dist/{bin → lib}/shared/deployment/credential-collector.js +30 -7
  47. package/dist/lib/shared/deployment/index.js +10 -0
  48. package/dist/lib/shared/deployment/rollback-manager.js +7 -0
  49. package/dist/lib/shared/deployment/utilities/d1-error-recovery.js +177 -0
  50. package/dist/{bin → lib}/shared/deployment/validator.js +40 -10
  51. package/dist/lib/shared/deployment/workflows/deployment-summary.js +214 -0
  52. package/dist/lib/shared/deployment/workflows/interactive-confirmation.js +188 -0
  53. package/dist/lib/shared/deployment/workflows/interactive-database-workflow.js +234 -0
  54. package/dist/lib/shared/deployment/workflows/interactive-domain-info-gatherer.js +240 -0
  55. package/dist/lib/shared/deployment/workflows/interactive-secret-workflow.js +228 -0
  56. package/dist/lib/shared/deployment/workflows/interactive-testing-workflow.js +235 -0
  57. package/dist/lib/shared/deployment/workflows/interactive-validation.js +218 -0
  58. package/dist/lib/shared/error-handling/error-classifier.js +46 -0
  59. package/dist/{bin → lib}/shared/monitoring/health-checker.js +129 -1
  60. package/dist/{bin → lib}/shared/monitoring/memory-manager.js +17 -6
  61. package/dist/{bin → lib}/shared/routing/domain-router.js +1 -1
  62. package/dist/lib/shared/utils/deployment-validator.js +97 -0
  63. package/dist/{bin → lib}/shared/utils/formatters.js +10 -0
  64. package/dist/{bin → lib}/shared/utils/index.js +13 -1
  65. package/dist/{bin → lib}/shared/utils/interactive-prompts.js +34 -18
  66. package/dist/{bin → lib}/shared/utils/progress-manager.js +2 -2
  67. package/dist/lib/shared/utils/progress-spinner.js +53 -0
  68. package/dist/lib/shared/utils/sensitive-redactor.js +91 -0
  69. package/dist/{bin → lib}/shared/validation/ValidationRegistry.js +1 -1
  70. package/dist/migration/MigrationAdapters.js +50 -4
  71. package/dist/orchestration/cross-domain-coordinator.js +5 -5
  72. package/dist/orchestration/multi-domain-orchestrator.js +63 -22
  73. package/dist/security/index.js +2 -2
  74. package/dist/security/patterns/insecure-patterns.js +1 -1
  75. package/dist/service-management/ConfirmationEngine.js +1 -1
  76. package/dist/service-management/ErrorTracker.js +1 -1
  77. package/dist/service-management/InputCollector.js +1 -1
  78. package/dist/service-management/ServiceCreator.js +11 -255
  79. package/dist/service-management/ServiceOrchestrator.js +0 -2
  80. package/dist/service-management/generators/testing/UnitTestsGenerator.js +4 -4
  81. package/dist/service-management/index.js +1 -1
  82. package/dist/utils/cloudflare/ops.js +1 -1
  83. package/dist/utils/constants.js +102 -0
  84. package/dist/utils/deployment/wrangler-config-manager.js +215 -48
  85. package/dist/utils/file-manager.js +1 -1
  86. package/dist/utils/formatters.js +1 -1
  87. package/dist/utils/framework-config.js +2 -2
  88. package/dist/utils/interactive-prompts.js +10 -59
  89. package/dist/utils/logger.js +1 -1
  90. package/dist/version/VersionDetector.js +99 -9
  91. package/dist/worker/integration.js +1 -1
  92. package/package.json +10 -10
  93. package/dist/bin/clodo-service-old.js +0 -868
  94. package/dist/bin/clodo-service-test.js +0 -10
  95. package/dist/bin/commands/assess.js +0 -91
  96. package/dist/bin/database/enterprise-db-manager.js +0 -457
  97. package/dist/bin/deployment/enterprise-deploy.js +0 -877
  98. package/dist/bin/deployment/master-deploy.js +0 -1376
  99. package/dist/bin/deployment/modular-enterprise-deploy.js +0 -466
  100. package/dist/bin/deployment/orchestration/EnterpriseOrchestrator.js +0 -401
  101. package/dist/bin/deployment/test-interactive-utils.js +0 -66
  102. package/dist/bin/portfolio/portfolio-manager.js +0 -487
  103. package/dist/bin/security/security-cli.js +0 -108
  104. package/dist/bin/service-management/create-service.js +0 -122
  105. package/dist/bin/service-management/init-service.js +0 -79
  106. package/dist/bin/shared/deployment/index.js +0 -10
  107. package/dist/bin/shared/deployment/rollback-manager.js +0 -523
  108. package/dist/deployment/orchestration/EnterpriseOrchestrator.js +0 -401
  109. package/dist/service-management/ServiceInitializer.js +0 -453
  110. /package/dist/{bin → lib}/database/deployment-db-manager.js +0 -0
  111. /package/dist/{bin → lib}/database/wrangler-d1-manager.js +0 -0
  112. /package/dist/{bin → lib}/deployment/modules/DeploymentConfiguration.js +0 -0
  113. /package/dist/{bin → lib}/deployment/modules/MonitoringIntegration.js +0 -0
  114. /package/dist/{bin → lib}/deployment/modules/ValidationManager.js +0 -0
  115. /package/dist/{bin → lib}/deployment/orchestration/BaseDeploymentOrchestrator.js +0 -0
  116. /package/dist/{bin → lib}/deployment/orchestration/PortfolioOrchestrator.js +0 -0
  117. /package/dist/{bin → lib}/deployment/orchestration/SingleServiceOrchestrator.js +0 -0
  118. /package/dist/{bin → lib}/deployment/orchestration/UnifiedDeploymentOrchestrator.js +0 -0
  119. /package/dist/{bin → lib}/shared/config/cache.js +0 -0
  120. /package/dist/{bin → lib}/shared/config/cloudflare-service-validator.js +0 -0
  121. /package/dist/{bin → lib}/shared/config/manager.js +0 -0
  122. /package/dist/{bin → lib}/shared/config/manifest-loader.js +0 -0
  123. /package/dist/{bin → lib}/shared/database/connection-manager.js +0 -0
  124. /package/dist/{bin → lib}/shared/database/index.js +0 -0
  125. /package/dist/{bin → lib}/shared/database/orchestrator.js +0 -0
  126. /package/dist/{bin → lib}/shared/deployment/auditor.js +0 -0
  127. /package/dist/{bin → lib}/shared/index.js +0 -0
  128. /package/dist/{bin → lib}/shared/logging/Logger.js +0 -0
  129. /package/dist/{bin → lib}/shared/monitoring/index.js +0 -0
  130. /package/dist/{bin → lib}/shared/monitoring/production-monitor.js +0 -0
  131. /package/dist/{bin → lib}/shared/production-tester/api-tester.js +0 -0
  132. /package/dist/{bin → lib}/shared/production-tester/auth-tester.js +0 -0
  133. /package/dist/{bin → lib}/shared/production-tester/core.js +0 -0
  134. /package/dist/{bin → lib}/shared/production-tester/database-tester.js +0 -0
  135. /package/dist/{bin → lib}/shared/production-tester/index.js +0 -0
  136. /package/dist/{bin → lib}/shared/production-tester/load-tester.js +0 -0
  137. /package/dist/{bin → lib}/shared/production-tester/performance-tester.js +0 -0
  138. /package/dist/{bin → lib}/shared/security/api-token-manager.js +0 -0
  139. /package/dist/{bin → lib}/shared/security/index.js +0 -0
  140. /package/dist/{bin → lib}/shared/security/secret-generator.js +0 -0
  141. /package/dist/{bin → lib}/shared/security/secure-token-manager.js +0 -0
  142. /package/dist/{bin → lib}/shared/utils/ErrorHandler.js +0 -0
  143. /package/dist/{bin → lib}/shared/utils/cli-options.js +0 -0
  144. /package/dist/{bin → lib}/shared/utils/config-loader.js +0 -0
  145. /package/dist/{bin → lib}/shared/utils/error-recovery.js +0 -0
  146. /package/dist/{bin → lib}/shared/utils/file-manager.js +0 -0
  147. /package/dist/{bin → lib}/shared/utils/graceful-shutdown-manager.js +0 -0
  148. /package/dist/{bin → lib}/shared/utils/interactive-utils.js +0 -0
  149. /package/dist/{bin → lib}/shared/utils/output-formatter.js +0 -0
  150. /package/dist/{bin → lib}/shared/utils/rate-limiter.js +0 -0
@@ -0,0 +1,464 @@
1
+ # Domain Configuration Examples
2
+
3
+ **Date**: October 28, 2025
4
+ **Purpose**: Example domain configurations for clodo-service deployment
5
+ **Location**: `config/domain-examples/`
6
+
7
+ ---
8
+
9
+ ## 📋 Overview
10
+
11
+ This directory contains three comprehensive example domain configuration files that demonstrate different deployment strategies and use cases for the clodo-service framework. These examples show how to configure domains for various scenarios:
12
+
13
+ 1. **Single Domain** - Simple production deployment
14
+ 2. **Multi-Domain** - Complex multi-service architecture
15
+ 3. **Environment-Mapped** - Development, staging, and production environments
16
+
17
+ ---
18
+
19
+ ## 📁 Configuration Files
20
+
21
+ ### 1. `single-domain.json` - Simple Production Setup
22
+ **Use Case**: Single API service in production environment
23
+ **Complexity**: Basic
24
+ **Domains**: 1
25
+ **Environment**: Production only
26
+
27
+ **Key Features**:
28
+ - Single domain configuration
29
+ - Basic health checks
30
+ - CORS and rate limiting
31
+ - API routing rules
32
+ - Production security settings
33
+
34
+ ### 2. `multi-domain.json` - Multi-Service Architecture
35
+ **Use Case**: Multiple services with different requirements
36
+ **Complexity**: Advanced
37
+ **Domains**: 3 (API, Admin, CDN)
38
+ **Environment**: Production only
39
+
40
+ **Key Features**:
41
+ - Three different service types
42
+ - Parallel deployment configuration
43
+ - Service-specific security policies
44
+ - Authentication requirements
45
+ - CDN caching configuration
46
+ - Rollback strategies
47
+
48
+ ### 3. `environment-mapped.json` - Multi-Environment Setup
49
+ **Use Case**: Development workflow with multiple environments
50
+ **Complexity**: Enterprise
51
+ **Domains**: 3 (one per environment)
52
+ **Environments**: Development, Staging, Production
53
+
54
+ **Key Features**:
55
+ - Environment-specific configurations
56
+ - Different security levels per environment
57
+ - Monitoring and alerting setup
58
+ - Domain suffix mapping
59
+ - Environment-specific routing
60
+
61
+ ---
62
+
63
+ ## 🚀 Usage Guide
64
+
65
+ ### Basic Usage
66
+
67
+ ```bash
68
+ # Deploy using a domain configuration
69
+ npx clodo-service deploy --config config/domain-examples/single-domain.json
70
+
71
+ # Deploy to specific environment (for environment-mapped configs)
72
+ npx clodo-service deploy --config config/domain-examples/environment-mapped.json --environment production
73
+
74
+ # Deploy all domains (for multi-domain configs)
75
+ npx clodo-service deploy --config config/domain-examples/multi-domain.json --all-domains
76
+ ```
77
+
78
+ ### Configuration Structure
79
+
80
+ All configuration files follow this structure:
81
+
82
+ ```json
83
+ {
84
+ "domains": {
85
+ "domain-name.com": {
86
+ "environment": "production|staging|development",
87
+ "serviceName": "unique-service-identifier",
88
+ "serviceType": "data-service|web-service|static-site",
89
+ "cloudflareToken": "your-api-token",
90
+ "cloudflareAccountId": "your-account-id",
91
+ "cloudflareZoneId": "your-zone-id",
92
+ "displayName": "Human-readable name",
93
+ "description": "Service description",
94
+ "deploymentStrategy": "rolling|blue-green|instant",
95
+ "healthCheck": { ... },
96
+ "routing": { ... },
97
+ "security": { ... }
98
+ }
99
+ },
100
+ "global": {
101
+ "customer": "your-company",
102
+ "organization": "Your Organization",
103
+ "contact": "devops@yourcompany.com",
104
+ "version": "1.0.0",
105
+ "lastUpdated": "2025-10-28"
106
+ }
107
+ }
108
+ ```
109
+
110
+ ---
111
+
112
+ ## 🔧 Configuration Details
113
+
114
+ ### Required Fields
115
+
116
+ | Field | Description | Example |
117
+ |-------|-------------|---------|
118
+ | `serviceName` | Unique identifier for the service | `"api-service-prod"` |
119
+ | `serviceType` | Type of service | `"data-service"` |
120
+ | `cloudflareToken` | Cloudflare API token | `"CLOUDFLARE_TOKEN"` |
121
+ | `cloudflareAccountId` | Cloudflare account ID | `"1234567890abcdef..."` |
122
+ | `cloudflareZoneId` | Cloudflare zone ID | `"0987654321fedcba..."` |
123
+
124
+ ### Optional Fields
125
+
126
+ | Field | Description | Default |
127
+ |-------|-------------|---------|
128
+ | `environment` | Target environment | `"production"` |
129
+ | `deploymentStrategy` | Deployment method | `"rolling"` |
130
+ | `displayName` | Human-readable name | Same as serviceName |
131
+ | `description` | Service description | `""` |
132
+
133
+ ### Service Types
134
+
135
+ - **`data-service`**: API services with database connectivity
136
+ - **`web-service`**: Web applications with user interfaces
137
+ - **`static-site`**: Static content served via CDN
138
+
139
+ ### Deployment Strategies
140
+
141
+ - **`rolling`**: Gradual replacement, zero downtime
142
+ - **`blue-green`**: Complete switch between versions
143
+ - **`instant`**: Immediate deployment (for static sites)
144
+
145
+ ---
146
+
147
+ ## 🛡️ Security Configuration
148
+
149
+ ### CORS Settings
150
+
151
+ ```json
152
+ "cors": {
153
+ "enabled": true,
154
+ "origins": ["https://app.example.com"],
155
+ "methods": ["GET", "POST", "PUT", "DELETE"],
156
+ "headers": ["Content-Type", "Authorization"]
157
+ }
158
+ ```
159
+
160
+ ### Rate Limiting
161
+
162
+ ```json
163
+ "rateLimit": {
164
+ "enabled": true,
165
+ "requests": 1000,
166
+ "window": 60
167
+ }
168
+ ```
169
+
170
+ ### Web Application Firewall (WAF)
171
+
172
+ ```json
173
+ "waf": {
174
+ "enabled": true,
175
+ "rules": ["sql-injection", "xss", "csrf", "ddos"]
176
+ }
177
+ ```
178
+
179
+ ---
180
+
181
+ ## 🔍 Health Checks
182
+
183
+ ### Basic Health Check
184
+
185
+ ```json
186
+ "healthCheck": {
187
+ "enabled": true,
188
+ "path": "/health",
189
+ "interval": 30,
190
+ "timeout": 10
191
+ }
192
+ ```
193
+
194
+ ### Advanced Health Check
195
+
196
+ ```json
197
+ "healthCheck": {
198
+ "enabled": true,
199
+ "path": "/api/health",
200
+ "interval": 60,
201
+ "timeout": 15,
202
+ "headers": {
203
+ "Authorization": "Bearer health-check-token"
204
+ },
205
+ "expectedStatus": 200
206
+ }
207
+ ```
208
+
209
+ ---
210
+
211
+ ## 🛣️ Routing Configuration
212
+
213
+ ### Basic Routing
214
+
215
+ ```json
216
+ "routing": {
217
+ "rules": [
218
+ {
219
+ "pattern": "/api/*",
220
+ "target": "api-worker",
221
+ "methods": ["GET", "POST", "PUT", "DELETE"]
222
+ }
223
+ ]
224
+ }
225
+ ```
226
+
227
+ ### Advanced Routing with Authentication
228
+
229
+ ```json
230
+ "routing": {
231
+ "rules": [
232
+ {
233
+ "pattern": "/admin/*",
234
+ "target": "admin-worker",
235
+ "methods": ["GET", "POST", "PUT", "DELETE"],
236
+ "auth": {
237
+ "required": true,
238
+ "type": "jwt"
239
+ }
240
+ }
241
+ ]
242
+ }
243
+ ```
244
+
245
+ ### CDN Routing with Caching
246
+
247
+ ```json
248
+ "routing": {
249
+ "rules": [
250
+ {
251
+ "pattern": "/*",
252
+ "target": "cdn-worker",
253
+ "methods": ["GET", "HEAD"],
254
+ "cache": {
255
+ "enabled": true,
256
+ "ttl": 3600,
257
+ "purgeOnDeploy": true
258
+ }
259
+ }
260
+ ]
261
+ }
262
+ ```
263
+
264
+ ---
265
+
266
+ ## 🌍 Environment Mapping
267
+
268
+ ### Environment Structure
269
+
270
+ ```json
271
+ "environments": {
272
+ "production": {
273
+ "domains": { ... }
274
+ },
275
+ "staging": {
276
+ "domains": { ... }
277
+ },
278
+ "development": {
279
+ "domains": { ... }
280
+ }
281
+ }
282
+ ```
283
+
284
+ ### Global Environment Configuration
285
+
286
+ ```json
287
+ "global": {
288
+ "environmentMapping": {
289
+ "enabled": true,
290
+ "defaultEnvironment": "development",
291
+ "allowedEnvironments": ["development", "staging", "production"],
292
+ "domainSuffixes": {
293
+ "production": "",
294
+ "staging": ".staging",
295
+ "development": ".dev"
296
+ }
297
+ }
298
+ }
299
+ ```
300
+
301
+ ---
302
+
303
+ ## 📊 Deployment Strategies
304
+
305
+ ### Rolling Deployment
306
+ - Gradual replacement of instances
307
+ - Zero downtime
308
+ - Best for stateful services
309
+ - Default strategy
310
+
311
+ ### Blue-Green Deployment
312
+ - Complete switch between versions
313
+ - Instant rollback capability
314
+ - Best for critical production services
315
+ - Requires double resources during deployment
316
+
317
+ ### Instant Deployment
318
+ - Immediate replacement
319
+ - Fastest deployment
320
+ - Best for static sites and development
321
+ - Potential brief downtime
322
+
323
+ ---
324
+
325
+ ## 🔧 Customization Guide
326
+
327
+ ### Adding a New Domain
328
+
329
+ 1. Add domain entry to `domains` object
330
+ 2. Configure required Cloudflare credentials
331
+ 3. Set service-specific routing rules
332
+ 4. Configure security policies
333
+ 5. Add health check endpoints
334
+ 6. Test configuration with `--dry-run`
335
+
336
+ ### Environment-Specific Overrides
337
+
338
+ ```json
339
+ "domains": {
340
+ "api.example.com": {
341
+ "environment": "production",
342
+ "security": {
343
+ "rateLimit": {
344
+ "requests": 10000
345
+ }
346
+ }
347
+ }
348
+ }
349
+ ```
350
+
351
+ ### Service-Specific Routing
352
+
353
+ ```json
354
+ "routing": {
355
+ "rules": [
356
+ {
357
+ "pattern": "/api/v1/*",
358
+ "target": "api-v1-worker"
359
+ },
360
+ {
361
+ "pattern": "/api/v2/*",
362
+ "target": "api-v2-worker"
363
+ }
364
+ ]
365
+ }
366
+ ```
367
+
368
+ ---
369
+
370
+ ## 🐛 Troubleshooting
371
+
372
+ ### Common Issues
373
+
374
+ **Configuration Validation Errors**
375
+ ```
376
+ Error: Invalid domain configuration
377
+ Solution: Check required fields (serviceName, cloudflareToken, etc.)
378
+ ```
379
+
380
+ **Cloudflare API Errors**
381
+ ```
382
+ Error: Invalid API token
383
+ Solution: Verify CLOUDFLARE_API_TOKEN environment variable
384
+ ```
385
+
386
+ **Domain Not Found**
387
+ ```
388
+ Error: Domain not configured
389
+ Solution: Check domain spelling and configuration structure
390
+ ```
391
+
392
+ **Health Check Failures**
393
+ ```
394
+ Error: Health check timeout
395
+ Solution: Verify health endpoint exists and is accessible
396
+ ```
397
+
398
+ ### Debugging Commands
399
+
400
+ ```bash
401
+ # Validate configuration
402
+ npx clodo-service deploy --config config/domain-examples/single-domain.json --dry-run
403
+
404
+ # Test specific domain
405
+ npx clodo-service deploy --config config/domain-examples/single-domain.json --domain api.example.com --dry-run
406
+
407
+ # Check environment variables
408
+ echo $CLOUDFLARE_API_TOKEN
409
+ echo $CLOUDFLARE_ACCOUNT_ID
410
+ ```
411
+
412
+ ---
413
+
414
+ ## 📈 Best Practices
415
+
416
+ ### Security
417
+ - Use environment variables for sensitive credentials
418
+ - Enable WAF rules for production environments
419
+ - Configure appropriate rate limits
420
+ - Use HTTPS-only origins in CORS
421
+
422
+ ### Performance
423
+ - Enable caching for static content
424
+ - Configure appropriate health check intervals
425
+ - Use parallel deployments for multi-domain setups
426
+ - Monitor response times and error rates
427
+
428
+ ### Reliability
429
+ - Configure health checks for all services
430
+ - Use blue-green deployments for critical services
431
+ - Enable rollback on failure
432
+ - Set appropriate timeouts
433
+
434
+ ### Monitoring
435
+ - Enable monitoring for production environments
436
+ - Configure alerts for error rates and response times
437
+ - Log deployment events and failures
438
+ - Track deployment metrics
439
+
440
+ ---
441
+
442
+ ## 🔗 Related Documentation
443
+
444
+ - **Deploy Command**: `docs/ORCHESTRATOR_CLI_INTEGRATION.md`
445
+ - **API Reference**: `docs/api-reference.md`
446
+ - **Security Guide**: `docs/SECURITY.md`
447
+ - **Migration Guide**: `docs/MIGRATION_GUIDE.md`
448
+
449
+ ---
450
+
451
+ ## 📞 Support
452
+
453
+ For questions about domain configuration:
454
+ - Check the troubleshooting section above
455
+ - Review the API documentation
456
+ - Test with `--dry-run` flag first
457
+ - Contact: devops@example.com
458
+
459
+ ---
460
+
461
+ **Version**: 1.0.0
462
+ **Last Updated**: October 28, 2025
463
+ **Examples**: 3 configurations
464
+ **Use Cases**: Single domain, multi-domain, environment-mapped
@@ -0,0 +1,168 @@
1
+ {
2
+ "environments": {
3
+ "production": {
4
+ "domains": {
5
+ "api.example.com": {
6
+ "serviceName": "api-service-prod",
7
+ "serviceType": "data-service",
8
+ "cloudflareToken": "CLOUDFLARE_PROD_TOKEN_PLACEHOLDER",
9
+ "cloudflareAccountId": "1234567890abcdef1234567890abcdef",
10
+ "cloudflareZoneId": "0987654321fedcba0987654321fedcba",
11
+ "displayName": "Production API Service",
12
+ "description": "Production API service with maximum reliability",
13
+ "deploymentStrategy": "blue-green",
14
+ "healthCheck": {
15
+ "enabled": true,
16
+ "path": "/health",
17
+ "interval": 30,
18
+ "timeout": 10
19
+ },
20
+ "routing": {
21
+ "rules": [
22
+ {
23
+ "pattern": "/api/*",
24
+ "target": "api-prod-worker",
25
+ "methods": ["GET", "POST", "PUT", "DELETE"]
26
+ }
27
+ ]
28
+ },
29
+ "security": {
30
+ "cors": {
31
+ "enabled": true,
32
+ "origins": ["https://app.example.com"],
33
+ "methods": ["GET", "POST", "PUT", "DELETE"],
34
+ "headers": ["Content-Type", "Authorization"]
35
+ },
36
+ "rateLimit": {
37
+ "enabled": true,
38
+ "requests": 10000,
39
+ "window": 60
40
+ },
41
+ "waf": {
42
+ "enabled": true,
43
+ "rules": ["sql-injection", "xss", "csrf", "ddos"]
44
+ }
45
+ },
46
+ "monitoring": {
47
+ "enabled": true,
48
+ "metrics": ["response-time", "error-rate", "throughput"],
49
+ "alerts": {
50
+ "errorRateThreshold": 0.05,
51
+ "responseTimeThreshold": 500
52
+ }
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "staging": {
58
+ "domains": {
59
+ "api.staging.example.com": {
60
+ "serviceName": "api-service-staging",
61
+ "serviceType": "data-service",
62
+ "cloudflareToken": "CLOUDFLARE_STAGING_TOKEN_PLACEHOLDER",
63
+ "cloudflareAccountId": "1234567890abcdef1234567890abcdef",
64
+ "cloudflareZoneId": "0987654321fedcba0987654321fedcba",
65
+ "displayName": "Staging API Service",
66
+ "description": "Staging environment for testing and validation",
67
+ "deploymentStrategy": "rolling",
68
+ "healthCheck": {
69
+ "enabled": true,
70
+ "path": "/health",
71
+ "interval": 60,
72
+ "timeout": 15
73
+ },
74
+ "routing": {
75
+ "rules": [
76
+ {
77
+ "pattern": "/api/*",
78
+ "target": "api-staging-worker",
79
+ "methods": ["GET", "POST", "PUT", "DELETE"]
80
+ }
81
+ ]
82
+ },
83
+ "security": {
84
+ "cors": {
85
+ "enabled": true,
86
+ "origins": ["https://staging.example.com"],
87
+ "methods": ["GET", "POST", "PUT", "DELETE"],
88
+ "headers": ["Content-Type", "Authorization"]
89
+ },
90
+ "rateLimit": {
91
+ "enabled": true,
92
+ "requests": 1000,
93
+ "window": 60
94
+ }
95
+ },
96
+ "monitoring": {
97
+ "enabled": true,
98
+ "metrics": ["response-time", "error-rate"],
99
+ "alerts": {
100
+ "errorRateThreshold": 0.10,
101
+ "responseTimeThreshold": 1000
102
+ }
103
+ }
104
+ }
105
+ }
106
+ },
107
+ "development": {
108
+ "domains": {
109
+ "api.dev.example.com": {
110
+ "serviceName": "api-service-dev",
111
+ "serviceType": "data-service",
112
+ "cloudflareToken": "CLOUDFLARE_DEV_TOKEN_PLACEHOLDER",
113
+ "cloudflareAccountId": "1234567890abcdef1234567890abcdef",
114
+ "cloudflareZoneId": "0987654321fedcba0987654321fedcba",
115
+ "displayName": "Development API Service",
116
+ "description": "Development environment for active development",
117
+ "deploymentStrategy": "instant",
118
+ "healthCheck": {
119
+ "enabled": true,
120
+ "path": "/health",
121
+ "interval": 120,
122
+ "timeout": 30
123
+ },
124
+ "routing": {
125
+ "rules": [
126
+ {
127
+ "pattern": "/api/*",
128
+ "target": "api-dev-worker",
129
+ "methods": ["GET", "POST", "PUT", "DELETE"]
130
+ }
131
+ ]
132
+ },
133
+ "security": {
134
+ "cors": {
135
+ "enabled": true,
136
+ "origins": ["http://localhost:3000", "https://dev.example.com"],
137
+ "methods": ["GET", "POST", "PUT", "DELETE"],
138
+ "headers": ["Content-Type", "Authorization"]
139
+ },
140
+ "rateLimit": {
141
+ "enabled": false
142
+ }
143
+ },
144
+ "monitoring": {
145
+ "enabled": false
146
+ }
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "global": {
152
+ "customer": "example-company",
153
+ "organization": "Example Corp",
154
+ "contact": "devops@example.com",
155
+ "version": "1.0.0",
156
+ "lastUpdated": "2025-10-28",
157
+ "environmentMapping": {
158
+ "enabled": true,
159
+ "defaultEnvironment": "development",
160
+ "allowedEnvironments": ["development", "staging", "production"],
161
+ "domainSuffixes": {
162
+ "production": "",
163
+ "staging": ".staging",
164
+ "development": ".dev"
165
+ }
166
+ }
167
+ }
168
+ }