blockmine 1.24.0 → 1.27.0

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 (476) hide show
  1. package/CHANGELOG.md +76 -1
  2. package/README.en.md +427 -0
  3. package/README.md +40 -0
  4. package/backend/package.json +2 -2
  5. package/backend/prisma/migrations/20260328173000_add_plugin_source_ref/migration.sql +2 -0
  6. package/backend/prisma/migrations/migration_lock.toml +2 -2
  7. package/backend/prisma/schema.prisma +2 -0
  8. package/backend/src/ai/plugin-assistant-system-prompt.md +664 -5
  9. package/backend/src/api/routes/apiKeys.js +8 -0
  10. package/backend/src/api/routes/bots.js +271 -9
  11. package/backend/src/api/routes/eventGraphs.js +151 -1
  12. package/backend/src/api/routes/health.js +38 -0
  13. package/backend/src/api/routes/nodeRegistry.js +63 -0
  14. package/backend/src/api/routes/plugins.js +254 -29
  15. package/backend/src/api/routes/servers.js +14 -2
  16. package/backend/src/container.js +11 -8
  17. package/backend/src/core/BotCommandLoader.js +161 -0
  18. package/backend/src/core/BotConnection.js +125 -0
  19. package/backend/src/core/BotEventHandlers.js +234 -0
  20. package/backend/src/core/BotIPCHandler.js +445 -0
  21. package/backend/src/core/BotManager.js +15 -7
  22. package/backend/src/core/BotProcess.js +169 -140
  23. package/backend/src/core/EventGraphManager.js +7 -3
  24. package/backend/src/core/GraphDebugHandler.js +229 -0
  25. package/backend/src/core/GraphDebugIPC.js +117 -0
  26. package/backend/src/core/GraphExecutionEngine.js +545 -978
  27. package/backend/src/core/GraphTraversal.js +80 -0
  28. package/backend/src/core/GraphValidation.js +73 -0
  29. package/backend/src/core/NodeDefinition.js +138 -0
  30. package/backend/src/core/NodeRegistry.js +153 -141
  31. package/backend/src/core/PluginLoader.js +83 -3
  32. package/backend/src/core/PluginManager.js +346 -35
  33. package/backend/src/core/RewindSignal.js +9 -0
  34. package/backend/src/core/config/ConfigValidator.js +72 -0
  35. package/backend/src/core/config/FeatureFlags.js +52 -0
  36. package/backend/src/core/config/__tests__/ConfigValidator.test.js +232 -0
  37. package/backend/src/core/domain/entities/Bot.js +39 -0
  38. package/backend/src/core/domain/entities/Command.js +41 -0
  39. package/backend/src/core/domain/entities/EventGraph.js +39 -0
  40. package/backend/src/core/domain/entities/Plugin.js +45 -0
  41. package/backend/src/core/domain/entities/User.js +40 -0
  42. package/backend/src/core/domain/services/DependencyResolver.js +168 -0
  43. package/backend/src/core/domain/services/GraphValidator.js +117 -0
  44. package/backend/src/core/domain/services/PermissionChecker.js +34 -0
  45. package/backend/src/core/domain/services/__tests__/DependencyResolver.test.js +126 -0
  46. package/backend/src/core/domain/valueObjects/BotConfig.js +27 -0
  47. package/backend/src/core/domain/valueObjects/DependencyGraph.js +86 -0
  48. package/backend/src/core/domain/valueObjects/PluginManifest.js +36 -0
  49. package/backend/src/core/errors/BaseError.js +29 -0
  50. package/backend/src/core/errors/ErrorHandler.js +81 -0
  51. package/backend/src/core/errors/__tests__/ErrorHandler.test.js +188 -0
  52. package/backend/src/core/errors/index.js +68 -0
  53. package/backend/src/core/infrastructure/BatchingUtility.js +66 -0
  54. package/backend/src/core/infrastructure/CircuitBreaker.js +103 -0
  55. package/backend/src/core/infrastructure/ConnectionPool.js +81 -0
  56. package/backend/src/core/infrastructure/RateLimiter.js +64 -0
  57. package/backend/src/core/infrastructure/__tests__/BatchingUtility.test.js +86 -0
  58. package/backend/src/core/infrastructure/__tests__/CircuitBreaker.test.js +156 -0
  59. package/backend/src/core/infrastructure/__tests__/ConnectionPool.test.js +146 -0
  60. package/backend/src/core/infrastructure/__tests__/RateLimiter.test.js +171 -0
  61. package/backend/src/core/ipc/botApiFactory.js +72 -0
  62. package/backend/src/core/ipc/ipcMessageTypes.js +115 -0
  63. package/backend/src/core/logging/AuditLogger.js +61 -0
  64. package/backend/src/core/logging/StructuredLogger.js +80 -0
  65. package/backend/src/core/logging/__tests__/StructuredLogger.test.js +213 -0
  66. package/backend/src/core/logging/index.js +7 -0
  67. package/backend/src/core/metrics/MetricsCollector.js +104 -0
  68. package/backend/src/core/metrics/__tests__/MetricsCollector.test.js +131 -0
  69. package/backend/src/core/node-registries/actionsNodes.js +191 -0
  70. package/backend/src/core/node-registries/arraysNodes.js +152 -0
  71. package/backend/src/core/node-registries/botNodes.js +48 -0
  72. package/backend/src/core/node-registries/containerNodes.js +141 -0
  73. package/backend/src/core/node-registries/dataNodes.js +284 -0
  74. package/backend/src/core/node-registries/debugNodes.js +23 -0
  75. package/backend/src/core/node-registries/eventsNodes.js +223 -0
  76. package/backend/src/core/node-registries/flowNodes.js +151 -0
  77. package/backend/src/core/node-registries/furnaceNodes.js +123 -0
  78. package/backend/src/core/node-registries/index.js +108 -0
  79. package/backend/src/core/node-registries/inventory.js +102 -106
  80. package/backend/src/core/node-registries/logicNodes.js +54 -0
  81. package/backend/src/core/node-registries/mathNodes.js +38 -0
  82. package/backend/src/core/node-registries/navigationNodes.js +109 -0
  83. package/backend/src/core/node-registries/objectsNodes.js +90 -0
  84. package/backend/src/core/node-registries/stringsNodes.js +165 -0
  85. package/backend/src/core/node-registries/timeNodes.js +105 -0
  86. package/backend/src/core/node-registries/typeNodes.js +22 -0
  87. package/backend/src/core/node-registries/usersNodes.js +126 -0
  88. package/backend/src/core/nodes/arrays/shuffle.js +14 -0
  89. package/backend/src/core/nodes/bot/get_name.js +8 -0
  90. package/backend/src/core/nodes/bot/stop_bot.js +5 -0
  91. package/backend/src/core/nodes/container/open.js +101 -111
  92. package/backend/src/core/nodes/data/store_read.js +26 -0
  93. package/backend/src/core/nodes/data/store_write.js +23 -0
  94. package/backend/src/core/nodes/event/call_event.js +31 -0
  95. package/backend/src/core/nodes/event/custom_event.js +8 -0
  96. package/backend/src/core/nodes/flow/timer.js +35 -0
  97. package/backend/src/core/nodes/inventory/drop.js +73 -65
  98. package/backend/src/core/nodes/inventory/equip.js +54 -45
  99. package/backend/src/core/nodes/inventory/select_slot.js +48 -46
  100. package/backend/src/core/nodes/navigation/follow.js +54 -51
  101. package/backend/src/core/nodes/navigation/go_to.js +41 -53
  102. package/backend/src/core/nodes/navigation/go_to_entity.js +65 -69
  103. package/backend/src/core/nodes/navigation/go_to_player.js +65 -70
  104. package/backend/src/core/nodes/navigation/stop.js +17 -26
  105. package/backend/src/core/nodes/users/add_to_group.js +24 -0
  106. package/backend/src/core/nodes/users/check_permission.js +26 -0
  107. package/backend/src/core/nodes/users/remove_from_group.js +24 -0
  108. package/backend/src/core/services/BotIPCMessageRouter.js +337 -0
  109. package/backend/src/core/services/BotLifecycleService.js +43 -450
  110. package/backend/src/core/services/CacheManager.js +83 -23
  111. package/backend/src/core/services/CrashRestartManager.js +42 -0
  112. package/backend/src/core/services/DebugSessionManager.js +114 -12
  113. package/backend/src/core/services/EventGraphService.js +69 -0
  114. package/backend/src/core/services/MinecraftBotManager.js +9 -1
  115. package/backend/src/core/services/PluginManagementService.js +84 -0
  116. package/backend/src/core/services/TestModeContext.js +65 -0
  117. package/backend/src/core/services/__tests__/CacheManager.test.js +168 -0
  118. package/backend/src/core/services.js +1 -11
  119. package/backend/src/core/validation/InputValidator.js +167 -0
  120. package/backend/src/core/validation/__tests__/InputValidator.test.js +296 -0
  121. package/backend/src/real-time/botApi/index.js +1 -1
  122. package/backend/src/real-time/socketHandler.js +26 -0
  123. package/backend/src/server.js +21 -6
  124. package/frontend/dist/assets/browser-ponyfill-D8y0Ty7C.js +2 -0
  125. package/frontend/dist/assets/index-CFJLS0dk.css +32 -0
  126. package/frontend/dist/assets/index-D91UGNMG.js +11260 -0
  127. package/frontend/dist/flags/en.svg +32 -0
  128. package/frontend/dist/flags/ru.svg +5 -0
  129. package/frontend/dist/index.html +2 -2
  130. package/frontend/dist/locales/en/admin.json +100 -0
  131. package/frontend/dist/locales/en/api-keys.json +58 -0
  132. package/frontend/dist/locales/en/bots.json +113 -0
  133. package/frontend/dist/locales/en/common.json +53 -0
  134. package/frontend/dist/locales/en/configuration.json +22 -0
  135. package/frontend/dist/locales/en/console.json +10 -0
  136. package/frontend/dist/locales/en/dashboard.json +85 -0
  137. package/frontend/dist/locales/en/dialogs.json +70 -0
  138. package/frontend/dist/locales/en/event-graphs.json +50 -0
  139. package/frontend/dist/locales/en/graph-store.json +70 -0
  140. package/frontend/dist/locales/en/login.json +36 -0
  141. package/frontend/dist/locales/en/management.json +192 -0
  142. package/frontend/dist/locales/en/minecraft-viewer.json +27 -0
  143. package/frontend/dist/locales/en/nodes.json +1132 -0
  144. package/frontend/dist/locales/en/permissions.json +50 -0
  145. package/frontend/dist/locales/en/plugin-detail.json +69 -0
  146. package/frontend/dist/locales/en/plugins.json +329 -0
  147. package/frontend/dist/locales/en/proxies.json +81 -0
  148. package/frontend/dist/locales/en/servers.json +39 -0
  149. package/frontend/dist/locales/en/setup.json +19 -0
  150. package/frontend/dist/locales/en/sidebar.json +195 -0
  151. package/frontend/dist/locales/en/tasks.json +62 -0
  152. package/frontend/dist/locales/en/visual-editor.json +418 -0
  153. package/frontend/dist/locales/en/websocket.json +86 -0
  154. package/frontend/dist/locales/ru/admin.json +100 -0
  155. package/frontend/dist/locales/ru/api-keys.json +58 -0
  156. package/frontend/dist/locales/ru/bots.json +113 -0
  157. package/frontend/dist/locales/ru/common.json +49 -0
  158. package/frontend/dist/locales/ru/configuration.json +22 -0
  159. package/frontend/dist/locales/ru/console.json +10 -0
  160. package/frontend/dist/locales/ru/dashboard.json +85 -0
  161. package/frontend/dist/locales/ru/dialogs.json +70 -0
  162. package/frontend/dist/locales/ru/event-graphs.json +50 -0
  163. package/frontend/dist/locales/ru/graph-store.json +70 -0
  164. package/frontend/dist/locales/ru/login.json +36 -0
  165. package/frontend/dist/locales/ru/management.json +192 -0
  166. package/frontend/dist/locales/ru/minecraft-viewer.json +30 -0
  167. package/frontend/dist/locales/ru/nodes.json +1131 -0
  168. package/frontend/dist/locales/ru/permissions.json +50 -0
  169. package/frontend/dist/locales/ru/plugin-detail.json +49 -0
  170. package/frontend/dist/locales/ru/plugins.json +209 -0
  171. package/frontend/dist/locales/ru/proxies.json +81 -0
  172. package/frontend/dist/locales/ru/servers.json +39 -0
  173. package/frontend/dist/locales/ru/setup.json +19 -0
  174. package/frontend/dist/locales/ru/sidebar.json +195 -0
  175. package/frontend/dist/locales/ru/tasks.json +62 -0
  176. package/frontend/dist/locales/ru/visual-editor.json +420 -0
  177. package/frontend/dist/locales/ru/websocket.json +86 -0
  178. package/frontend/dist/monacoeditorwork/css.worker.bundle.js +7 -7
  179. package/frontend/dist/monacoeditorwork/html.worker.bundle.js +7 -7
  180. package/frontend/dist/monacoeditorwork/json.worker.bundle.js +7 -7
  181. package/frontend/dist/monacoeditorwork/ts.worker.bundle.js +3 -3
  182. package/frontend/package.json +6 -0
  183. package/nul +12 -0
  184. package/package.json +3 -3
  185. package/screen/3dviewer.png +0 -0
  186. package/screen/console.png +0 -0
  187. package/screen/dashboard.png +0 -0
  188. package/screen/graph_collabe.png +0 -0
  189. package/screen/graph_live_debug.png +0 -0
  190. package/screen/language_selector.png +0 -0
  191. package/screen/management_command.png +0 -0
  192. package/screen/node_debug_trace.png +0 -0
  193. package/screen/plugin_/320/276/320/261/320/267/320/276/321/200.png +0 -0
  194. package/screen/websocket.png +0 -0
  195. package/screen//320/275/320/260/321/201/321/202/321/200/320/276/320/271/320/272/320/270_/320/276/321/202/320/264/320/265/320/273/321/214/320/275/321/213/321/205_/320/272/320/276/320/274/320/260/320/275/320/264_/320/272/320/260/320/266/320/264/321/203_/320/272/320/276/320/274/320/260/320/275/320/273/320/264/321/203_/320/274/320/276/320/266/320/275/320/276_/320/275/320/260/321/201/321/202/321/200/320/260/320/270/320/262/320/260/321/202/321/214.png +0 -0
  196. package/screen//320/277/320/273/320/260/320/275/320/270/321/200/320/276/320/262/321/211/320/270/320/272_/320/274/320/276/320/266/320/275/320/276_/320/267/320/260/320/264/320/260/320/262/320/260/321/202/321/214_/320/264/320/265/320/271/321/201/321/202/320/262/320/270/321/217_/320/277/320/276_/320/262/321/200/320/265/320/274/320/265/320/275/320/270.png +0 -0
  197. package/.claude/agents/README.md +0 -469
  198. package/.claude/agents/auth-route-debugger.md +0 -118
  199. package/.claude/agents/auth-route-tester.md +0 -93
  200. package/.claude/agents/auto-error-resolver.md +0 -97
  201. package/.claude/agents/build-optimizer.md +0 -236
  202. package/.claude/agents/code-architect.md +0 -34
  203. package/.claude/agents/code-architecture-reviewer.md +0 -83
  204. package/.claude/agents/code-explorer.md +0 -51
  205. package/.claude/agents/code-refactor-master.md +0 -94
  206. package/.claude/agents/code-reviewer.md +0 -46
  207. package/.claude/agents/cost-optimizer.md +0 -134
  208. package/.claude/agents/deployment-orchestrator.md +0 -113
  209. package/.claude/agents/documentation-architect.md +0 -82
  210. package/.claude/agents/frontend-error-fixer.md +0 -77
  211. package/.claude/agents/iac-code-generator.md +0 -71
  212. package/.claude/agents/incident-responder.md +0 -346
  213. package/.claude/agents/infrastructure-architect.md +0 -31
  214. package/.claude/agents/kubernetes-specialist.md +0 -56
  215. package/.claude/agents/migration-planner.md +0 -181
  216. package/.claude/agents/network-architect.md +0 -196
  217. package/.claude/agents/plan-reviewer.md +0 -52
  218. package/.claude/agents/refactor-planner.md +0 -63
  219. package/.claude/agents/security-scanner.md +0 -102
  220. package/.claude/agents/web-research-specialist.md +0 -78
  221. package/.claude/commands/cost-analysis.md +0 -315
  222. package/.claude/commands/dev-docs-update.md +0 -55
  223. package/.claude/commands/dev-docs.md +0 -51
  224. package/.claude/commands/feature-dev.md +0 -125
  225. package/.claude/commands/incident-debug.md +0 -247
  226. package/.claude/commands/infra-plan.md +0 -81
  227. package/.claude/commands/migration-plan.md +0 -478
  228. package/.claude/commands/route-research-for-testing.md +0 -37
  229. package/.claude/commands/security-review.md +0 -66
  230. package/.claude/hooks/CONFIG.md +0 -448
  231. package/.claude/hooks/README.md +0 -163
  232. package/.claude/hooks/SKILL_ACTIVATION_COMPLETE.md +0 -226
  233. package/.claude/hooks/WINDOWS_HOOKS_README.md +0 -151
  234. package/.claude/hooks/add-skill-activation-banners.ts +0 -132
  235. package/.claude/hooks/comprehensive-skill-test.ts +0 -1315
  236. package/.claude/hooks/error-handling-reminder.sh +0 -12
  237. package/.claude/hooks/error-handling-reminder.ts +0 -222
  238. package/.claude/hooks/k8s-manifest-validator.sh +0 -56
  239. package/.claude/hooks/package-lock.json +0 -556
  240. package/.claude/hooks/package.json +0 -16
  241. package/.claude/hooks/post-tool-use-tracker.ps1 +0 -174
  242. package/.claude/hooks/post-tool-use-tracker.sh +0 -183
  243. package/.claude/hooks/security-policy-check.sh +0 -247
  244. package/.claude/hooks/skill-activation-prompt.ps1 +0 -10
  245. package/.claude/hooks/skill-activation-prompt.sh +0 -10
  246. package/.claude/hooks/skill-activation-prompt.ts +0 -141
  247. package/.claude/hooks/stop-build-check-enhanced.sh +0 -130
  248. package/.claude/hooks/terraform-validator.sh +0 -53
  249. package/.claude/hooks/test-input.json +0 -7
  250. package/.claude/hooks/test-skill-activation.ts +0 -427
  251. package/.claude/hooks/trigger-build-resolver.sh +0 -79
  252. package/.claude/hooks/tsc-check.sh +0 -173
  253. package/.claude/hooks/tsconfig.json +0 -19
  254. package/.claude/settings.json +0 -59
  255. package/.claude/settings.local.json +0 -67
  256. package/.claude/skills/README.md +0 -507
  257. package/.claude/skills/api-engineering/SKILL.md +0 -63
  258. package/.claude/skills/api-engineering/resources/api-versioning.md +0 -88
  259. package/.claude/skills/api-engineering/resources/graphql-patterns.md +0 -106
  260. package/.claude/skills/api-engineering/resources/rate-limiting.md +0 -118
  261. package/.claude/skills/api-engineering/resources/rest-api-design.md +0 -105
  262. package/.claude/skills/backend-dev-guidelines/SKILL.md +0 -306
  263. package/.claude/skills/backend-dev-guidelines/resources/architecture-overview.md +0 -451
  264. package/.claude/skills/backend-dev-guidelines/resources/async-and-errors.md +0 -307
  265. package/.claude/skills/backend-dev-guidelines/resources/complete-examples.md +0 -638
  266. package/.claude/skills/backend-dev-guidelines/resources/configuration.md +0 -275
  267. package/.claude/skills/backend-dev-guidelines/resources/database-patterns.md +0 -224
  268. package/.claude/skills/backend-dev-guidelines/resources/middleware-guide.md +0 -213
  269. package/.claude/skills/backend-dev-guidelines/resources/routing-and-controllers.md +0 -756
  270. package/.claude/skills/backend-dev-guidelines/resources/sentry-and-monitoring.md +0 -336
  271. package/.claude/skills/backend-dev-guidelines/resources/services-and-repositories.md +0 -789
  272. package/.claude/skills/backend-dev-guidelines/resources/testing-guide.md +0 -235
  273. package/.claude/skills/backend-dev-guidelines/resources/validation-patterns.md +0 -754
  274. package/.claude/skills/budget-and-cost-management/SKILL.md +0 -850
  275. package/.claude/skills/build-engineering/SKILL.md +0 -431
  276. package/.claude/skills/build-engineering/resources/artifact-repositories.md +0 -72
  277. package/.claude/skills/build-engineering/resources/build-caching.md +0 -96
  278. package/.claude/skills/build-engineering/resources/build-pipelines.md +0 -105
  279. package/.claude/skills/build-engineering/resources/build-security.md +0 -95
  280. package/.claude/skills/build-engineering/resources/build-systems.md +0 -389
  281. package/.claude/skills/build-engineering/resources/compilation-optimization.md +0 -201
  282. package/.claude/skills/build-engineering/resources/dependency-management.md +0 -73
  283. package/.claude/skills/build-engineering/resources/monorepo-builds.md +0 -110
  284. package/.claude/skills/build-engineering/resources/performance-optimization.md +0 -113
  285. package/.claude/skills/build-engineering/resources/reproducible-builds.md +0 -82
  286. package/.claude/skills/cloud-engineering/SKILL.md +0 -675
  287. package/.claude/skills/cloud-engineering/resources/aws-patterns.md +0 -742
  288. package/.claude/skills/cloud-engineering/resources/azure-patterns.md +0 -714
  289. package/.claude/skills/cloud-engineering/resources/cleared-cloud-environments.md +0 -987
  290. package/.claude/skills/cloud-engineering/resources/cloud-cost-optimization.md +0 -757
  291. package/.claude/skills/cloud-engineering/resources/cloud-networking.md +0 -1058
  292. package/.claude/skills/cloud-engineering/resources/cloud-security-tools.md +0 -1530
  293. package/.claude/skills/cloud-engineering/resources/cloud-security.md +0 -990
  294. package/.claude/skills/cloud-engineering/resources/gcp-patterns.md +0 -758
  295. package/.claude/skills/cloud-engineering/resources/migration-strategies.md +0 -820
  296. package/.claude/skills/cloud-engineering/resources/multi-cloud-strategies.md +0 -670
  297. package/.claude/skills/cloud-engineering/resources/oci-patterns.md +0 -1198
  298. package/.claude/skills/cloud-engineering/resources/serverless-patterns.md +0 -795
  299. package/.claude/skills/cloud-engineering/resources/well-architected-frameworks.md +0 -966
  300. package/.claude/skills/cybersecurity/SKILL.md +0 -409
  301. package/.claude/skills/cybersecurity/resources/security-architecture.md +0 -266
  302. package/.claude/skills/database-engineering/SKILL.md +0 -61
  303. package/.claude/skills/database-engineering/resources/backup-and-recovery.md +0 -72
  304. package/.claude/skills/database-engineering/resources/database-replication.md +0 -63
  305. package/.claude/skills/database-engineering/resources/postgresql-fundamentals.md +0 -70
  306. package/.claude/skills/database-engineering/resources/query-optimization.md +0 -68
  307. package/.claude/skills/devsecops/SKILL.md +0 -374
  308. package/.claude/skills/devsecops/resources/ci-cd-security.md +0 -204
  309. package/.claude/skills/devsecops/resources/compliance-automation.md +0 -530
  310. package/.claude/skills/devsecops/resources/compliance-frameworks.md +0 -2322
  311. package/.claude/skills/devsecops/resources/container-security.md +0 -915
  312. package/.claude/skills/devsecops/resources/cspm-integration.md +0 -1440
  313. package/.claude/skills/devsecops/resources/policy-enforcement.md +0 -619
  314. package/.claude/skills/devsecops/resources/secrets-management.md +0 -755
  315. package/.claude/skills/devsecops/resources/security-monitoring.md +0 -146
  316. package/.claude/skills/devsecops/resources/security-scanning.md +0 -887
  317. package/.claude/skills/devsecops/resources/security-testing.md +0 -203
  318. package/.claude/skills/devsecops/resources/supply-chain-security.md +0 -518
  319. package/.claude/skills/devsecops/resources/vulnerability-management.md +0 -481
  320. package/.claude/skills/devsecops/resources/zero-trust-architecture.md +0 -177
  321. package/.claude/skills/documentation-as-code/SKILL.md +0 -323
  322. package/.claude/skills/documentation-as-code/resources/api-documentation.md +0 -90
  323. package/.claude/skills/documentation-as-code/resources/changelog-management.md +0 -79
  324. package/.claude/skills/documentation-as-code/resources/diagram-generation.md +0 -44
  325. package/.claude/skills/documentation-as-code/resources/docs-as-code-workflow.md +0 -99
  326. package/.claude/skills/documentation-as-code/resources/documentation-automation.md +0 -68
  327. package/.claude/skills/documentation-as-code/resources/documentation-sites.md +0 -79
  328. package/.claude/skills/documentation-as-code/resources/markdown-best-practices.md +0 -162
  329. package/.claude/skills/documentation-as-code/resources/openapi-specification.md +0 -77
  330. package/.claude/skills/documentation-as-code/resources/readme-engineering.md +0 -60
  331. package/.claude/skills/documentation-as-code/resources/technical-writing-guide.md +0 -202
  332. package/.claude/skills/engineering-management/SKILL.md +0 -356
  333. package/.claude/skills/engineering-management/resources/career-ladders.md +0 -609
  334. package/.claude/skills/engineering-management/resources/hiring-and-assessment.md +0 -555
  335. package/.claude/skills/engineering-management/resources/one-on-one-guides.md +0 -609
  336. package/.claude/skills/engineering-management/resources/resource-planning.md +0 -557
  337. package/.claude/skills/engineering-management/resources/team-organization-patterns.md +0 -491
  338. package/.claude/skills/engineering-management/resources/technical-interviews.md +0 -474
  339. package/.claude/skills/engineering-operations-management/SKILL.md +0 -817
  340. package/.claude/skills/error-tracking/SKILL.md +0 -379
  341. package/.claude/skills/frontend-design/SKILL.md +0 -42
  342. package/.claude/skills/frontend-dev-guidelines/SKILL.md +0 -403
  343. package/.claude/skills/frontend-dev-guidelines/resources/common-patterns.md +0 -331
  344. package/.claude/skills/frontend-dev-guidelines/resources/complete-examples.md +0 -872
  345. package/.claude/skills/frontend-dev-guidelines/resources/component-patterns.md +0 -502
  346. package/.claude/skills/frontend-dev-guidelines/resources/data-fetching.md +0 -767
  347. package/.claude/skills/frontend-dev-guidelines/resources/file-organization.md +0 -502
  348. package/.claude/skills/frontend-dev-guidelines/resources/loading-and-error-states.md +0 -501
  349. package/.claude/skills/frontend-dev-guidelines/resources/performance.md +0 -406
  350. package/.claude/skills/frontend-dev-guidelines/resources/routing-guide.md +0 -364
  351. package/.claude/skills/frontend-dev-guidelines/resources/styling-guide.md +0 -428
  352. package/.claude/skills/frontend-dev-guidelines/resources/typescript-standards.md +0 -418
  353. package/.claude/skills/general-it-engineering/SKILL.md +0 -393
  354. package/.claude/skills/general-it-engineering/resources/asset-management.md +0 -712
  355. package/.claude/skills/general-it-engineering/resources/automation-orchestration.md +0 -817
  356. package/.claude/skills/general-it-engineering/resources/business-continuity.md +0 -786
  357. package/.claude/skills/general-it-engineering/resources/change-management.md +0 -715
  358. package/.claude/skills/general-it-engineering/resources/enterprise-monitoring.md +0 -729
  359. package/.claude/skills/general-it-engineering/resources/help-desk-operations.md +0 -738
  360. package/.claude/skills/general-it-engineering/resources/incident-service-management.md +0 -834
  361. package/.claude/skills/general-it-engineering/resources/it-governance.md +0 -753
  362. package/.claude/skills/general-it-engineering/resources/itil-framework.md +0 -503
  363. package/.claude/skills/general-it-engineering/resources/service-management.md +0 -669
  364. package/.claude/skills/infrastructure-architecture/SKILL.md +0 -328
  365. package/.claude/skills/infrastructure-architecture/resources/architecture-decision-records.md +0 -505
  366. package/.claude/skills/infrastructure-architecture/resources/architecture-patterns.md +0 -528
  367. package/.claude/skills/infrastructure-architecture/resources/capacity-planning.md +0 -453
  368. package/.claude/skills/infrastructure-architecture/resources/cleared-environment-architecture.md +0 -773
  369. package/.claude/skills/infrastructure-architecture/resources/cost-architecture.md +0 -499
  370. package/.claude/skills/infrastructure-architecture/resources/data-architecture.md +0 -501
  371. package/.claude/skills/infrastructure-architecture/resources/disaster-recovery.md +0 -535
  372. package/.claude/skills/infrastructure-architecture/resources/migration-architecture.md +0 -512
  373. package/.claude/skills/infrastructure-architecture/resources/multi-region-design.md +0 -608
  374. package/.claude/skills/infrastructure-architecture/resources/reference-architectures.md +0 -562
  375. package/.claude/skills/infrastructure-architecture/resources/security-architecture.md +0 -538
  376. package/.claude/skills/infrastructure-architecture/resources/system-design-principles.md +0 -489
  377. package/.claude/skills/infrastructure-architecture/resources/workload-classification.md +0 -1000
  378. package/.claude/skills/infrastructure-strategy/SKILL.md +0 -924
  379. package/.claude/skills/network-engineering/SKILL.md +0 -385
  380. package/.claude/skills/network-engineering/resources/dns-management.md +0 -738
  381. package/.claude/skills/network-engineering/resources/load-balancing.md +0 -820
  382. package/.claude/skills/network-engineering/resources/network-architecture.md +0 -546
  383. package/.claude/skills/network-engineering/resources/network-security.md +0 -921
  384. package/.claude/skills/network-engineering/resources/network-troubleshooting.md +0 -749
  385. package/.claude/skills/network-engineering/resources/routing-switching.md +0 -373
  386. package/.claude/skills/network-engineering/resources/sdn-networking.md +0 -695
  387. package/.claude/skills/network-engineering/resources/service-mesh-networking.md +0 -777
  388. package/.claude/skills/network-engineering/resources/tcp-ip-protocols.md +0 -444
  389. package/.claude/skills/network-engineering/resources/vpn-connectivity.md +0 -672
  390. package/.claude/skills/node-development/SKILL.md +0 -317
  391. package/.claude/skills/observability-engineering/SKILL.md +0 -101
  392. package/.claude/skills/observability-engineering/resources/apm-tools.md +0 -97
  393. package/.claude/skills/observability-engineering/resources/correlation-strategies.md +0 -87
  394. package/.claude/skills/observability-engineering/resources/distributed-tracing.md +0 -98
  395. package/.claude/skills/observability-engineering/resources/logs-aggregation.md +0 -118
  396. package/.claude/skills/observability-engineering/resources/observability-cost-optimization.md +0 -141
  397. package/.claude/skills/observability-engineering/resources/opentelemetry.md +0 -110
  398. package/.claude/skills/platform-engineering/SKILL.md +0 -555
  399. package/.claude/skills/platform-engineering/resources/architecture-overview.md +0 -600
  400. package/.claude/skills/platform-engineering/resources/container-orchestration.md +0 -916
  401. package/.claude/skills/platform-engineering/resources/cost-optimization.md +0 -634
  402. package/.claude/skills/platform-engineering/resources/developer-platforms.md +0 -670
  403. package/.claude/skills/platform-engineering/resources/gitops-automation.md +0 -650
  404. package/.claude/skills/platform-engineering/resources/infrastructure-as-code.md +0 -778
  405. package/.claude/skills/platform-engineering/resources/infrastructure-standards.md +0 -708
  406. package/.claude/skills/platform-engineering/resources/multi-tenancy.md +0 -602
  407. package/.claude/skills/platform-engineering/resources/platform-security.md +0 -711
  408. package/.claude/skills/platform-engineering/resources/resource-management.md +0 -592
  409. package/.claude/skills/platform-engineering/resources/service-mesh.md +0 -628
  410. package/.claude/skills/release-engineering/SKILL.md +0 -393
  411. package/.claude/skills/release-engineering/resources/artifact-management.md +0 -108
  412. package/.claude/skills/release-engineering/resources/build-optimization.md +0 -84
  413. package/.claude/skills/release-engineering/resources/ci-cd-pipelines.md +0 -411
  414. package/.claude/skills/release-engineering/resources/deployment-strategies.md +0 -197
  415. package/.claude/skills/release-engineering/resources/pipeline-security.md +0 -62
  416. package/.claude/skills/release-engineering/resources/progressive-delivery.md +0 -83
  417. package/.claude/skills/release-engineering/resources/release-automation.md +0 -68
  418. package/.claude/skills/release-engineering/resources/release-orchestration.md +0 -77
  419. package/.claude/skills/release-engineering/resources/rollback-strategies.md +0 -66
  420. package/.claude/skills/release-engineering/resources/versioning-strategies.md +0 -59
  421. package/.claude/skills/route-tester/SKILL.md +0 -392
  422. package/.claude/skills/skill-developer/ADVANCED.md +0 -197
  423. package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +0 -306
  424. package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +0 -152
  425. package/.claude/skills/skill-developer/SKILL.md +0 -430
  426. package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +0 -315
  427. package/.claude/skills/skill-developer/TRIGGER_TYPES.md +0 -305
  428. package/.claude/skills/skill-developer/TROUBLESHOOTING.md +0 -514
  429. package/.claude/skills/skill-rules.json +0 -2989
  430. package/.claude/skills/sre/SKILL.md +0 -464
  431. package/.claude/skills/sre/resources/alerting-best-practices.md +0 -282
  432. package/.claude/skills/sre/resources/capacity-planning.md +0 -226
  433. package/.claude/skills/sre/resources/chaos-engineering.md +0 -193
  434. package/.claude/skills/sre/resources/disaster-recovery.md +0 -232
  435. package/.claude/skills/sre/resources/incident-management.md +0 -436
  436. package/.claude/skills/sre/resources/observability-stack.md +0 -240
  437. package/.claude/skills/sre/resources/on-call-runbooks.md +0 -167
  438. package/.claude/skills/sre/resources/performance-optimization.md +0 -108
  439. package/.claude/skills/sre/resources/reliability-patterns.md +0 -183
  440. package/.claude/skills/sre/resources/slo-sli-sla.md +0 -464
  441. package/.claude/skills/sre/resources/toil-reduction.md +0 -145
  442. package/.claude/skills/systems-engineering/SKILL.md +0 -648
  443. package/.claude/skills/systems-engineering/resources/automation-patterns.md +0 -771
  444. package/.claude/skills/systems-engineering/resources/configuration-management.md +0 -998
  445. package/.claude/skills/systems-engineering/resources/linux-administration.md +0 -672
  446. package/.claude/skills/systems-engineering/resources/networking-fundamentals.md +0 -982
  447. package/.claude/skills/systems-engineering/resources/performance-tuning.md +0 -871
  448. package/.claude/skills/systems-engineering/resources/powershell-scripting.md +0 -482
  449. package/.claude/skills/systems-engineering/resources/security-hardening.md +0 -739
  450. package/.claude/skills/systems-engineering/resources/shell-scripting.md +0 -915
  451. package/.claude/skills/systems-engineering/resources/storage-management.md +0 -628
  452. package/.claude/skills/systems-engineering/resources/system-monitoring.md +0 -787
  453. package/.claude/skills/systems-engineering/resources/troubleshooting-guide.md +0 -753
  454. package/.claude/skills/systems-engineering/resources/windows-administration.md +0 -738
  455. package/.claude/skills/technical-leadership/SKILL.md +0 -728
  456. package/backend/docs/SECRETS_DOCUMENTATION.md +0 -327
  457. package/backend/package-lock.json +0 -6801
  458. package/backend/src/core/node-registries/actions.js +0 -202
  459. package/backend/src/core/node-registries/arrays.js +0 -155
  460. package/backend/src/core/node-registries/bot.js +0 -23
  461. package/backend/src/core/node-registries/container.js +0 -162
  462. package/backend/src/core/node-registries/data.js +0 -290
  463. package/backend/src/core/node-registries/debug.js +0 -26
  464. package/backend/src/core/node-registries/events.js +0 -201
  465. package/backend/src/core/node-registries/flow.js +0 -139
  466. package/backend/src/core/node-registries/furnace.js +0 -143
  467. package/backend/src/core/node-registries/logic.js +0 -62
  468. package/backend/src/core/node-registries/math.js +0 -42
  469. package/backend/src/core/node-registries/navigation.js +0 -111
  470. package/backend/src/core/node-registries/objects.js +0 -98
  471. package/backend/src/core/node-registries/strings.js +0 -187
  472. package/backend/src/core/node-registries/time.js +0 -113
  473. package/backend/src/core/node-registries/type.js +0 -25
  474. package/backend/src/core/node-registries/users.js +0 -79
  475. package/frontend/dist/assets/index-BC-NbKXi.css +0 -32
  476. package/frontend/dist/assets/index-DqJXZMHY.js +0 -11266
