@atmem/architect 0.0.0-stage → 0.2.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 (512) hide show
  1. package/CONSTITUTION.md +144 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +6 -0
  4. package/README.md +31 -2
  5. package/agent-skills/discovery/SKILL.md +48 -0
  6. package/agent-skills/discovery/topics.json +139 -0
  7. package/agent-skills/generation-capabilities.json +760 -0
  8. package/agent-skills/service-lifecycle.json +21 -0
  9. package/agent-skills/specialists/architecture/SKILL.md +15 -0
  10. package/agent-skills/specialists/aws/SKILL.md +17 -0
  11. package/agent-skills/specialists/azure/SKILL.md +7 -0
  12. package/agent-skills/specialists/composition/SKILL.md +17 -0
  13. package/agent-skills/specialists/devops/SKILL.md +10 -0
  14. package/agent-skills/specialists/finops/SKILL.md +7 -0
  15. package/agent-skills/specialists/gcp/SKILL.md +7 -0
  16. package/agent-skills/specialists/ibm/SKILL.md +7 -0
  17. package/agent-skills/specialists/manifest.json +13 -0
  18. package/agent-skills/specialists/pulumi/SKILL.md +7 -0
  19. package/agent-skills/specialists/security/SKILL.md +7 -0
  20. package/agent-skills/specialists/terraform/SKILL.md +14 -0
  21. package/agent-skills/upstream/aws/LICENSE +175 -0
  22. package/agent-skills/upstream/aws/SKILL.md +125 -0
  23. package/agent-skills/upstream/azure/LICENSE +21 -0
  24. package/agent-skills/upstream/azure/SKILL.md +387 -0
  25. package/agent-skills/upstream/gcp/LICENSE +202 -0
  26. package/agent-skills/upstream/gcp/SKILL.md +159 -0
  27. package/agent-skills/upstream/manifest.json +57 -0
  28. package/agent-skills/upstream/pulumi/LICENSE +201 -0
  29. package/agent-skills/upstream/pulumi/SKILL.md +501 -0
  30. package/agent-skills/upstream/terraform/LICENSE +373 -0
  31. package/agent-skills/upstream/terraform/SKILL.md +316 -0
  32. package/agent-skills/workflows/workflows.json +601 -0
  33. package/cli/architect.mjs +3 -0
  34. package/cli/runtime.mjs +115 -0
  35. package/dist/assets/html2canvas.esm-QH1iLAAe.js +22 -0
  36. package/dist/assets/index-BTLHaa3J.css +1 -0
  37. package/dist/assets/index-CQ2C1gKF.js +21338 -0
  38. package/dist/assets/index.es-DTyqIdaO.js +18 -0
  39. package/dist/assets/purify.es-CAi2OJFm.js +3 -0
  40. package/dist/assets/visual-export-Ox0j5xj5.js +173 -0
  41. package/dist/favicon.svg +2 -0
  42. package/dist/fonts/DM-Sans-OFL.txt +93 -0
  43. package/dist/fonts/Manrope-OFL.txt +93 -0
  44. package/dist/fonts/NotoSans-Regular.ttf +0 -0
  45. package/dist/fonts/OFL.txt +94 -0
  46. package/dist/fonts/dm-sans-latin-wght-normal.woff2 +0 -0
  47. package/dist/fonts/manrope-latin-wght-normal.woff2 +0 -0
  48. package/dist/index.html +4 -0
  49. package/dist/licenses/atmem-APACHE-2.0.txt +202 -0
  50. package/dist/licenses/aws-architect-LICENSE.txt +17 -0
  51. package/dist/licenses/aws-mcp-LICENSE.txt +175 -0
  52. package/dist/licenses/aws-mcp-NOTICE.txt +1 -0
  53. package/dist/licenses/cloud-emulation-notices.txt +36619 -0
  54. package/dist/licenses/dependency-notices.txt +6379 -0
  55. package/dist/licenses/emulation-notices.txt +717 -0
  56. package/dist/licenses/github-copilot-sdk-LICENSE.txt +21 -0
  57. package/dist/licenses/memory-dependency-notices.txt +3319 -0
  58. package/dist/licenses/openarchflow-LICENSE.txt +21 -0
  59. package/dist/licenses/python-dependency-notices.txt +11951 -0
  60. package/docs/upstream-lock.json +26 -0
  61. package/knowledge/engineering-practices.json +536 -0
  62. package/package.json +30 -4
  63. package/packaging/uv-release-lock.json +54 -0
  64. package/public/licenses/atmem-APACHE-2.0.txt +202 -0
  65. package/public/licenses/aws-architect-LICENSE.txt +17 -0
  66. package/public/licenses/aws-mcp-LICENSE.txt +175 -0
  67. package/public/licenses/aws-mcp-NOTICE.txt +1 -0
  68. package/public/licenses/cloud-emulation-notices.txt +36619 -0
  69. package/public/licenses/dependency-notices.txt +6379 -0
  70. package/public/licenses/emulation-notices.txt +717 -0
  71. package/public/licenses/github-copilot-sdk-LICENSE.txt +21 -0
  72. package/public/licenses/memory-dependency-notices.txt +3319 -0
  73. package/public/licenses/openarchflow-LICENSE.txt +21 -0
  74. package/public/licenses/python-dependency-notices.txt +11951 -0
  75. package/scripts/terraform-render.mjs +8 -0
  76. package/server/__init__.py +0 -0
  77. package/server/abstraction.py +28 -0
  78. package/server/agent_runtime.py +153 -0
  79. package/server/app.py +257 -0
  80. package/server/architect.py +112 -0
  81. package/server/architecture_activity.py +67 -0
  82. package/server/attachments.py +101 -0
  83. package/server/cloud-emulation-requirements.txt +29 -0
  84. package/server/codex_app_server.py +219 -0
  85. package/server/codex_engineering_backend.py +266 -0
  86. package/server/codex_worker_policy.py +193 -0
  87. package/server/contracts.py +315 -0
  88. package/server/copilot_worker.py +16 -0
  89. package/server/dependency_mirror.py +54 -0
  90. package/server/design_patch.py +43 -0
  91. package/server/emulation-requirements.txt +8 -0
  92. package/server/emulation_adapters.py +20 -0
  93. package/server/emulation_routes.py +98 -0
  94. package/server/emulation_worker.py +351 -0
  95. package/server/engineering_artifacts.py +221 -0
  96. package/server/engineering_assets/application-runtime.json +4372 -0
  97. package/server/engineering_assets/architecture_work.schema.json +79 -0
  98. package/server/engineering_assets/materialize_runtime.py +62 -0
  99. package/server/engineering_assets/prepare_tools.py +96 -0
  100. package/server/engineering_assets/sql_validation.py +59 -0
  101. package/server/engineering_contexts.py +120 -0
  102. package/server/engineering_delivery.py +210 -0
  103. package/server/engineering_finalization.py +210 -0
  104. package/server/engineering_handoff.py +172 -0
  105. package/server/engineering_jobs.py +206 -0
  106. package/server/engineering_knowledge.py +75 -0
  107. package/server/engineering_reconciliation.py +159 -0
  108. package/server/engineering_routes.py +483 -0
  109. package/server/engineering_sessions.py +273 -0
  110. package/server/engineering_tools.py +166 -0
  111. package/server/generation_lint.py +18 -0
  112. package/server/local_providers.py +185 -0
  113. package/server/local_validation.py +236 -0
  114. package/server/memory-requirements.lock +181 -0
  115. package/server/memory-requirements.txt +6 -0
  116. package/server/memory_context.py +58 -0
  117. package/server/memory_routes.py +141 -0
  118. package/server/memory_service.py +306 -0
  119. package/server/memory_worker.py +129 -0
  120. package/server/openai_voice.py +80 -0
  121. package/server/orca_handoff.py +90 -0
  122. package/server/packaged_app.py +9 -0
  123. package/server/pricing.py +190 -0
  124. package/server/process_control_observation.py +31 -0
  125. package/server/prompts.py +136 -0
  126. package/server/public_faq_emulation_worker.py +44 -0
  127. package/server/requirements.lock +1618 -0
  128. package/server/requirements.txt +68 -0
  129. package/server/runtime_dependency_locks.py +27 -0
  130. package/server/runtime_evidence.py +93 -0
  131. package/server/settings.py +14 -0
  132. package/server/skills.py +103 -0
  133. package/server/storage_emulation_worker.py +160 -0
  134. package/server/structured_emulation_worker.py +48 -0
  135. package/server/terraform_routes.py +118 -0
  136. package/server/upstream/__init__.py +0 -0
  137. package/server/upstream/agent/__init__.py +1 -0
  138. package/server/upstream/agent/aws_architect.py +600 -0
  139. package/server/upstream/agent/config/__init__.py +1 -0
  140. package/server/upstream/agent/config/agent_config.py +82 -0
  141. package/server/upstream/agent/config/prompts.py +138 -0
  142. package/server/upstream/agent/rate_limiter.py +62 -0
  143. package/server/upstream/utils/__init__.py +1 -0
  144. package/server/upstream/utils/file_writer.py +43 -0
  145. package/server/validation_applicability.py +85 -0
  146. package/server/validation_jobs.py +252 -0
  147. package/server/validation_workers.py +48 -0
  148. package/server/voice_routes.py +91 -0
  149. package/server/voice_worker.py +26 -0
  150. package/server/windows_snapshot.py +119 -0
  151. package/specs/028-convergence-evaluation/evidence/20261110-ibm-invoice-native/registry-structured/qualification.json +72 -0
  152. package/specs/028-convergence-evaluation/evidence/20261110-invoice-runtime/durable-current/receipt.json +61 -0
  153. package/specs/029-general-purpose-engine/evidence/20261111-runtime-dependencies/sdk/receipt.json +22 -0
  154. package/src/ArchitectureActivity.jsx +54 -0
  155. package/src/ArchitectureWorkPanel.jsx +39 -0
  156. package/src/ArtifactChecks.jsx +49 -0
  157. package/src/BlockRequirements.jsx +13 -0
  158. package/src/BrainActivity.jsx +11 -0
  159. package/src/ChatMessage.jsx +29 -0
  160. package/src/ChatResizeHandle.jsx +6 -0
  161. package/src/CodePreview.jsx +8 -0
  162. package/src/ComponentReview.jsx +31 -0
  163. package/src/DeliveryViews.jsx +59 -0
  164. package/src/EmulationPanel.jsx +44 -0
  165. package/src/EngagementViews.jsx +387 -0
  166. package/src/EngineeringPanel.jsx +151 -0
  167. package/src/FileTree.jsx +7 -0
  168. package/src/FinalChecklist.jsx +15 -0
  169. package/src/HelpNote.jsx +3 -0
  170. package/src/ImplementationDelivery.jsx +91 -0
  171. package/src/JourneyViews.jsx +403 -0
  172. package/src/LocationChoices.jsx +12 -0
  173. package/src/MemoryPanel.jsx +58 -0
  174. package/src/OpenAIVoicePanel.jsx +66 -0
  175. package/src/OutputsView.jsx +71 -0
  176. package/src/ProjectChecks.jsx +44 -0
  177. package/src/TerraformView.jsx +57 -0
  178. package/src/WorkbenchDialogs.jsx +532 -0
  179. package/src/activity-presentation.mjs +28 -0
  180. package/src/ai-qualification-scenarios.mjs +31 -0
  181. package/src/approval-application-files.mjs +32 -0
  182. package/src/approval-applications.mjs +82 -0
  183. package/src/approval-spec-kit.mjs +30 -0
  184. package/src/architecture-activity.css +28 -0
  185. package/src/architecture-activity.mjs +63 -0
  186. package/src/architecture-work.mjs +176 -0
  187. package/src/artifact-work.mjs +103 -0
  188. package/src/async-documents.mjs +191 -0
  189. package/src/atflow.css +1140 -0
  190. package/src/atforma.css +748 -0
  191. package/src/atmem-tokens.css +79 -0
  192. package/src/aws-preflight.mjs +60 -0
  193. package/src/aws-public-faq.mjs +102 -0
  194. package/src/aws-validation-scenarios.mjs +10 -0
  195. package/src/aws-validation.mjs +48 -0
  196. package/src/azure-plan-mocks.mjs +25 -0
  197. package/src/azure-structured.mjs +133 -0
  198. package/src/bedrock-summary.mjs +152 -0
  199. package/src/bounded-rag.mjs +60 -0
  200. package/src/brand.css +9 -0
  201. package/src/canvas-view.mjs +28 -0
  202. package/src/capability-composition.mjs +44 -0
  203. package/src/chat-attachments.mjs +13 -0
  204. package/src/cloud-provider-locks.mjs +9 -0
  205. package/src/cloud-storage-scenarios.mjs +2 -0
  206. package/src/component-review.mjs +55 -0
  207. package/src/composition-spec-kit.mjs +30 -0
  208. package/src/consultation-context.mjs +15 -0
  209. package/src/consultation.mjs +52 -0
  210. package/src/container-contracts.mjs +5 -0
  211. package/src/container-inspection.mjs +75 -0
  212. package/src/container-runtime.mjs +30 -0
  213. package/src/container-security-inspection.mjs +49 -0
  214. package/src/container-terraform.mjs +109 -0
  215. package/src/conversation.mjs +18 -0
  216. package/src/core.mjs +863 -0
  217. package/src/cross-cloud-storage.mjs +100 -0
  218. package/src/delivery-capabilities.mjs +25 -0
  219. package/src/delivery.mjs +58 -0
  220. package/src/deployment-ownership.mjs +10 -0
  221. package/src/deployment-region.mjs +11 -0
  222. package/src/derive.mjs +31 -0
  223. package/src/design-build-flow.mjs +10 -0
  224. package/src/diagram-attention.mjs +24 -0
  225. package/src/discovery.mjs +359 -0
  226. package/src/document.mjs +170 -0
  227. package/src/emulation-feedback.mjs +61 -0
  228. package/src/emulation-guidance.mjs +37 -0
  229. package/src/engagement.mjs +274 -0
  230. package/src/engineering-client.mjs +73 -0
  231. package/src/engineering-defaults.mjs +17 -0
  232. package/src/engineering.css +31 -0
  233. package/src/enterprise-application.mjs +76 -0
  234. package/src/enterprise-aws-host-infrastructure.mjs +62 -0
  235. package/src/enterprise-aws-host-tests.mjs +15 -0
  236. package/src/enterprise-aws-infrastructure-tests.mjs +38 -0
  237. package/src/enterprise-aws-infrastructure.mjs +138 -0
  238. package/src/enterprise-google-infrastructure.mjs +84 -0
  239. package/src/enterprise-google-tests.mjs +25 -0
  240. package/src/estimate.mjs +190 -0
  241. package/src/existing-references.mjs +18 -0
  242. package/src/external-identities.mjs +17 -0
  243. package/src/faq-lambda-build.mjs +28 -0
  244. package/src/final-package.mjs +34 -0
  245. package/src/gcp-structured.mjs +104 -0
  246. package/src/generation-provider.mjs +7 -0
  247. package/src/generation-quality.mjs +69 -0
  248. package/src/handoff.mjs +141 -0
  249. package/src/ibm-registry.mjs +12 -0
  250. package/src/ibm-structured.mjs +103 -0
  251. package/src/identifiers.mjs +15 -0
  252. package/src/implementation-map.mjs +14 -0
  253. package/src/implementation-outcome.mjs +8 -0
  254. package/src/incomplete-terraform.mjs +9 -0
  255. package/src/integrations.ts +137 -0
  256. package/src/interface-contracts.mjs +30 -0
  257. package/src/invoice-application.mjs +66 -0
  258. package/src/invoice-aws-operations.mjs +136 -0
  259. package/src/invoice-aws.mjs +143 -0
  260. package/src/invoice-azure-operations.mjs +147 -0
  261. package/src/invoice-azure.mjs +134 -0
  262. package/src/invoice-builder.mjs +35 -0
  263. package/src/invoice-dependencies.mjs +43 -0
  264. package/src/invoice-gcp-operations.mjs +178 -0
  265. package/src/invoice-gcp.mjs +104 -0
  266. package/src/invoice-ibm-operations.mjs +278 -0
  267. package/src/invoice-ibm.mjs +142 -0
  268. package/src/invoice-operations.mjs +143 -0
  269. package/src/invoice-plan.mjs +45 -0
  270. package/src/invoice-region.mjs +6 -0
  271. package/src/invoice-spec-kit.mjs +61 -0
  272. package/src/invoice-state.mjs +7 -0
  273. package/src/invoice-terraform.mjs +29 -0
  274. package/src/invoice-tests.mjs +122 -0
  275. package/src/journey-workspace.css +106 -0
  276. package/src/journey.mjs +97 -0
  277. package/src/levels.mjs +145 -0
  278. package/src/local-agent.mjs +184 -0
  279. package/src/main.jsx +2481 -0
  280. package/src/model-policy-preflight.mjs +34 -0
  281. package/src/openai-voice.mjs +102 -0
  282. package/src/output-bundle.mjs +13 -0
  283. package/src/ownership-inspection.mjs +28 -0
  284. package/src/pack.mjs +201 -0
  285. package/src/pricing.mjs +85 -0
  286. package/src/production-state.mjs +8 -0
  287. package/src/project-copy.mjs +10 -0
  288. package/src/project-file.mjs +160 -0
  289. package/src/project-links.mjs +3 -0
  290. package/src/protected-state.mjs +43 -0
  291. package/src/public-faq-builder.mjs +19 -0
  292. package/src/public-faq-clouds.mjs +251 -0
  293. package/src/public-faq.mjs +122 -0
  294. package/src/pulumi.mjs +123 -0
  295. package/src/python-container.mjs +25 -0
  296. package/src/python-runtime.mjs +50 -0
  297. package/src/rag-handler.mjs +43 -0
  298. package/src/rag-web-assets.mjs +52 -0
  299. package/src/rag-web.mjs +68 -0
  300. package/src/records.mjs +177 -0
  301. package/src/resources.mjs +163 -0
  302. package/src/review.mjs +252 -0
  303. package/src/runtime/EnterpriseDocument.java +89 -0
  304. package/src/runtime/approved_http_destination.py +72 -0
  305. package/src/runtime/aws-lambda-qualification-lock.json +7 -0
  306. package/src/runtime/aws-python-lock.json +82 -0
  307. package/src/runtime/aws-web-python-lock.json +887 -0
  308. package/src/runtime/aws_json_model.py +42 -0
  309. package/src/runtime/azure-python-lock.json +863 -0
  310. package/src/runtime/azure-sources.json +8 -0
  311. package/src/runtime/azure-test-lock.json +23 -0
  312. package/src/runtime/azure_acceptance.py +192 -0
  313. package/src/runtime/azure_structured.py +153 -0
  314. package/src/runtime/bounded_rag.py +126 -0
  315. package/src/runtime/catalog_admin.py +70 -0
  316. package/src/runtime/cloud-sql-proxy-lock.json +8 -0
  317. package/src/runtime/cloud-sql-proxy-security-review.json +30 -0
  318. package/src/runtime/connector_cli.py +50 -0
  319. package/src/runtime/connector_sync.py +70 -0
  320. package/src/runtime/durable-python-lock.json +247 -0
  321. package/src/runtime/durable_workflow.py +325 -0
  322. package/src/runtime/enterprise-application-manifest.json +110 -0
  323. package/src/runtime/enterprise-application-sources.json +266 -0
  324. package/src/runtime/enterprise-auth-python-lock.json +592 -0
  325. package/src/runtime/enterprise-aws-host-bootstrap-source.json +1 -0
  326. package/src/runtime/enterprise-aws-host-probe-source.json +1 -0
  327. package/src/runtime/enterprise-aws-task-template.json +235 -0
  328. package/src/runtime/enterprise-document-lock.json +18 -0
  329. package/src/runtime/enterprise-document.Dockerfile +15 -0
  330. package/src/runtime/enterprise-runtime-aws-python-lock.json +1115 -0
  331. package/src/runtime/enterprise-runtime-azure-python-lock.json +1106 -0
  332. package/src/runtime/enterprise-runtime-gcp-python-lock.json +1060 -0
  333. package/src/runtime/enterprise-runtime-ibm-python-lock.json +1096 -0
  334. package/src/runtime/enterprise-runtime-python-lock.json +1058 -0
  335. package/src/runtime/enterprise-runtime.Dockerfile +15 -0
  336. package/src/runtime/enterprise-web-app.js +1 -0
  337. package/src/runtime/enterprise-web-entry.js +105 -0
  338. package/src/runtime/enterprise-web-lock.json +29 -0
  339. package/src/runtime/enterprise-web-notices.txt +229 -0
  340. package/src/runtime/enterprise-web.css +4 -0
  341. package/src/runtime/enterprise-web.html +8 -0
  342. package/src/runtime/enterprise_audit.py +91 -0
  343. package/src/runtime/enterprise_audit_schema.sql +25 -0
  344. package/src/runtime/enterprise_auth_schema.sql +67 -0
  345. package/src/runtime/enterprise_auth_store.py +241 -0
  346. package/src/runtime/enterprise_aws_host_bootstrap.py +120 -0
  347. package/src/runtime/enterprise_aws_host_probe.py +105 -0
  348. package/src/runtime/enterprise_aws_hosts.py +136 -0
  349. package/src/runtime/enterprise_aws_jobs.py +300 -0
  350. package/src/runtime/enterprise_aws_objects.py +93 -0
  351. package/src/runtime/enterprise_aws_transfer.py +83 -0
  352. package/src/runtime/enterprise_azure_batch_api.py +128 -0
  353. package/src/runtime/enterprise_azure_host.py +599 -0
  354. package/src/runtime/enterprise_azure_jobs.py +294 -0
  355. package/src/runtime/enterprise_azure_objects.py +234 -0
  356. package/src/runtime/enterprise_azure_pool.py +161 -0
  357. package/src/runtime/enterprise_azure_transfer.py +122 -0
  358. package/src/runtime/enterprise_configuration.py +136 -0
  359. package/src/runtime/enterprise_document.py +116 -0
  360. package/src/runtime/enterprise_document_cli.py +32 -0
  361. package/src/runtime/enterprise_document_contract.py +54 -0
  362. package/src/runtime/enterprise_document_job.py +109 -0
  363. package/src/runtime/enterprise_document_jobs.py +122 -0
  364. package/src/runtime/enterprise_document_jobs_schema.sql +23 -0
  365. package/src/runtime/enterprise_extraction_cache.py +186 -0
  366. package/src/runtime/enterprise_extraction_schema.sql +17 -0
  367. package/src/runtime/enterprise_google_jobs.py +275 -0
  368. package/src/runtime/enterprise_google_transfer.py +85 -0
  369. package/src/runtime/enterprise_http.py +212 -0
  370. package/src/runtime/enterprise_identity.py +52 -0
  371. package/src/runtime/enterprise_knowledge.py +152 -0
  372. package/src/runtime/enterprise_models.py +94 -0
  373. package/src/runtime/enterprise_native.py +181 -0
  374. package/src/runtime/enterprise_oauth.py +132 -0
  375. package/src/runtime/enterprise_operator.py +160 -0
  376. package/src/runtime/enterprise_parser_service.py +136 -0
  377. package/src/runtime/enterprise_parser_transport.py +68 -0
  378. package/src/runtime/enterprise_queries.py +255 -0
  379. package/src/runtime/enterprise_queries_schema.sql +27 -0
  380. package/src/runtime/enterprise_query_service.py +111 -0
  381. package/src/runtime/enterprise_secrets.py +110 -0
  382. package/src/runtime/enterprise_sessions.py +95 -0
  383. package/src/runtime/enterprise_sources.py +260 -0
  384. package/src/runtime/enterprise_web.py +39 -0
  385. package/src/runtime/enterprise_worker.py +68 -0
  386. package/src/runtime/export_contract_acceptance.py +18 -0
  387. package/src/runtime/faq-output-contract.json +40 -0
  388. package/src/runtime/faq-web-app.js +41 -0
  389. package/src/runtime/faq-web.css +1 -0
  390. package/src/runtime/faq-web.html +6 -0
  391. package/src/runtime/gcp-sources.json +9 -0
  392. package/src/runtime/gcp_acceptance.py +110 -0
  393. package/src/runtime/gcp_structured.py +150 -0
  394. package/src/runtime/http_acceptance.py +39 -0
  395. package/src/runtime/iap-web-app.js +36 -0
  396. package/src/runtime/iap-web-source.json +1 -0
  397. package/src/runtime/ibm-python-lock.json +856 -0
  398. package/src/runtime/ibm-sources.json +9 -0
  399. package/src/runtime/ibm_acceptance.py +133 -0
  400. package/src/runtime/ibm_structured.py +113 -0
  401. package/src/runtime/invoice-azapi-provider-lock.json +7 -0
  402. package/src/runtime/invoice-ibm-provider-lock.json +7 -0
  403. package/src/runtime/invoice-parser-lock.json +1199 -0
  404. package/src/runtime/invoice-parser-python-lock.json +56 -0
  405. package/src/runtime/invoice-parser.Dockerfile +190 -0
  406. package/src/runtime/invoice-sources.json +58 -0
  407. package/src/runtime/invoice-test-sources.json +24 -0
  408. package/src/runtime/invoice-web.css +2 -0
  409. package/src/runtime/invoice-web.html +12 -0
  410. package/src/runtime/invoice-web.js +112 -0
  411. package/src/runtime/invoice_configuration.py +17 -0
  412. package/src/runtime/invoice_document.py +95 -0
  413. package/src/runtime/invoice_extraction.py +96 -0
  414. package/src/runtime/invoice_http.py +129 -0
  415. package/src/runtime/invoice_identity.py +5 -0
  416. package/src/runtime/invoice_maintenance.py +40 -0
  417. package/src/runtime/invoice_native.py +77 -0
  418. package/src/runtime/invoice_object_store.py +153 -0
  419. package/src/runtime/invoice_operations.py +108 -0
  420. package/src/runtime/invoice_operator.py +79 -0
  421. package/src/runtime/invoice_operator_core.py +39 -0
  422. package/src/runtime/invoice_operator_job.py +147 -0
  423. package/src/runtime/invoice_parser_cli.py +17 -0
  424. package/src/runtime/invoice_parser_identity.py +39 -0
  425. package/src/runtime/invoice_parser_service.py +89 -0
  426. package/src/runtime/invoice_parser_transport.py +89 -0
  427. package/src/runtime/invoice_processing.py +24 -0
  428. package/src/runtime/invoice_retention.py +16 -0
  429. package/src/runtime/invoice_runtime_secrets.py +43 -0
  430. package/src/runtime/invoice_stage.py +80 -0
  431. package/src/runtime/invoice_web.py +39 -0
  432. package/src/runtime/invoice_worker.py +50 -0
  433. package/src/runtime/lambda_faq.py +5 -0
  434. package/src/runtime/parser-requirements.lock +4 -0
  435. package/src/runtime/policy_review.py +18 -0
  436. package/src/runtime/postgres-qualification-lock.json +21 -0
  437. package/src/runtime/public-faq-sources.json +22 -0
  438. package/src/runtime/public_catalog_admin.py +122 -0
  439. package/src/runtime/public_catalog_store.py +125 -0
  440. package/src/runtime/public_faq.py +144 -0
  441. package/src/runtime/public_faq_app.py +49 -0
  442. package/src/runtime/python-container-lock.json +18 -0
  443. package/src/runtime/rag-sources.json +10 -0
  444. package/src/runtime/rag_acceptance.py +60 -0
  445. package/src/runtime/rag_aws_adapter.py +95 -0
  446. package/src/runtime/rds-ca-source.json +9 -0
  447. package/src/runtime/rds-global-ca.pem +2888 -0
  448. package/src/runtime/state-contract-check-source.json +4 -0
  449. package/src/runtime/state_contract_check.py +338 -0
  450. package/src/runtime/structured-source.json +1 -0
  451. package/src/runtime/structured-web-app.js +71 -0
  452. package/src/runtime/structured-web-source.json +1 -0
  453. package/src/runtime/structured_http.py +105 -0
  454. package/src/runtime/structured_output.py +48 -0
  455. package/src/runtime/web-python-lock.json +802 -0
  456. package/src/runtime/web_user_admin.py +44 -0
  457. package/src/runtime/workflow_application.py +62 -0
  458. package/src/runtime/workflow_bindings.py +128 -0
  459. package/src/runtime/workflow_configuration.py +40 -0
  460. package/src/runtime/workflow_connection.py +105 -0
  461. package/src/runtime/workflow_contract.py +54 -0
  462. package/src/runtime/workflow_database.py +94 -0
  463. package/src/runtime/workflow_errors.py +6 -0
  464. package/src/runtime/workflow_http.py +178 -0
  465. package/src/runtime/workflow_identity.py +69 -0
  466. package/src/runtime/workflow_payload.py +118 -0
  467. package/src/runtime/workflow_process_stage.py +88 -0
  468. package/src/runtime/workflow_profile.py +91 -0
  469. package/src/runtime/workflow_review.py +106 -0
  470. package/src/runtime/workflow_role_bootstrap.py +104 -0
  471. package/src/runtime/workflow_schema.sql +72 -0
  472. package/src/runtime/workflow_worker.py +142 -0
  473. package/src/runtime-settings.mjs +15 -0
  474. package/src/s3-access.mjs +14 -0
  475. package/src/source-contracts.mjs +17 -0
  476. package/src/spec-kit.mjs +186 -0
  477. package/src/state-custody.mjs +32 -0
  478. package/src/state-inspection.mjs +45 -0
  479. package/src/state-spec-kit.mjs +13 -0
  480. package/src/storage-tests.mjs +25 -0
  481. package/src/structured-api.mjs +133 -0
  482. package/src/structured-contract.mjs +19 -0
  483. package/src/structured-operation-policy.mjs +2 -0
  484. package/src/structured-web.mjs +17 -0
  485. package/src/style.css +1 -0
  486. package/src/system-description.mjs +26 -0
  487. package/src/terraform-admission.mjs +66 -0
  488. package/src/terraform-composition.mjs +83 -0
  489. package/src/terraform-expressions.mjs +46 -0
  490. package/src/terraform-validation-coverage.mjs +11 -0
  491. package/src/terraform.mjs +128 -0
  492. package/src/text-statistics.mjs +51 -0
  493. package/src/upstream/openarchflow/format-payload.ts +26 -0
  494. package/src/upstream/openarchflow/import/mermaid.ts +205 -0
  495. package/src/upstream/openarchflow/import/sql-ddl.ts +109 -0
  496. package/src/upstream/openarchflow/layout.ts +54 -0
  497. package/src/upstream/openarchflow/providers/aws.ts +196 -0
  498. package/src/upstream/openarchflow/providers/azure.ts +126 -0
  499. package/src/upstream/openarchflow/providers/cloudnative.ts +71 -0
  500. package/src/upstream/openarchflow/providers/generic.ts +227 -0
  501. package/src/upstream/openarchflow/providers/integration.ts +22 -0
  502. package/src/upstream/openarchflow/providers/types.ts +2 -0
  503. package/src/upstream/openarchflow/templates.ts +937 -0
  504. package/src/upstream-catalog.mjs +10 -0
  505. package/src/useChatScroll.jsx +37 -0
  506. package/src/useEmulation.jsx +36 -0
  507. package/src/useEngineeringStatus.mjs +17 -0
  508. package/src/validation-receipt.mjs +10 -0
  509. package/src/visual-export.mjs +92 -0
  510. package/src/voice-conversation.mjs +117 -0
  511. package/src/work-intake.mjs +24 -0
  512. package/src/workflow-runtime-inventory.mjs +3 -0
@@ -0,0 +1,937 @@
1
+ // Derived from OpenArchFlow. Copyright (c) 2026 Rafael Sales. MIT.
2
+ // AtForma: type-only imports and rendering-independent integration; see THIRD_PARTY_NOTICES.md.
3
+ import type { AppNode, AppEdge } from "@/lib/store";
4
+
5
+ export interface DiagramTemplate {
6
+ id: string;
7
+ name: string;
8
+ description: string;
9
+ category: "AWS" | "Azure" | "Generic";
10
+ /** Complexity rating: 1 = Beginner, 2 = Intermediate, 3 = Advanced */
11
+ stars: 1 | 2 | 3;
12
+ nodes: AppNode[];
13
+ edges: AppEdge[];
14
+ }
15
+
16
+ function n(
17
+ id: string,
18
+ label: string,
19
+ service: string,
20
+ type: string,
21
+ x: number,
22
+ y: number,
23
+ provider = "aws",
24
+ ): AppNode {
25
+ return {
26
+ id,
27
+ type: type as string,
28
+ position: { x, y },
29
+ data: { label, service, type, provider },
30
+ } as AppNode;
31
+ }
32
+
33
+ function az(
34
+ id: string,
35
+ label: string,
36
+ service: string,
37
+ type: string,
38
+ x: number,
39
+ y: number,
40
+ ): AppNode {
41
+ return {
42
+ id,
43
+ type: type as string,
44
+ position: { x, y },
45
+ data: { label, service, type, provider: "azure" },
46
+ } as AppNode;
47
+ }
48
+
49
+ function e(id: string, source: string, target: string, label = ""): AppEdge {
50
+ return {
51
+ id,
52
+ source,
53
+ target,
54
+ label: label || undefined,
55
+ type: "smoothstep",
56
+ } as AppEdge;
57
+ }
58
+
59
+ // ── AWS Templates ─────────────────────────────────────────────────────────────
60
+
61
+ const threeTier: DiagramTemplate = {
62
+ id: "aws-three-tier",
63
+ name: "AWS Three-Tier Web App",
64
+ description: "Classic presentation, application, and data tiers on AWS.",
65
+ category: "AWS",
66
+ stars: 2,
67
+ nodes: [
68
+ n("cf", "CloudFront CDN", "CloudFront", "aws-network", 300, 0),
69
+ n("alb", "Load Balancer", "ALB", "aws-network", 300, 120),
70
+ n("ec2a", "Web Server A", "EC2", "aws-compute", 100, 280),
71
+ n("ec2b", "Web Server B", "EC2", "aws-compute", 500, 280),
72
+ n("rds", "RDS MySQL", "RDS", "aws-database", 300, 440),
73
+ n("s3", "Static Assets", "S3", "aws-storage", 600, 0),
74
+ ],
75
+ edges: [
76
+ e("e1", "cf", "alb"),
77
+ e("e2", "cf", "s3"),
78
+ e("e3", "alb", "ec2a"),
79
+ e("e4", "alb", "ec2b"),
80
+ e("e5", "ec2a", "rds"),
81
+ e("e6", "ec2b", "rds"),
82
+ ],
83
+ };
84
+
85
+ const serverlessApi: DiagramTemplate = {
86
+ id: "aws-serverless-api",
87
+ name: "AWS Serverless API",
88
+ description: "API Gateway + Lambda + DynamoDB serverless backend.",
89
+ category: "AWS",
90
+ stars: 2,
91
+ nodes: [
92
+ n("client", "Client App", "Client", "client", 300, 0),
93
+ n("apigw", "API Gateway", "API Gateway", "aws-network", 300, 140),
94
+ n("auth", "Cognito Auth", "Cognito", "aws-security", 0, 140),
95
+ n("lambda", "Handler Lambda", "Lambda", "aws-compute", 300, 280),
96
+ n("dynamo", "DynamoDB", "DynamoDB", "aws-database", 300, 420),
97
+ n("s3", "File Storage", "S3", "aws-storage", 600, 280),
98
+ ],
99
+ edges: [
100
+ e("e1", "client", "apigw"),
101
+ e("e2", "auth", "apigw", "authorizer"),
102
+ e("e3", "apigw", "lambda"),
103
+ e("e4", "lambda", "dynamo"),
104
+ e("e5", "lambda", "s3"),
105
+ ],
106
+ };
107
+
108
+ const eventDriven: DiagramTemplate = {
109
+ id: "aws-event-driven",
110
+ name: "AWS Event-Driven Architecture",
111
+ description: "SQS/SNS fan-out with Lambda processors and DLQ.",
112
+ category: "AWS",
113
+ stars: 3,
114
+ nodes: [
115
+ n("producer", "Event Producer", "Lambda", "aws-compute", 0, 140),
116
+ n("sns", "SNS Topic", "SNS", "aws-integration", 220, 140),
117
+ n("sqsA", "Orders Queue", "SQS", "aws-integration", 420, 0),
118
+ n("sqsB", "Notifications Queue", "SQS", "aws-integration", 420, 280),
119
+ n("dlq", "Dead Letter Queue", "SQS", "aws-integration", 660, 140),
120
+ n("procA", "Order Processor", "Lambda", "aws-compute", 640, 0),
121
+ n("procB", "Notification Sender", "Lambda", "aws-compute", 640, 280),
122
+ ],
123
+ edges: [
124
+ e("e1", "producer", "sns"),
125
+ e("e2", "sns", "sqsA"),
126
+ e("e3", "sns", "sqsB"),
127
+ e("e4", "sqsA", "procA"),
128
+ e("e5", "sqsB", "procB"),
129
+ e("e6", "procA", "dlq", "on failure"),
130
+ e("e7", "procB", "dlq", "on failure"),
131
+ ],
132
+ };
133
+
134
+ const microservices: DiagramTemplate = {
135
+ id: "aws-microservices",
136
+ name: "AWS Microservices",
137
+ description: "ECS-based microservices with service discovery and RDS.",
138
+ category: "AWS",
139
+ stars: 3,
140
+ nodes: [
141
+ n("alb", "Application LB", "ALB", "aws-network", 250, 0),
142
+ n("svcA", "Users Service", "ECS", "aws-containers", 0, 160),
143
+ n("svcB", "Orders Service", "ECS", "aws-containers", 250, 160),
144
+ n("svcC", "Payment Service", "ECS", "aws-containers", 500, 160),
145
+ n("dbA", "Users DB", "RDS", "aws-database", 0, 340),
146
+ n("dbB", "Orders DB", "RDS", "aws-database", 250, 340),
147
+ n("cache", "ElastiCache", "ElastiCache", "aws-database", 500, 340),
148
+ ],
149
+ edges: [
150
+ e("e1", "alb", "svcA"),
151
+ e("e2", "alb", "svcB"),
152
+ e("e3", "alb", "svcC"),
153
+ e("e4", "svcA", "dbA"),
154
+ e("e5", "svcB", "dbB"),
155
+ e("e6", "svcC", "cache"),
156
+ e("e7", "svcB", "svcC", "charge"),
157
+ ],
158
+ };
159
+
160
+ const dataLake: DiagramTemplate = {
161
+ id: "aws-data-lake",
162
+ name: "AWS Data Lake",
163
+ description: "S3 data lake with Glue ETL, Athena query, and QuickSight.",
164
+ category: "AWS",
165
+ stars: 3,
166
+ nodes: [
167
+ n(
168
+ "ingestion",
169
+ "Kinesis Firehose",
170
+ "Kinesis Firehose",
171
+ "aws-analytics",
172
+ 0,
173
+ 140,
174
+ ),
175
+ n("raw", "Raw Zone (S3)", "S3", "aws-storage", 240, 140),
176
+ n("glue", "Glue ETL", "Glue", "aws-analytics", 480, 60),
177
+ n("processed", "Processed Zone (S3)", "S3", "aws-storage", 480, 220),
178
+ n("athena", "Athena", "Athena", "aws-analytics", 700, 140),
179
+ n("qs", "QuickSight", "QuickSight", "aws-analytics", 900, 140),
180
+ ],
181
+ edges: [
182
+ e("e1", "ingestion", "raw"),
183
+ e("e2", "raw", "glue"),
184
+ e("e3", "glue", "processed"),
185
+ e("e4", "processed", "athena"),
186
+ e("e5", "athena", "qs"),
187
+ ],
188
+ };
189
+
190
+ // ── Generic Templates ─────────────────────────────────────────────────────────
191
+
192
+ const flowchart: DiagramTemplate = {
193
+ id: "generic-flowchart",
194
+ name: "Basic Flowchart",
195
+ description: "Simple start → process → decision → end flow.",
196
+ category: "Generic",
197
+ stars: 1,
198
+ nodes: [
199
+ {
200
+ id: "start",
201
+ type: "generic",
202
+ position: { x: 200, y: 0 },
203
+ data: {
204
+ label: "Start",
205
+ service: "Generic",
206
+ type: "generic",
207
+ metadata: {
208
+ shape: "circle",
209
+ backgroundColor: "#d1fae5",
210
+ borderColor: "#10b981",
211
+ },
212
+ },
213
+ } as AppNode,
214
+ {
215
+ id: "proc1",
216
+ type: "generic",
217
+ position: { x: 200, y: 120 },
218
+ data: { label: "Process Data", service: "Generic", type: "generic" },
219
+ } as AppNode,
220
+ {
221
+ id: "dec",
222
+ type: "generic",
223
+ position: { x: 200, y: 260 },
224
+ data: {
225
+ label: "Valid?",
226
+ service: "Generic",
227
+ type: "generic",
228
+ metadata: {
229
+ shape: "diamond",
230
+ backgroundColor: "#fef3c7",
231
+ borderColor: "#f59e0b",
232
+ },
233
+ },
234
+ } as AppNode,
235
+ {
236
+ id: "ok",
237
+ type: "generic",
238
+ position: { x: 400, y: 380 },
239
+ data: { label: "Save Result", service: "Generic", type: "generic" },
240
+ } as AppNode,
241
+ {
242
+ id: "err",
243
+ type: "generic",
244
+ position: { x: 0, y: 380 },
245
+ data: {
246
+ label: "Handle Error",
247
+ service: "Generic",
248
+ type: "generic",
249
+ metadata: { backgroundColor: "#fee2e2", borderColor: "#ef4444" },
250
+ },
251
+ } as AppNode,
252
+ {
253
+ id: "end",
254
+ type: "generic",
255
+ position: { x: 200, y: 500 },
256
+ data: {
257
+ label: "End",
258
+ service: "Generic",
259
+ type: "generic",
260
+ metadata: {
261
+ shape: "circle",
262
+ backgroundColor: "#dbeafe",
263
+ borderColor: "#3b82f6",
264
+ },
265
+ },
266
+ } as AppNode,
267
+ ],
268
+ edges: [
269
+ e("e1", "start", "proc1"),
270
+ e("e2", "proc1", "dec"),
271
+ e("e3", "dec", "ok", "Yes"),
272
+ e("e4", "dec", "err", "No"),
273
+ e("e5", "ok", "end"),
274
+ e("e6", "err", "end"),
275
+ ],
276
+ };
277
+
278
+ const cicd: DiagramTemplate = {
279
+ id: "generic-cicd",
280
+ name: "CI/CD Pipeline",
281
+ description: "Developer push → build → test → deploy pipeline.",
282
+ category: "Generic",
283
+ stars: 2,
284
+ nodes: [
285
+ {
286
+ id: "dev",
287
+ type: "generic",
288
+ position: { x: 0, y: 80 },
289
+ data: { label: "Developer", service: "Generic", type: "generic" },
290
+ } as AppNode,
291
+ {
292
+ id: "repo",
293
+ type: "generic",
294
+ position: { x: 180, y: 80 },
295
+ data: { label: "Git Repository", service: "Generic", type: "generic" },
296
+ } as AppNode,
297
+ {
298
+ id: "ci",
299
+ type: "generic",
300
+ position: { x: 360, y: 0 },
301
+ data: { label: "CI Build", service: "Generic", type: "generic" },
302
+ } as AppNode,
303
+ {
304
+ id: "test",
305
+ type: "generic",
306
+ position: { x: 360, y: 160 },
307
+ data: { label: "Test Suite", service: "Generic", type: "generic" },
308
+ } as AppNode,
309
+ {
310
+ id: "reg",
311
+ type: "generic",
312
+ position: { x: 560, y: 80 },
313
+ data: {
314
+ label: "Container Registry",
315
+ service: "Generic",
316
+ type: "generic",
317
+ },
318
+ } as AppNode,
319
+ {
320
+ id: "staging",
321
+ type: "generic",
322
+ position: { x: 740, y: 0 },
323
+ data: { label: "Staging", service: "Generic", type: "generic" },
324
+ } as AppNode,
325
+ {
326
+ id: "prod",
327
+ type: "generic",
328
+ position: { x: 740, y: 160 },
329
+ data: { label: "Production", service: "Generic", type: "generic" },
330
+ } as AppNode,
331
+ ],
332
+ edges: [
333
+ e("e1", "dev", "repo", "push"),
334
+ e("e2", "repo", "ci", "trigger"),
335
+ e("e3", "repo", "test", "trigger"),
336
+ e("e4", "ci", "reg", "push image"),
337
+ e("e5", "reg", "staging", "deploy"),
338
+ e("e6", "staging", "prod", "promote"),
339
+ ],
340
+ };
341
+
342
+ // ── AWS Additional Templates ──────────────────────────────────────────────────
343
+
344
+ const staticWebsite: DiagramTemplate = {
345
+ id: "aws-static-website",
346
+ name: "AWS Static Website",
347
+ description:
348
+ "S3 + CloudFront + Route 53 with HTTPS via ACM. Ideal first deployment.",
349
+ category: "AWS",
350
+ stars: 1,
351
+ nodes: [
352
+ n("r53", "Route 53", "Route53", "aws-network", 280, 0),
353
+ n("acm", "ACM Certificate", "Certificate Manager", "aws-security", 0, 0),
354
+ n("cf", "CloudFront CDN", "CloudFront", "aws-network", 280, 140),
355
+ n("s3web", "Website Bucket", "S3", "aws-storage", 140, 300),
356
+ n("s3logs", "Access Logs", "S3", "aws-storage", 420, 300),
357
+ ],
358
+ edges: [
359
+ e("e1", "r53", "cf", "DNS"),
360
+ e("e2", "acm", "cf", "TLS cert"),
361
+ e("e3", "cf", "s3web", "origin"),
362
+ e("e4", "cf", "s3logs", "logs"),
363
+ ],
364
+ };
365
+
366
+ const ecsFargate: DiagramTemplate = {
367
+ id: "aws-ecs-fargate",
368
+ name: "AWS ECS Fargate App",
369
+ description:
370
+ "Containerised API with ALB, ECS Fargate, ECR, RDS Aurora, and Secrets Manager.",
371
+ category: "AWS",
372
+ stars: 2,
373
+ nodes: [
374
+ n("client", "Client", "Client", "client", 280, 0),
375
+ n("alb", "Application LB", "ALB", "aws-network", 280, 130),
376
+ n("ecs", "ECS Fargate", "ECS", "aws-containers", 280, 270),
377
+ n("ecr", "ECR Registry", "ECR", "aws-developer", 520, 270),
378
+ n("rds", "Aurora MySQL", "RDS", "aws-database", 140, 420),
379
+ n(
380
+ "secrets",
381
+ "Secrets Manager",
382
+ "Secrets Manager",
383
+ "aws-security",
384
+ 420,
385
+ 420,
386
+ ),
387
+ n("cw", "CloudWatch", "CloudWatch", "aws-management", 0, 270),
388
+ ],
389
+ edges: [
390
+ e("e1", "client", "alb"),
391
+ e("e2", "alb", "ecs"),
392
+ e("e3", "ecr", "ecs", "pull image"),
393
+ e("e4", "ecs", "rds"),
394
+ e("e5", "ecs", "secrets", "credentials"),
395
+ e("e6", "ecs", "cw", "logs/metrics"),
396
+ ],
397
+ };
398
+
399
+ const mlPipeline: DiagramTemplate = {
400
+ id: "aws-ml-pipeline",
401
+ name: "AWS ML Training Pipeline",
402
+ description:
403
+ "End-to-end SageMaker pipeline: data prep, training, registry, and real-time endpoint.",
404
+ category: "AWS",
405
+ stars: 3,
406
+ nodes: [
407
+ n("s3raw", "Raw Data (S3)", "S3", "aws-storage", 0, 140),
408
+ n("glue", "Glue Processing", "Glue", "aws-analytics", 220, 140),
409
+ n("s3feat", "Feature Store (S3)", "S3", "aws-storage", 440, 140),
410
+ n(
411
+ "train",
412
+ "SageMaker Training",
413
+ "SageMaker",
414
+ "aws-machine-learning",
415
+ 440,
416
+ 0,
417
+ ),
418
+ n(
419
+ "registry",
420
+ "Model Registry",
421
+ "SageMaker",
422
+ "aws-machine-learning",
423
+ 680,
424
+ 70,
425
+ ),
426
+ n(
427
+ "endpoint",
428
+ "SageMaker Endpoint",
429
+ "SageMaker",
430
+ "aws-machine-learning",
431
+ 680,
432
+ 210,
433
+ ),
434
+ n("lambda", "Inference Lambda", "Lambda", "aws-compute", 900, 210),
435
+ ],
436
+ edges: [
437
+ e("e1", "s3raw", "glue"),
438
+ e("e2", "glue", "s3feat"),
439
+ e("e3", "s3feat", "train", "training data"),
440
+ e("e4", "train", "registry", "register model"),
441
+ e("e5", "registry", "endpoint", "deploy"),
442
+ e("e6", "endpoint", "lambda", "invoke"),
443
+ ],
444
+ };
445
+
446
+ const multiRegionDr: DiagramTemplate = {
447
+ id: "aws-multi-region-dr",
448
+ name: "AWS Multi-Region DR",
449
+ description:
450
+ "Active-passive disaster recovery across two regions with Route 53 failover routing.",
451
+ category: "AWS",
452
+ stars: 3,
453
+ nodes: [
454
+ n("r53", "Route 53 Failover", "Route53", "aws-network", 380, 0),
455
+ // Primary region
456
+ n("albPri", "ALB (Primary)", "ALB", "aws-network", 120, 160),
457
+ n("ec2Pri", "EC2 Fleet (Primary)", "EC2", "aws-compute", 120, 300),
458
+ n("rdsPri", "RDS Primary", "RDS", "aws-database", 120, 440),
459
+ // DR region
460
+ n("albDr", "ALB (DR)", "ALB", "aws-network", 640, 160),
461
+ n("ec2Dr", "EC2 Fleet (DR)", "EC2", "aws-compute", 640, 300),
462
+ n("rdsDr", "RDS Read Replica", "RDS", "aws-database", 640, 440),
463
+ // Shared
464
+ n("s3", "S3 Replication", "S3", "aws-storage", 380, 440),
465
+ ],
466
+ edges: [
467
+ e("e1", "r53", "albPri", "primary"),
468
+ e("e2", "r53", "albDr", "failover"),
469
+ e("e3", "albPri", "ec2Pri"),
470
+ e("e4", "ec2Pri", "rdsPri"),
471
+ e("e5", "albDr", "ec2Dr"),
472
+ e("e6", "ec2Dr", "rdsDr"),
473
+ e("e7", "rdsPri", "rdsDr", "replication"),
474
+ e("e8", "rdsPri", "s3", "backup"),
475
+ ],
476
+ };
477
+
478
+ // ── Generic Additional Templates ──────────────────────────────────────────────
479
+
480
+ const erDiagram: DiagramTemplate = {
481
+ id: "generic-er-diagram",
482
+ name: "ER / Database Schema",
483
+ description:
484
+ "Users, Orders, Products, and OrderItems tables — ready for SQL DDL export.",
485
+ category: "Generic",
486
+ stars: 2,
487
+ nodes: [
488
+ {
489
+ id: "tbl-users",
490
+ type: "table",
491
+ position: { x: 0, y: 0 },
492
+ data: {
493
+ label: "users",
494
+ service: "table",
495
+ type: "table",
496
+ provider: "generic",
497
+ metadata: {
498
+ columns: [
499
+ {
500
+ id: "u1",
501
+ name: "id",
502
+ type: "INTEGER",
503
+ isPrimaryKey: true,
504
+ nullable: false,
505
+ },
506
+ {
507
+ id: "u2",
508
+ name: "name",
509
+ type: "VARCHAR(100)",
510
+ isPrimaryKey: false,
511
+ nullable: false,
512
+ },
513
+ {
514
+ id: "u3",
515
+ name: "email",
516
+ type: "VARCHAR(255)",
517
+ isPrimaryKey: false,
518
+ nullable: false,
519
+ },
520
+ {
521
+ id: "u4",
522
+ name: "created_at",
523
+ type: "TIMESTAMP",
524
+ isPrimaryKey: false,
525
+ nullable: true,
526
+ },
527
+ ],
528
+ },
529
+ },
530
+ } as AppNode,
531
+ {
532
+ id: "tbl-orders",
533
+ type: "table",
534
+ position: { x: 420, y: 0 },
535
+ data: {
536
+ label: "orders",
537
+ service: "table",
538
+ type: "table",
539
+ provider: "generic",
540
+ metadata: {
541
+ columns: [
542
+ {
543
+ id: "o1",
544
+ name: "id",
545
+ type: "INTEGER",
546
+ isPrimaryKey: true,
547
+ nullable: false,
548
+ },
549
+ {
550
+ id: "o2",
551
+ name: "user_id",
552
+ type: "INTEGER",
553
+ isPrimaryKey: false,
554
+ nullable: false,
555
+ },
556
+ {
557
+ id: "o3",
558
+ name: "total",
559
+ type: "DECIMAL(10,2)",
560
+ isPrimaryKey: false,
561
+ nullable: false,
562
+ },
563
+ {
564
+ id: "o4",
565
+ name: "status",
566
+ type: "VARCHAR(50)",
567
+ isPrimaryKey: false,
568
+ nullable: false,
569
+ },
570
+ {
571
+ id: "o5",
572
+ name: "created_at",
573
+ type: "TIMESTAMP",
574
+ isPrimaryKey: false,
575
+ nullable: true,
576
+ },
577
+ ],
578
+ },
579
+ },
580
+ } as AppNode,
581
+ {
582
+ id: "tbl-products",
583
+ type: "table",
584
+ position: { x: 420, y: 360 },
585
+ data: {
586
+ label: "products",
587
+ service: "table",
588
+ type: "table",
589
+ provider: "generic",
590
+ metadata: {
591
+ columns: [
592
+ {
593
+ id: "p1",
594
+ name: "id",
595
+ type: "INTEGER",
596
+ isPrimaryKey: true,
597
+ nullable: false,
598
+ },
599
+ {
600
+ id: "p2",
601
+ name: "name",
602
+ type: "VARCHAR(200)",
603
+ isPrimaryKey: false,
604
+ nullable: false,
605
+ },
606
+ {
607
+ id: "p3",
608
+ name: "price",
609
+ type: "DECIMAL(10,2)",
610
+ isPrimaryKey: false,
611
+ nullable: false,
612
+ },
613
+ {
614
+ id: "p4",
615
+ name: "stock",
616
+ type: "INTEGER",
617
+ isPrimaryKey: false,
618
+ nullable: true,
619
+ },
620
+ ],
621
+ },
622
+ },
623
+ } as AppNode,
624
+ {
625
+ id: "tbl-order-items",
626
+ type: "table",
627
+ position: { x: 860, y: 160 },
628
+ data: {
629
+ label: "order_items",
630
+ service: "table",
631
+ type: "table",
632
+ provider: "generic",
633
+ metadata: {
634
+ columns: [
635
+ {
636
+ id: "oi1",
637
+ name: "id",
638
+ type: "INTEGER",
639
+ isPrimaryKey: true,
640
+ nullable: false,
641
+ },
642
+ {
643
+ id: "oi2",
644
+ name: "order_id",
645
+ type: "INTEGER",
646
+ isPrimaryKey: false,
647
+ nullable: false,
648
+ },
649
+ {
650
+ id: "oi3",
651
+ name: "product_id",
652
+ type: "INTEGER",
653
+ isPrimaryKey: false,
654
+ nullable: false,
655
+ },
656
+ {
657
+ id: "oi4",
658
+ name: "quantity",
659
+ type: "INTEGER",
660
+ isPrimaryKey: false,
661
+ nullable: false,
662
+ },
663
+ {
664
+ id: "oi5",
665
+ name: "unit_price",
666
+ type: "DECIMAL(10,2)",
667
+ isPrimaryKey: false,
668
+ nullable: false,
669
+ },
670
+ ],
671
+ },
672
+ },
673
+ } as AppNode,
674
+ ],
675
+ edges: [
676
+ e("e1", "tbl-users", "tbl-orders", "has many"),
677
+ e("e2", "tbl-orders", "tbl-order-items", "contains"),
678
+ e("e3", "tbl-products", "tbl-order-items", "referenced by"),
679
+ ],
680
+ };
681
+
682
+ // ── Azure Templates ───────────────────────────────────────────────────────────
683
+
684
+ const azureWebApp: DiagramTemplate = {
685
+ id: "azure-web-app",
686
+ name: "Azure Three-Tier Web App",
687
+ description:
688
+ "Front Door CDN → App Service → Azure SQL + Blob Storage with Key Vault.",
689
+ category: "Azure",
690
+ stars: 2,
691
+ nodes: [
692
+ az("afd", "Azure Front Door", "FrontDoors", "azure-network", 280, 0),
693
+ az("app", "App Service", "AppServices", "azure-compute", 280, 150),
694
+ az("sql", "Azure SQL", "SQLDatabases", "azure-database", 100, 310),
695
+ az("blob", "Blob Storage", "StorageAccounts", "azure-storage", 460, 310),
696
+ az("kv", "Key Vault", "KeyVaults", "azure-compute", 280, 460),
697
+ az("apim", "API Management", "APIManagement", "azure-network", 0, 150),
698
+ ],
699
+ edges: [
700
+ e("e1", "afd", "app", "route"),
701
+ e("e2", "apim", "app", "gateway"),
702
+ e("e3", "app", "sql"),
703
+ e("e4", "app", "blob", "assets"),
704
+ e("e5", "app", "kv", "secrets"),
705
+ ],
706
+ };
707
+
708
+ const azureServerless: DiagramTemplate = {
709
+ id: "azure-serverless",
710
+ name: "Azure Serverless Functions",
711
+ description:
712
+ "Event-driven pipeline: Event Hub → Azure Functions → Cosmos DB + Service Bus.",
713
+ category: "Azure",
714
+ stars: 3,
715
+ nodes: [
716
+ az("eh", "Event Hub", "EventHubs", "azure-network", 0, 140),
717
+ az("fn1", "Ingest Function", "FunctionApps", "azure-compute", 240, 60),
718
+ az("fn2", "Process Function", "FunctionApps", "azure-compute", 240, 220),
719
+ az("cosmos", "Cosmos DB", "CosmosDB", "azure-database", 480, 60),
720
+ az("sb", "Service Bus", "ServiceBus", "azure-network", 480, 220),
721
+ az("fn3", "Notify Function", "FunctionApps", "azure-compute", 720, 220),
722
+ az("logic", "Logic App", "LogicApps", "azure-compute", 720, 60),
723
+ ],
724
+ edges: [
725
+ e("e1", "eh", "fn1", "trigger"),
726
+ e("e2", "eh", "fn2", "trigger"),
727
+ e("e3", "fn1", "cosmos", "store"),
728
+ e("e4", "fn2", "sb", "publish"),
729
+ e("e5", "sb", "fn3", "subscribe"),
730
+ e("e6", "fn3", "logic", "notify"),
731
+ ],
732
+ };
733
+
734
+ // ── Circuit Breaker Templates ─────────────────────────────────────────────────
735
+
736
+ /** Helper for nodes that need mock (simulation) data pre-configured */
737
+ function nm(
738
+ id: string,
739
+ label: string,
740
+ service: string,
741
+ type: string,
742
+ x: number,
743
+ y: number,
744
+ mock: Record<string, unknown>,
745
+ provider = "aws",
746
+ ): AppNode {
747
+ return {
748
+ id,
749
+ type: type as string,
750
+ position: { x, y },
751
+ data: { label, service, type, provider, mock },
752
+ } as AppNode;
753
+ }
754
+
755
+ const serverlessCircuitBreaker: DiagramTemplate = {
756
+ id: "aws-serverless-cb",
757
+ name: "Serverless Circuit Breaker",
758
+ description:
759
+ "Lambda-based circuit breaker: API Gateway routes requests through a CB wrapper that checks DynamoDB for breaker state. When the downstream service error rate spikes the breaker opens and requests short-circuit to an ElastiCache fallback. CloudWatch + SNS alert on trip events.",
760
+ category: "AWS",
761
+ stars: 3,
762
+ nodes: [
763
+ // Entry
764
+ nm("client", "Client App", "Client", "client", 340, 0, {
765
+ enabled: true,
766
+ requestsPerSecond: 8,
767
+ }),
768
+ n("apigw", "API Gateway", "API Gateway", "aws-network", 340, 130),
769
+ // Circuit Breaker Lambda — checks breaker state before forwarding
770
+ nm("cb", "Circuit Breaker\nLambda", "Lambda", "aws-compute", 340, 270, {
771
+ enabled: true,
772
+ failureRate: 0,
773
+ latency: 20,
774
+ }),
775
+ // State store — tracks open/closed/half-open
776
+ n(
777
+ "cbstate",
778
+ "Breaker State\n(DynamoDB)",
779
+ "DynamoDB",
780
+ "aws-database",
781
+ 620,
782
+ 270,
783
+ ),
784
+ // Primary downstream — intentionally degraded to trip the breaker
785
+ nm(
786
+ "primary",
787
+ "Orders Service\n(Lambda)",
788
+ "Lambda",
789
+ "aws-compute",
790
+ 340,
791
+ 420,
792
+ {
793
+ enabled: true,
794
+ failureRate: 65,
795
+ latency: 900,
796
+ },
797
+ ),
798
+ n("db", "Orders DB\n(DynamoDB)", "DynamoDB", "aws-database", 340, 570),
799
+ // Fallback path when circuit is open
800
+ n(
801
+ "fallback",
802
+ "Fallback Cache\n(ElastiCache)",
803
+ "ElastiCache",
804
+ "aws-database",
805
+ 620,
806
+ 420,
807
+ ),
808
+ // Observability
809
+ n("dlq", "Failed Requests\n(SQS DLQ)", "SQS", "aws-integration", 60, 420),
810
+ n("cw", "CloudWatch\nAlarms", "CloudWatch", "aws-management", 620, 570),
811
+ n("sns", "CB Trip Alert\n(SNS)", "SNS", "aws-integration", 620, 130),
812
+ ],
813
+ edges: [
814
+ e("e1", "client", "apigw"),
815
+ e("e2", "apigw", "cb"),
816
+ e("e3", "cb", "cbstate", "check state"),
817
+ e("e4", "cb", "primary", "CLOSED → forward"),
818
+ e("e5", "primary", "db", "read/write"),
819
+ e("e6", "cb", "fallback", "OPEN → fallback"),
820
+ e("e7", "primary", "dlq", "on failure"),
821
+ e("e8", "cw", "sns", "alarm"),
822
+ e("e9", "cb", "cw", "metrics"),
823
+ e("e10", "sns", "cb", "reset signal"),
824
+ ],
825
+ };
826
+
827
+ const ecsCircuitBreaker: DiagramTemplate = {
828
+ id: "aws-ecs-cb",
829
+ name: "ECS Microservices + Circuit Breaker",
830
+ description:
831
+ "App Mesh-powered circuit breaker between ECS microservices. The Orders service calls Payment through an Envoy proxy mesh. When Payment degrades, App Mesh opens the circuit and ECS retries through a fallback Payment replica. CloudWatch EMF captures breaker telemetry.",
832
+ category: "AWS",
833
+ stars: 3,
834
+ nodes: [
835
+ // Entry
836
+ nm("client", "Client", "Client", "client", 360, 0, {
837
+ enabled: true,
838
+ requestsPerSecond: 10,
839
+ }),
840
+ n("alb", "Application LB", "ALB", "aws-network", 360, 130),
841
+ // Orders service — healthy
842
+ nm("orders", "Orders Service\n(ECS)", "ECS", "aws-containers", 360, 270, {
843
+ enabled: true,
844
+ failureRate: 0,
845
+ }),
846
+ // App Mesh — the circuit breaker proxy layer
847
+ n("mesh", "App Mesh\n(Envoy Proxy)", "App Mesh", "aws-network", 360, 420),
848
+ // Payment service — degraded, trips the circuit
849
+ nm(
850
+ "payment",
851
+ "Payment Service\n(ECS — degraded)",
852
+ "ECS",
853
+ "aws-containers",
854
+ 160,
855
+ 570,
856
+ {
857
+ enabled: true,
858
+ failureRate: 70,
859
+ latency: 1200,
860
+ concurrencyLimit: 3,
861
+ },
862
+ ),
863
+ // Fallback replica
864
+ nm(
865
+ "payment_fb",
866
+ "Payment Fallback\n(ECS replica)",
867
+ "ECS",
868
+ "aws-containers",
869
+ 560,
870
+ 570,
871
+ {
872
+ enabled: true,
873
+ failureRate: 5,
874
+ latency: 80,
875
+ },
876
+ ),
877
+ // Shared backing stores
878
+ n("rds", "Aurora MySQL", "RDS", "aws-database", 160, 720),
879
+ n(
880
+ "cache",
881
+ "ElastiCache\n(session cache)",
882
+ "ElastiCache",
883
+ "aws-database",
884
+ 560,
885
+ 720,
886
+ ),
887
+ // Observability
888
+ n(
889
+ "cw",
890
+ "CloudWatch EMF\n(breaker metrics)",
891
+ "CloudWatch",
892
+ "aws-management",
893
+ 760,
894
+ 420,
895
+ ),
896
+ n("xray", "X-Ray Traces", "X-Ray", "aws-management", 760, 270),
897
+ n("sm", "Secrets Manager", "Secrets Manager", "aws-security", 760, 130),
898
+ ],
899
+ edges: [
900
+ e("e1", "client", "alb"),
901
+ e("e2", "alb", "orders"),
902
+ e("e3", "orders", "mesh", "egress"),
903
+ e("e4", "mesh", "payment", "CLOSED"),
904
+ e("e5", "mesh", "payment_fb", "OPEN → retry"),
905
+ e("e6", "payment", "rds", "write"),
906
+ e("e7", "payment_fb", "cache", "read-through"),
907
+ e("e8", "orders", "xray", "trace"),
908
+ e("e9", "mesh", "cw", "breaker metrics"),
909
+ e("e10", "alb", "sm", "TLS creds"),
910
+ ],
911
+ };
912
+
913
+ export const TEMPLATES: DiagramTemplate[] = [
914
+ // AWS
915
+ staticWebsite,
916
+ threeTier,
917
+ serverlessApi,
918
+ ecsFargate,
919
+ eventDriven,
920
+ microservices,
921
+ dataLake,
922
+ mlPipeline,
923
+ multiRegionDr,
924
+ serverlessCircuitBreaker,
925
+ ecsCircuitBreaker,
926
+ // Azure
927
+ azureWebApp,
928
+ azureServerless,
929
+ // Generic
930
+ flowchart,
931
+ cicd,
932
+ erDiagram,
933
+ ];
934
+
935
+ export const TEMPLATE_CATEGORIES = [
936
+ ...new Set(TEMPLATES.map((t) => t.category)),
937
+ ];