@@ -1,820 +0,0 @@
1
- # Cloud Migration Strategies
2
-
3
- Comprehensive guide to cloud migration approaches, patterns, and best practices for moving workloads to AWS, Azure, and GCP.
4
-
5
- ## The 6 R's of Migration
6
-
7
- ```
8
- ┌─────────────────────────────────────────────────────────────┐
9
- │ Migration Strategies │
10
- ├──────────────┬──────────────┬──────────────┬────────────────┤
11
- │ Rehost │ Replatform │ Refactor │ Repurchase │
12
- │ "Lift & Shift"│ "Lift, Tinker│ "Re-architect│ "Drop & Shop" │
13
- │ │ & Shift" │ │ │
14
- │ Fastest │ Balanced │ Most Value │ Strategic │
15
- │ Least Cost │ Moderate │ Highest Cost│ Vendor Lock │
16
- ├──────────────┼──────────────┼──────────────┼────────────────┤
17
- │ Retire │ Retain │ │ │
18
- │ "Decommission"│ "Keep as-is" │ │ │
19
- │ │ │ │ │
20
- │ Cost Savings │ No Change │ │ │
21
- └──────────────┴──────────────┴──────────────┴────────────────┘
22
- ```
23
-
24
- ### 1. Rehost (Lift and Shift)
25
-
26
- **When to Use:**
27
- - Quick migration needed
28
- - Minimal application changes
29
- - Legacy applications
30
- - Limited cloud expertise
31
- - Tight timeline
32
-
33
- **AWS Migration:**
34
- ```hcl
35
- # AWS Application Migration Service (MGN)
36
- resource "aws_mgn_replication_configuration_template" "default" {
37
- associate_default_security_group = false
38
- bandwidth_throttling = 0
39
- create_public_ip = false
40
- data_plane_routing = "PRIVATE_IP"
41
- default_large_staging_disk_type = "GP3"
42
- ebs_encryption = "DEFAULT"
43
- replication_server_instance_type = "t3.small"
44
- replication_servers_security_groups_ids = [aws_security_group.replication.id]
45
- staging_area_subnet_id = aws_subnet.private[0].id
46
- staging_area_tags = {
47
- Environment = "migration"
48
- }
49
- use_dedicated_replication_server = false
50
- }
51
-
52
- # Launch template for migrated instances
53
- resource "aws_launch_template" "migrated_app" {
54
- name = "migrated-app-template"
55
-
56
- block_device_mappings {
57
- device_name = "/dev/sda1"
58
-
59
- ebs {
60
- volume_size = 100
61
- volume_type = "gp3"
62
- encrypted = true
63
- kms_key_id = aws_kms_key.main.arn
64
- delete_on_termination = true
65
- }
66
- }
67
-
68
- iam_instance_profile {
69
- arn = aws_iam_instance_profile.app.arn
70
- }
71
-
72
- network_interfaces {
73
- associate_public_ip_address = false
74
- security_groups = [aws_security_group.app.id]
75
- subnet_id = aws_subnet.private_app[0].id
76
- }
77
-
78
- tag_specifications {
79
- resource_type = "instance"
80
- tags = {
81
- Name = "migrated-app"
82
- Environment = "production"
83
- Migration = "rehost"
84
- }
85
- }
86
-
87
- user_data = base64encode(<<-EOF
88
- #!/bin/bash
89
- # Post-migration configuration
90
- systemctl enable cloudwatch-agent
91
- systemctl start cloudwatch-agent
92
- EOF
93
- )
94
- }
95
- ```
96
-
97
- **Azure Migrate:**
98
- ```hcl
99
- resource "azurerm_site_recovery_replication_policy" "main" {
100
- name = "migration-policy"
101
- resource_group_name = azurerm_resource_group.recovery.name
102
- recovery_vault_name = azurerm_recovery_services_vault.main.name
103
- recovery_point_retention_in_minutes = 24 * 60
104
- application_consistent_snapshot_frequency_in_minutes = 4 * 60
105
- }
106
-
107
- resource "azurerm_site_recovery_protection_container_mapping" "main" {
108
- name = "migration-mapping"
109
- resource_group_name = azurerm_resource_group.recovery.name
110
- recovery_vault_name = azurerm_recovery_services_vault.main.name
111
- recovery_fabric_name = azurerm_site_recovery_fabric.primary.name
112
- recovery_source_protection_container_name = azurerm_site_recovery_protection_container.primary.name
113
- recovery_target_protection_container_id = azurerm_site_recovery_protection_container.secondary.id
114
- recovery_replication_policy_id = azurerm_site_recovery_replication_policy.main.id
115
- }
116
- ```
117
-
118
- ### 2. Replatform (Lift, Tinker, and Shift)
119
-
120
- **When to Use:**
121
- - Want cloud benefits without full refactoring
122
- - Database migrations to managed services
123
- - Minor optimizations acceptable
124
- - Balance between speed and benefit
125
-
126
- **Database Migration Example:**
127
- ```hcl
128
- # AWS Database Migration Service
129
- resource "aws_dms_replication_instance" "main" {
130
- replication_instance_id = "db-migration-instance"
131
- replication_instance_class = "dms.c5.xlarge"
132
- allocated_storage = 100
133
- vpc_security_group_ids = [aws_security_group.dms.id]
134
- replication_subnet_group_id = aws_dms_replication_subnet_group.main.id
135
- publicly_accessible = false
136
- multi_az = true
137
-
138
- tags = {
139
- Name = "database-migration"
140
- }
141
- }
142
-
143
- # Source endpoint (on-premises PostgreSQL)
144
- resource "aws_dms_endpoint" "source" {
145
- endpoint_id = "source-postgres"
146
- endpoint_type = "source"
147
- engine_name = "postgres"
148
- server_name = var.onprem_db_host
149
- port = 5432
150
- database_name = "production"
151
- username = var.db_username
152
- password = var.db_password
153
- ssl_mode = "require"
154
-
155
- tags = {
156
- Name = "source-database"
157
- }
158
- }
159
-
160
- # Target endpoint (RDS)
161
- resource "aws_dms_endpoint" "target" {
162
- endpoint_id = "target-rds"
163
- endpoint_type = "target"
164
- engine_name = "postgres"
165
- server_name = aws_db_instance.main.address
166
- port = 5432
167
- database_name = "production"
168
- username = var.rds_username
169
- password = var.rds_password
170
- ssl_mode = "require"
171
-
172
- tags = {
173
- Name = "target-database"
174
- }
175
- }
176
-
177
- # Migration task
178
- resource "aws_dms_replication_task" "main" {
179
- migration_type = "full-load-and-cdc"
180
- replication_instance_arn = aws_dms_replication_instance.main.replication_instance_arn
181
- replication_task_id = "postgres-migration"
182
- source_endpoint_arn = aws_dms_endpoint.source.endpoint_arn
183
- target_endpoint_arn = aws_dms_endpoint.target.endpoint_arn
184
- table_mappings = jsonencode({
185
- rules = [
186
- {
187
- rule-type = "selection"
188
- rule-id = "1"
189
- rule-name = "1"
190
- object-locator = {
191
- schema-name = "public"
192
- table-name = "%"
193
- }
194
- rule-action = "include"
195
- }
196
- ]
197
- })
198
-
199
- tags = {
200
- Name = "postgres-migration-task"
201
- }
202
- }
203
-
204
- # Target RDS instance
205
- resource "aws_db_instance" "main" {
206
- identifier = "migrated-database"
207
- engine = "postgres"
208
- engine_version = "14.7"
209
- instance_class = "db.r6g.xlarge"
210
-
211
- allocated_storage = 100
212
- storage_type = "gp3"
213
- storage_encrypted = true
214
- kms_key_id = aws_kms_key.rds.arn
215
-
216
- db_name = "production"
217
- username = var.rds_username
218
- password = var.rds_password
219
-
220
- multi_az = true
221
- db_subnet_group_name = aws_db_subnet_group.main.name
222
- vpc_security_group_ids = [aws_security_group.rds.id]
223
-
224
- backup_retention_period = 7
225
- backup_window = "03:00-04:00"
226
- maintenance_window = "sun:04:00-sun:05:00"
227
-
228
- enabled_cloudwatch_logs_exports = ["postgresql", "upgrade"]
229
-
230
- tags = {
231
- Name = "migrated-database"
232
- Migration = "replatform"
233
- }
234
- }
235
- ```
236
-
237
- ### 3. Refactor (Re-architect)
238
-
239
- **When to Use:**
240
- - Modernize applications
241
- - Need cloud-native features
242
- - Improve scalability and resilience
243
- - Long-term investment
244
-
245
- **Monolith to Microservices:**
246
- ```hcl
247
- # ECS Cluster for microservices
248
- resource "aws_ecs_cluster" "main" {
249
- name = "microservices-cluster"
250
-
251
- setting {
252
- name = "containerInsights"
253
- value = "enabled"
254
- }
255
-
256
- configuration {
257
- execute_command_configuration {
258
- logging = "OVERRIDE"
259
-
260
- log_configuration {
261
- cloud_watch_log_group_name = aws_cloudwatch_log_group.ecs.name
262
- }
263
- }
264
- }
265
- }
266
-
267
- # Service Discovery
268
- resource "aws_service_discovery_private_dns_namespace" "main" {
269
- name = "services.local"
270
- vpc = aws_vpc.main.id
271
- }
272
-
273
- # Microservice: User Service
274
- module "user_service" {
275
- source = "./modules/microservice"
276
-
277
- name = "user-service"
278
- cluster_id = aws_ecs_cluster.main.id
279
- image = "user-service:latest"
280
- cpu = 512
281
- memory = 1024
282
- desired_count = 3
283
-
284
- environment = [
285
- {
286
- name = "DB_HOST"
287
- value = aws_db_instance.users.endpoint
288
- }
289
- ]
290
-
291
- secrets = [
292
- {
293
- name = "DB_PASSWORD"
294
- valueFrom = aws_secretsmanager_secret.user_db_password.arn
295
- }
296
- ]
297
-
298
- service_discovery_namespace_id = aws_service_discovery_private_dns_namespace.main.id
299
- vpc_id = aws_vpc.main.id
300
- subnet_ids = aws_subnet.private_app[*].id
301
- security_group_ids = [aws_security_group.user_service.id]
302
- }
303
-
304
- # API Gateway for microservices
305
- resource "aws_api_gateway_rest_api" "main" {
306
- name = "microservices-api"
307
- description = "API Gateway for microservices"
308
-
309
- endpoint_configuration {
310
- types = ["REGIONAL"]
311
- }
312
- }
313
-
314
- # VPC Link for private integration
315
- resource "aws_api_gateway_vpc_link" "main" {
316
- name = "microservices-vpc-link"
317
- target_arns = [aws_lb.internal.arn]
318
- }
319
- ```
320
-
321
- **Serverless Refactor:**
322
- ```yaml
323
- # AWS SAM template for serverless migration
324
- AWSTemplateFormatVersion: '2010-09-09'
325
- Transform: AWS::Serverless-2016-10-31
326
-
327
- Globals:
328
- Function:
329
- Runtime: python3.11
330
- Timeout: 30
331
- MemorySize: 256
332
- Environment:
333
- Variables:
334
- TABLE_NAME: !Ref DynamoDBTable
335
- QUEUE_URL: !Ref ProcessingQueue
336
-
337
- Resources:
338
- # API Gateway
339
- ApiGateway:
340
- Type: AWS::Serverless::Api
341
- Properties:
342
- StageName: prod
343
- Auth:
344
- DefaultAuthorizer: CognitoAuthorizer
345
- Authorizers:
346
- CognitoAuthorizer:
347
- UserPoolArn: !GetAtt UserPool.Arn
348
-
349
- # Lambda: API Handler
350
- ApiFunction:
351
- Type: AWS::Serverless::Function
352
- Properties:
353
- CodeUri: functions/api/
354
- Handler: app.handler
355
- Events:
356
- GetResource:
357
- Type: Api
358
- Properties:
359
- RestApiId: !Ref ApiGateway
360
- Path: /resources/{id}
361
- Method: GET
362
- Policies:
363
- - DynamoDBReadPolicy:
364
- TableName: !Ref DynamoDBTable
365
-
366
- # Lambda: Async Processing
367
- ProcessorFunction:
368
- Type: AWS::Serverless::Function
369
- Properties:
370
- CodeUri: functions/processor/
371
- Handler: app.handler
372
- Events:
373
- SQSEvent:
374
- Type: SQS
375
- Properties:
376
- Queue: !GetAtt ProcessingQueue.Arn
377
- BatchSize: 10
378
- Policies:
379
- - DynamoDBCrudPolicy:
380
- TableName: !Ref DynamoDBTable
381
- - S3CrudPolicy:
382
- BucketName: !Ref DataBucket
383
-
384
- # DynamoDB Table
385
- DynamoDBTable:
386
- Type: AWS::DynamoDB::Table
387
- Properties:
388
- BillingMode: PAY_PER_REQUEST
389
- AttributeDefinitions:
390
- - AttributeName: id
391
- AttributeType: S
392
- KeySchema:
393
- - AttributeName: id
394
- KeyType: HASH
395
- StreamSpecification:
396
- StreamViewType: NEW_AND_OLD_IMAGES
397
-
398
- # SQS Queue
399
- ProcessingQueue:
400
- Type: AWS::SQS::Queue
401
- Properties:
402
- VisibilityTimeout: 180
403
- MessageRetentionPeriod: 1209600
404
- RedrivePolicy:
405
- deadLetterTargetArn: !GetAtt DeadLetterQueue.Arn
406
- maxReceiveCount: 3
407
-
408
- DeadLetterQueue:
409
- Type: AWS::SQS::Queue
410
- Properties:
411
- MessageRetentionPeriod: 1209600
412
- ```
413
-
414
- ### 4. Repurchase (Drop and Shop)
415
-
416
- **When to Use:**
417
- - Moving to SaaS solutions
418
- - Legacy system replacement
419
- - Cost-effective alternative exists
420
- - Avoid maintaining custom software
421
-
422
- **Migration to SaaS:**
423
- ```
424
- On-Premises CRM → Salesforce
425
- Self-hosted Email → Office 365 / Google Workspace
426
- Custom HR System → Workday
427
- On-prem Analytics → Snowflake / Databricks
428
- ```
429
-
430
- ### 5. Retire
431
-
432
- **Decommission unused applications:**
433
- ```bash
434
- #!/bin/bash
435
- # Application retirement checklist
436
-
437
- # 1. Identify unused applications
438
- echo "Analyzing application usage..."
439
- aws cloudwatch get-metric-statistics \
440
- --namespace AWS/ApplicationELB \
441
- --metric-name RequestCount \
442
- --dimensions Name=LoadBalancer,Value=app-alb \
443
- --start-time $(date -u -d '30 days ago' +%Y-%m-%dT%H:%M:%S) \
444
- --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \
445
- --period 86400 \
446
- --statistics Sum
447
-
448
- # 2. Archive data if needed
449
- echo "Archiving application data..."
450
- aws s3 sync s3://app-bucket/ s3://archive-bucket/app-$(date +%Y%m%d)/ \
451
- --storage-class GLACIER_DEEP_ARCHIVE
452
-
453
- # 3. Document retirement
454
- echo "Creating retirement documentation..."
455
- cat > retirement-report.md <<EOF
456
- # Application Retirement: Legacy App
457
-
458
- **Date:** $(date)
459
- **Reason:** No usage in 90 days
460
- **Data Archived:** s3://archive-bucket/app-$(date +%Y%m%d)/
461
- **Annual Savings:** \$50,000
462
-
463
- ## Decommissioned Resources:
464
- - EC2 instances: 5
465
- - RDS database: 1
466
- - S3 buckets: 3
467
- - Load balancer: 1
468
- EOF
469
-
470
- # 4. Shutdown resources
471
- echo "Shutting down resources..."
472
- # (Would use Terraform destroy in practice)
473
- ```
474
-
475
- ### 6. Retain
476
-
477
- **Reasons to retain on-premises:**
478
- - Regulatory requirements
479
- - Data sovereignty
480
- - Performance-sensitive applications
481
- - Migration not yet justified
482
-
483
- ## Migration Assessment
484
-
485
- ### Discovery and Assessment
486
-
487
- **AWS Migration Hub:**
488
- ```hcl
489
- # Migration Hub configuration
490
- resource "aws_migrationhub_home_region_control" "main" {
491
- home_region = "us-east-1"
492
- }
493
-
494
- # Discovery connector
495
- data "aws_ssm_parameter" "discovery_agent" {
496
- name = "/aws/service/migration-hub/discovery-agent/latest/linux/amd64"
497
- }
498
-
499
- # Application groups
500
- resource "aws_applicationinsights_application" "main" {
501
- resource_group_name = aws_resourcegroups_group.migration.name
502
- auto_config_enabled = true
503
- }
504
-
505
- resource "aws_resourcegroups_group" "migration" {
506
- name = "migration-wave-1"
507
-
508
- resource_query {
509
- query = jsonencode({
510
- ResourceTypeFilters = ["AWS::EC2::Instance", "AWS::RDS::DBInstance"]
511
- TagFilters = [
512
- {
513
- Key = "MigrationWave"
514
- Values = ["1"]
515
- }
516
- ]
517
- })
518
- }
519
- }
520
- ```
521
-
522
- **Assessment Script:**
523
- ```python
524
- #!/usr/bin/env python3
525
- """
526
- Cloud migration assessment tool
527
- Analyzes on-premises infrastructure for cloud readiness
528
- """
529
-
530
- import json
531
- from typing import Dict, List
532
-
533
- class MigrationAssessment:
534
- def __init__(self):
535
- self.inventory = []
536
- self.recommendations = []
537
-
538
- def assess_application(self, app_config: Dict) -> Dict:
539
- """Assess application for migration strategy"""
540
-
541
- assessment = {
542
- 'name': app_config['name'],
543
- 'current_state': app_config['infrastructure'],
544
- 'recommended_strategy': None,
545
- 'target_services': [],
546
- 'estimated_cost': 0,
547
- 'complexity': 'medium',
548
- 'migration_time': '3-6 months'
549
- }
550
-
551
- # Assess based on criteria
552
- if app_config.get('custom_code', False):
553
- if app_config.get('cloud_native_compatible', False):
554
- assessment['recommended_strategy'] = 'refactor'
555
- assessment['target_services'] = [
556
- 'ECS Fargate',
557
- 'RDS',
558
- 'ElastiCache'
559
- ]
560
- assessment['complexity'] = 'high'
561
- else:
562
- assessment['recommended_strategy'] = 'rehost'
563
- assessment['target_services'] = ['EC2', 'EBS']
564
- assessment['complexity'] = 'low'
565
- else:
566
- assessment['recommended_strategy'] = 'repurchase'
567
- assessment['target_services'] = ['SaaS alternative']
568
-
569
- # Calculate costs
570
- assessment['estimated_cost'] = self._estimate_cost(
571
- assessment['target_services'],
572
- app_config.get('usage_pattern', {})
573
- )
574
-
575
- return assessment
576
-
577
- def _estimate_cost(self, services: List[str], usage: Dict) -> float:
578
- """Estimate monthly cloud cost"""
579
- cost_map = {
580
- 'EC2': 100,
581
- 'ECS Fargate': 150,
582
- 'RDS': 200,
583
- 'ElastiCache': 50,
584
- 'Lambda': 20
585
- }
586
-
587
- total = sum(cost_map.get(svc, 0) for svc in services)
588
- return total * usage.get('multiplier', 1.0)
589
-
590
- def generate_migration_plan(self) -> Dict:
591
- """Generate phased migration plan"""
592
- return {
593
- 'phases': [
594
- {
595
- 'name': 'Wave 1: Low-risk Applications',
596
- 'strategy': 'rehost',
597
- 'duration': '1-2 months',
598
- 'applications': ['static-website', 'internal-tools']
599
- },
600
- {
601
- 'name': 'Wave 2: Databases',
602
- 'strategy': 'replatform',
603
- 'duration': '2-3 months',
604
- 'applications': ['customer-db', 'analytics-db']
605
- },
606
- {
607
- 'name': 'Wave 3: Core Applications',
608
- 'strategy': 'refactor',
609
- 'duration': '6-9 months',
610
- 'applications': ['api-service', 'web-app']
611
- }
612
- ],
613
- 'total_duration': '9-14 months',
614
- 'estimated_cost': 500000
615
- }
616
-
617
- # Example usage
618
- if __name__ == '__main__':
619
- assessment = MigrationAssessment()
620
-
621
- app = {
622
- 'name': 'Customer Portal',
623
- 'infrastructure': {
624
- 'servers': 5,
625
- 'databases': 2,
626
- 'storage_tb': 10
627
- },
628
- 'custom_code': True,
629
- 'cloud_native_compatible': True,
630
- 'usage_pattern': {'multiplier': 1.5}
631
- }
632
-
633
- result = assessment.assess_application(app)
634
- print(json.dumps(result, indent=2))
635
-
636
- plan = assessment.generate_migration_plan()
637
- print(json.dumps(plan, indent=2))
638
- ```
639
-
640
- ## Cutover Planning
641
-
642
- ### Zero-Downtime Migration
643
-
644
- **Blue-Green Deployment:**
645
- ```hcl
646
- # Route 53 weighted routing for cutover
647
- resource "aws_route53_record" "app" {
648
- zone_id = aws_route53_zone.main.zone_id
649
- name = "app.example.com"
650
- type = "A"
651
-
652
- weighted_routing_policy {
653
- weight = var.blue_weight # Start: 100, End: 0
654
- }
655
-
656
- set_identifier = "blue-environment"
657
-
658
- alias {
659
- name = aws_lb.blue.dns_name
660
- zone_id = aws_lb.blue.zone_id
661
- evaluate_target_health = true
662
- }
663
- }
664
-
665
- resource "aws_route53_record" "app_green" {
666
- zone_id = aws_route53_zone.main.zone_id
667
- name = "app.example.com"
668
- type = "A"
669
-
670
- weighted_routing_policy {
671
- weight = var.green_weight # Start: 0, End: 100
672
- }
673
-
674
- set_identifier = "green-environment"
675
-
676
- alias {
677
- name = aws_lb.green.dns_name
678
- zone_id = aws_lb.green.zone_id
679
- evaluate_target_health = true
680
- }
681
- }
682
- ```
683
-
684
- **Database Cutover Script:**
685
- ```bash
686
- #!/bin/bash
687
- set -euo pipefail
688
-
689
- echo "=== Database Migration Cutover ==="
690
-
691
- # 1. Final sync
692
- echo "Performing final replication sync..."
693
- aws dms start-replication-task \
694
- --replication-task-arn "$TASK_ARN" \
695
- --start-replication-task-type reload-target
696
-
697
- # 2. Monitor lag
698
- echo "Monitoring replication lag..."
699
- while true; do
700
- LAG=$(aws dms describe-replication-tasks \
701
- --filters Name=replication-task-arn,Values="$TASK_ARN" \
702
- --query 'ReplicationTasks[0].ReplicationTaskStats.ElapsedTimeMillis' \
703
- --output text)
704
-
705
- if [ "$LAG" -lt 1000 ]; then
706
- echo "Lag under 1 second, ready for cutover"
707
- break
708
- fi
709
- sleep 5
710
- done
711
-
712
- # 3. Maintenance mode
713
- echo "Enabling maintenance mode..."
714
- aws ssm send-command \
715
- --document-name "AWS-RunShellScript" \
716
- --targets "Key=tag:App,Values=legacy" \
717
- --parameters 'commands=["systemctl stop application"]'
718
-
719
- # 4. Final sync
720
- sleep 10
721
- echo "Final replication sync..."
722
- # Wait for replication to catch up
723
-
724
- # 5. Cutover DNS
725
- echo "Updating DNS to point to new environment..."
726
- aws route53 change-resource-record-sets \
727
- --hosted-zone-id "$ZONE_ID" \
728
- --change-batch file://dns-cutover.json
729
-
730
- # 6. Verify
731
- echo "Verifying new environment..."
732
- for i in {1..10}; do
733
- if curl -f https://app.example.com/health; then
734
- echo "Health check passed"
735
- break
736
- fi
737
- sleep 5
738
- done
739
-
740
- echo "=== Cutover Complete ==="
741
- ```
742
-
743
- ## Post-Migration Optimization
744
-
745
- ```hcl
746
- # Cost optimization - Reserved Instances
747
- resource "aws_ec2_capacity_reservation" "main" {
748
- instance_type = "m5.xlarge"
749
- instance_platform = "Linux/UNIX"
750
- availability_zone = "us-east-1a"
751
- instance_count = 10
752
-
753
- tags = {
754
- Name = "app-capacity-reservation"
755
- }
756
- }
757
-
758
- # Right-sizing based on CloudWatch metrics
759
- resource "aws_autoscaling_policy" "scale_down" {
760
- name = "scale-down"
761
- scaling_adjustment = -1
762
- adjustment_type = "ChangeInCapacity"
763
- cooldown = 300
764
- autoscaling_group_name = aws_autoscaling_group.main.name
765
- }
766
-
767
- resource "aws_cloudwatch_metric_alarm" "cpu_low" {
768
- alarm_name = "cpu-utilization-low"
769
- comparison_operator = "LessThanThreshold"
770
- evaluation_periods = "2"
771
- metric_name = "CPUUtilization"
772
- namespace = "AWS/EC2"
773
- period = "300"
774
- statistic = "Average"
775
- threshold = "20"
776
-
777
- dimensions = {
778
- AutoScalingGroupName = aws_autoscaling_group.main.name
779
- }
780
-
781
- alarm_actions = [aws_autoscaling_policy.scale_down.arn]
782
- }
783
- ```
784
-
785
- ## Best Practices
786
-
787
- 1. **Assessment:**
788
- - Comprehensive discovery
789
- - Identify dependencies
790
- - Assess technical debt
791
- - Calculate TCO
792
-
793
- 2. **Planning:**
794
- - Phased approach (waves)
795
- - Pilot migrations first
796
- - Define success criteria
797
- - Plan rollback strategy
798
-
799
- 3. **Execution:**
800
- - Automate where possible
801
- - Test thoroughly
802
- - Monitor continuously
803
- - Document everything
804
-
805
- 4. **Optimization:**
806
- - Right-size resources
807
- - Leverage reserved capacity
808
- - Implement auto-scaling
809
- - Regular cost reviews
810
-
811
- ## Anti-Patterns
812
-
813
- - Big-bang migrations
814
- - No pilot testing
815
- - Ignoring dependencies
816
- - No rollback plan
817
- - Insufficient testing
818
- - Poor communication
819
- - No post-migration optimization
820
- - Recreating on-premises architecture in cloud