@stacksjs/defaults 0.70.207 → 0.70.208

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 (408) hide show
  1. package/TODO.md +21 -0
  2. package/ai/AGENTS.md +79 -0
  3. package/ai/README.md +45 -0
  4. package/ai/claude/launch.json +12 -0
  5. package/ai/skills/stacks-actions/SKILL.md +128 -0
  6. package/ai/skills/stacks-ai/SKILL.md +276 -0
  7. package/ai/skills/stacks-alias/SKILL.md +94 -0
  8. package/ai/skills/stacks-analytics/SKILL.md +91 -0
  9. package/ai/skills/stacks-api/SKILL.md +738 -0
  10. package/ai/skills/stacks-arrays/SKILL.md +277 -0
  11. package/ai/skills/stacks-auth/SKILL.md +422 -0
  12. package/ai/skills/stacks-auto-imports/SKILL.md +138 -0
  13. package/ai/skills/stacks-brandkit/SKILL.md +811 -0
  14. package/ai/skills/stacks-browse/SKILL.md +127 -0
  15. package/ai/skills/stacks-browse/scripts/browse.ts +492 -0
  16. package/ai/skills/stacks-browser/SKILL.md +145 -0
  17. package/ai/skills/stacks-buddy/SKILL.md +676 -0
  18. package/ai/skills/stacks-build/SKILL.md +163 -0
  19. package/ai/skills/stacks-cache/SKILL.md +125 -0
  20. package/ai/skills/stacks-calendar/SKILL.md +113 -0
  21. package/ai/skills/stacks-chat/SKILL.md +371 -0
  22. package/ai/skills/stacks-cli/SKILL.md +112 -0
  23. package/ai/skills/stacks-cloud/SKILL.md +192 -0
  24. package/ai/skills/stacks-cms/SKILL.md +217 -0
  25. package/ai/skills/stacks-collections/SKILL.md +82 -0
  26. package/ai/skills/stacks-commerce/SKILL.md +114 -0
  27. package/ai/skills/stacks-composables/SKILL.md +161 -0
  28. package/ai/skills/stacks-config/SKILL.md +144 -0
  29. package/ai/skills/stacks-configuration/SKILL.md +154 -0
  30. package/ai/skills/stacks-cron/SKILL.md +123 -0
  31. package/ai/skills/stacks-crosswind/SKILL.md +190 -0
  32. package/ai/skills/stacks-dashboard/SKILL.md +173 -0
  33. package/ai/skills/stacks-database/SKILL.md +286 -0
  34. package/ai/skills/stacks-datetime/SKILL.md +269 -0
  35. package/ai/skills/stacks-dependencies/SKILL.md +111 -0
  36. package/ai/skills/stacks-deploy/SKILL.md +102 -0
  37. package/ai/skills/stacks-design-brutalist/SKILL.md +110 -0
  38. package/ai/skills/stacks-design-minimalist/SKILL.md +115 -0
  39. package/ai/skills/stacks-design-output/SKILL.md +55 -0
  40. package/ai/skills/stacks-design-soft/SKILL.md +156 -0
  41. package/ai/skills/stacks-design-taste/SKILL.md +1012 -0
  42. package/ai/skills/stacks-design-taste-codex/SKILL.md +294 -0
  43. package/ai/skills/stacks-desktop/SKILL.md +78 -0
  44. package/ai/skills/stacks-development/SKILL.md +298 -0
  45. package/ai/skills/stacks-dns/SKILL.md +149 -0
  46. package/ai/skills/stacks-docs/SKILL.md +109 -0
  47. package/ai/skills/stacks-email/SKILL.md +236 -0
  48. package/ai/skills/stacks-enums/SKILL.md +100 -0
  49. package/ai/skills/stacks-env/SKILL.md +181 -0
  50. package/ai/skills/stacks-error-handling/SKILL.md +137 -0
  51. package/ai/skills/stacks-events/SKILL.md +228 -0
  52. package/ai/skills/stacks-faker/SKILL.md +158 -0
  53. package/ai/skills/stacks-git/SKILL.md +158 -0
  54. package/ai/skills/stacks-guard/SKILL.md +98 -0
  55. package/ai/skills/stacks-health/SKILL.md +75 -0
  56. package/ai/skills/stacks-http/SKILL.md +316 -0
  57. package/ai/skills/stacks-i18n/SKILL.md +198 -0
  58. package/ai/skills/stacks-image-to-code/SKILL.md +629 -0
  59. package/ai/skills/stacks-imagegen-mobile/SKILL.md +1474 -0
  60. package/ai/skills/stacks-imagegen-web/SKILL.md +998 -0
  61. package/ai/skills/stacks-investigate/SKILL.md +119 -0
  62. package/ai/skills/stacks-jobs/SKILL.md +136 -0
  63. package/ai/skills/stacks-lint/SKILL.md +184 -0
  64. package/ai/skills/stacks-listeners/SKILL.md +99 -0
  65. package/ai/skills/stacks-logging/SKILL.md +78 -0
  66. package/ai/skills/stacks-mail/SKILL.md +120 -0
  67. package/ai/skills/stacks-middleware/SKILL.md +249 -0
  68. package/ai/skills/stacks-migrations/SKILL.md +105 -0
  69. package/ai/skills/stacks-models/SKILL.md +267 -0
  70. package/ai/skills/stacks-new-feature/SKILL.md +206 -0
  71. package/ai/skills/stacks-notifications/SKILL.md +210 -0
  72. package/ai/skills/stacks-objects/SKILL.md +205 -0
  73. package/ai/skills/stacks-office-hours/SKILL.md +134 -0
  74. package/ai/skills/stacks-orm/SKILL.md +342 -0
  75. package/ai/skills/stacks-path/SKILL.md +118 -0
  76. package/ai/skills/stacks-payments/SKILL.md +373 -0
  77. package/ai/skills/stacks-plan-review/SKILL.md +152 -0
  78. package/ai/skills/stacks-plugins/SKILL.md +149 -0
  79. package/ai/skills/stacks-push/SKILL.md +376 -0
  80. package/ai/skills/stacks-query-builder/SKILL.md +128 -0
  81. package/ai/skills/stacks-queue/SKILL.md +559 -0
  82. package/ai/skills/stacks-realtime/SKILL.md +442 -0
  83. package/ai/skills/stacks-redesign/SKILL.md +182 -0
  84. package/ai/skills/stacks-registry/SKILL.md +58 -0
  85. package/ai/skills/stacks-repl/SKILL.md +80 -0
  86. package/ai/skills/stacks-retro/SKILL.md +122 -0
  87. package/ai/skills/stacks-review/SKILL.md +135 -0
  88. package/ai/skills/stacks-router/SKILL.md +231 -0
  89. package/ai/skills/stacks-routes/SKILL.md +105 -0
  90. package/ai/skills/stacks-scaffolding/SKILL.md +162 -0
  91. package/ai/skills/stacks-scheduler/SKILL.md +363 -0
  92. package/ai/skills/stacks-search-engine/SKILL.md +112 -0
  93. package/ai/skills/stacks-security/SKILL.md +129 -0
  94. package/ai/skills/stacks-security-audit/SKILL.md +128 -0
  95. package/ai/skills/stacks-server/SKILL.md +458 -0
  96. package/ai/skills/stacks-shell/SKILL.md +62 -0
  97. package/ai/skills/stacks-slug/SKILL.md +87 -0
  98. package/ai/skills/stacks-sms/SKILL.md +385 -0
  99. package/ai/skills/stacks-socials/SKILL.md +303 -0
  100. package/ai/skills/stacks-storage/SKILL.md +576 -0
  101. package/ai/skills/stacks-strings/SKILL.md +416 -0
  102. package/ai/skills/stacks-stx/SKILL.md +176 -0
  103. package/ai/skills/stacks-technical-diagrams/LICENSE +22 -0
  104. package/ai/skills/stacks-technical-diagrams/SKILL.md +290 -0
  105. package/ai/skills/stacks-technical-diagrams/agents/openai.yaml +4 -0
  106. package/ai/skills/stacks-technical-diagrams/assets/template.html +1252 -0
  107. package/ai/skills/stacks-technical-diagrams/bin/technical-diagrams.mjs +289 -0
  108. package/ai/skills/stacks-technical-diagrams/bunfig.toml +1 -0
  109. package/ai/skills/stacks-technical-diagrams/examples/agent-run.lifecycle.json +64 -0
  110. package/ai/skills/stacks-technical-diagrams/examples/agent-tool-call.workflow.json +88 -0
  111. package/ai/skills/stacks-technical-diagrams/examples/cache-miss-request.sequence.json +75 -0
  112. package/ai/skills/stacks-technical-diagrams/examples/product-analytics.dataflow.json +70 -0
  113. package/ai/skills/stacks-technical-diagrams/examples/web-app.architecture.json +41 -0
  114. package/ai/skills/stacks-technical-diagrams/renderers/architecture/grid.mjs +62 -0
  115. package/ai/skills/stacks-technical-diagrams/renderers/architecture/render-architecture.mjs +371 -0
  116. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/README.md +82 -0
  117. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/render-dataflow.mjs +295 -0
  118. package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/README.md +91 -0
  119. package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/render-lifecycle.mjs +384 -0
  120. package/ai/skills/stacks-technical-diagrams/renderers/sequence/README.md +84 -0
  121. package/ai/skills/stacks-technical-diagrams/renderers/sequence/render-sequence.mjs +257 -0
  122. package/ai/skills/stacks-technical-diagrams/renderers/shared/cli.mjs +42 -0
  123. package/ai/skills/stacks-technical-diagrams/renderers/shared/generated-validators.mjs +13 -0
  124. package/ai/skills/stacks-technical-diagrams/renderers/shared/geometry.mjs +230 -0
  125. package/ai/skills/stacks-technical-diagrams/renderers/shared/layout-report.mjs +40 -0
  126. package/ai/skills/stacks-technical-diagrams/renderers/shared/utils.mjs +88 -0
  127. package/ai/skills/stacks-technical-diagrams/renderers/shared/validator.mjs +40 -0
  128. package/ai/skills/stacks-technical-diagrams/renderers/workflow/README.md +103 -0
  129. package/ai/skills/stacks-technical-diagrams/renderers/workflow/render-workflow.mjs +481 -0
  130. package/ai/skills/stacks-technical-diagrams/schemas/README.md +68 -0
  131. package/ai/skills/stacks-technical-diagrams/schemas/architecture.schema.json +121 -0
  132. package/ai/skills/stacks-technical-diagrams/schemas/common.schema.json +43 -0
  133. package/ai/skills/stacks-technical-diagrams/schemas/dataflow.schema.json +221 -0
  134. package/ai/skills/stacks-technical-diagrams/schemas/lifecycle.schema.json +241 -0
  135. package/ai/skills/stacks-technical-diagrams/schemas/sequence.schema.json +186 -0
  136. package/ai/skills/stacks-technical-diagrams/schemas/workflow.schema.json +332 -0
  137. package/ai/skills/stacks-technical-diagrams/scripts/check-render-output.mjs +297 -0
  138. package/ai/skills/stacks-technical-diagrams/scripts/render-examples.mjs +28 -0
  139. package/ai/skills/stacks-testing/SKILL.md +129 -0
  140. package/ai/skills/stacks-tunnel/SKILL.md +125 -0
  141. package/ai/skills/stacks-types/SKILL.md +178 -0
  142. package/ai/skills/stacks-ui/SKILL.md +246 -0
  143. package/ai/skills/stacks-utils/SKILL.md +444 -0
  144. package/ai/skills/stacks-validation/SKILL.md +371 -0
  145. package/ai/skills/stacks-whois/SKILL.md +315 -0
  146. package/assets/world-map-data.ts +121 -0
  147. package/bootstrap.ts +114 -0
  148. package/docs/api-examples.md +46 -0
  149. package/docs/index.md +24 -0
  150. package/docs/markdown-examples.md +87 -0
  151. package/functions/analytics.ts +97 -0
  152. package/functions/api.ts +143 -0
  153. package/functions/auth.ts +208 -0
  154. package/functions/billing/payments.ts +149 -0
  155. package/functions/blog.ts +120 -0
  156. package/functions/cms/categorizables.ts +107 -0
  157. package/functions/cms/pages.ts +108 -0
  158. package/functions/cms/posts.ts +100 -0
  159. package/functions/cms/taggables.ts +102 -0
  160. package/functions/commerce/coupons.ts +128 -0
  161. package/functions/commerce/customers.ts +128 -0
  162. package/functions/commerce/gift-cards.ts +119 -0
  163. package/functions/commerce/orders.ts +112 -0
  164. package/functions/commerce/payments.ts +119 -0
  165. package/functions/commerce/products/categories.ts +123 -0
  166. package/functions/commerce/products/manufacturers.ts +123 -0
  167. package/functions/commerce/products/products.ts +123 -0
  168. package/functions/commerce/products/reviews.ts +123 -0
  169. package/functions/commerce/products/units.ts +123 -0
  170. package/functions/commerce/products/variants.ts +123 -0
  171. package/functions/commerce/shippings/delivery-routes.ts +123 -0
  172. package/functions/commerce/shippings/digital-deliveries.ts +119 -0
  173. package/functions/commerce/shippings/drivers.ts +123 -0
  174. package/functions/commerce/shippings/license-keys.ts +123 -0
  175. package/functions/commerce/shippings/shipping-methods.ts +123 -0
  176. package/functions/commerce/shippings/shipping-rates.ts +119 -0
  177. package/functions/commerce/shippings/shipping-zones.ts +119 -0
  178. package/functions/commerce/taxes.ts +119 -0
  179. package/functions/commerce/waitlist/products.ts +123 -0
  180. package/functions/commerce/waitlist/restaurants.ts +123 -0
  181. package/functions/craft.ts +107 -0
  182. package/functions/dashboard.ts +153 -0
  183. package/functions/inbox.ts +95 -0
  184. package/functions/jobs.ts +86 -0
  185. package/functions/monitoring/errors.ts +295 -0
  186. package/functions/queue.ts +111 -0
  187. package/functions/realtime/websockets.ts +96 -0
  188. package/functions/realtime.ts +52 -0
  189. package/functions/releases.ts +49 -0
  190. package/functions/search.ts +126 -0
  191. package/functions/toasts.ts +95 -0
  192. package/functions/uploads.ts +216 -0
  193. package/ide/.gitignore +4 -0
  194. package/ide/cursor/rules/auto-imports.mdc +574 -0
  195. package/ide/cursor/rules/code-style.mdc +12 -0
  196. package/ide/cursor/rules/documentation.mdc +9 -0
  197. package/ide/cursor/rules/error-handling-validation.mdc +11 -0
  198. package/ide/cursor/rules/key-conventions.mdc +11 -0
  199. package/ide/cursor/rules/project-structure.mdc +169 -0
  200. package/ide/cursor/rules/readme.mdc +318 -0
  201. package/ide/cursor/rules/syntax-formatting.mdc +9 -0
  202. package/ide/cursor/rules/testing.mdc +10 -0
  203. package/ide/cursor/rules/typescript.mdc +9 -0
  204. package/ide/cursor/rules/ui-styling.mdc +0 -0
  205. package/ide/dictionary.txt +397 -0
  206. package/ide/jetbrains/.fleet/settings.json +4 -0
  207. package/ide/jetbrains/.idea/.gitignore +5 -0
  208. package/ide/jetbrains/.idea/.name +1 -0
  209. package/ide/jetbrains/.idea/inspectionProfiles/Project_Default.xml +6 -0
  210. package/ide/jetbrains/.idea/jsLinters/eslint.xml +7 -0
  211. package/ide/jetbrains/.idea/modules.xml +8 -0
  212. package/ide/jetbrains/.idea/stacks.iml +22 -0
  213. package/ide/jetbrains/.idea/vcs.xml +6 -0
  214. package/ide/jetbrains/.idea/webResources.xml +14 -0
  215. package/ide/jetbrains/IntelliJ IDEA Global Settings +0 -0
  216. package/ide/jetbrains/installed.txt +4 -0
  217. package/ide/jetbrains/options/github-copilot.xml +5 -0
  218. package/ide/jetbrains/options/nodejs.xml +7 -0
  219. package/ide/jetbrains/options/templates.xml +124 -0
  220. package/ide/jetbrains/templates/JavaScript.xml +6 -0
  221. package/ide/jetbrains/templates/Stacks.xml +8 -0
  222. package/ide/vscode/.vscode/README.md +23 -0
  223. package/ide/vscode/.vscode/extensions.json +5 -0
  224. package/ide/vscode/.vscode/settings.json +176 -0
  225. package/ide/vscode/.vscode/stacks.code-snippets +181 -0
  226. package/ide/vscode/LICENSE.md +21 -0
  227. package/ide/vscode/README.md +36 -0
  228. package/ide/vscode/logo.png +0 -0
  229. package/ide/vscode/package.json +79 -0
  230. package/ide/zed/.zed/settings.json +139 -0
  231. package/lang/README.md +28 -0
  232. package/lang/de.yml +14 -0
  233. package/lang/en.yml +15 -0
  234. package/package.json +19 -3
  235. package/project/bootstrap +161 -0
  236. package/project/buddy +175 -0
  237. package/project/storage/framework/tsconfig.app.json +50 -0
  238. package/project/storage/framework/tsconfig.base.json +58 -0
  239. package/routes/core.ts +78 -0
  240. package/routes/dashboard-api.ts +233 -0
  241. package/routes/dashboard.ts +739 -0
  242. package/routes/email.ts +129 -0
  243. package/stores/[name].stx +16 -0
  244. package/stores/git.ts +71 -0
  245. package/stores/payment.ts +474 -0
  246. package/stores/queue.ts +43 -0
  247. package/stores/user.ts +29 -0
  248. package/stx-components-plugin.ts +25 -0
  249. package/styles/design-tokens.css +597 -0
  250. package/types/dashboard.ts +70 -0
  251. package/types/defaults.ts +438 -0
  252. package/vcs/github/CODE_OF_CONDUCT.md +83 -0
  253. package/vcs/github/CONTRIBUTING.md +187 -0
  254. package/vcs/github/EXPLANATIONS.md +41 -0
  255. package/vcs/github/FUNDING.yml +1 -0
  256. package/vcs/github/ISSUE_TEMPLATE/bug_report.yml +49 -0
  257. package/vcs/github/ISSUE_TEMPLATE/config.yml +10 -0
  258. package/vcs/github/ISSUE_TEMPLATE/feature_request.yml +44 -0
  259. package/vcs/github/SECURITY.md +70 -0
  260. package/vcs/github/renovate.json +5 -0
  261. package/vcs/github/stale.yml +14 -0
  262. package/vcs/github/workflows/README.md +16 -0
  263. package/vcs/github/workflows/ci.yml +114 -0
  264. package/vcs/github/workflows/export-size.yml +25 -0
  265. package/vcs/github/workflows/labeler.yml +13 -0
  266. package/vcs/github/workflows/release.yml +219 -0
  267. package/views/[...all].stx +8 -0
  268. package/views/about.md +3 -0
  269. package/views/auth/login.stx +1 -0
  270. package/views/auth/signup.stx +85 -0
  271. package/views/dashboard/.discovered-models.json +542 -0
  272. package/views/dashboard/AUDIT.md +904 -0
  273. package/views/dashboard/[...all].stx +89 -0
  274. package/views/dashboard/access-tokens/index.stx +177 -0
  275. package/views/dashboard/actions/index.stx +129 -0
  276. package/views/dashboard/analytics/blog/index.stx +356 -0
  277. package/views/dashboard/analytics/browsers/index.stx +263 -0
  278. package/views/dashboard/analytics/commerce/sales/index.stx +329 -0
  279. package/views/dashboard/analytics/commerce/web/index.stx +379 -0
  280. package/views/dashboard/analytics/countries/index.stx +289 -0
  281. package/views/dashboard/analytics/devices/index.stx +305 -0
  282. package/views/dashboard/analytics/events/index.stx +536 -0
  283. package/views/dashboard/analytics/index.stx +88 -0
  284. package/views/dashboard/analytics/marketing/index.stx +315 -0
  285. package/views/dashboard/analytics/pages/index.stx +271 -0
  286. package/views/dashboard/analytics/referrers/index.stx +319 -0
  287. package/views/dashboard/analytics/web/index.stx +356 -0
  288. package/views/dashboard/buddy/index.stx +198 -0
  289. package/views/dashboard/ci/index.stx +462 -0
  290. package/views/dashboard/cloud/index.stx +452 -0
  291. package/views/dashboard/commands/index.stx +295 -0
  292. package/views/dashboard/commerce/categories/index.stx +406 -0
  293. package/views/dashboard/commerce/coupons/index.stx +485 -0
  294. package/views/dashboard/commerce/customers/index.stx +410 -0
  295. package/views/dashboard/commerce/dashboard/index.stx +287 -0
  296. package/views/dashboard/commerce/delivery/delivery-routes.stx +305 -0
  297. package/views/dashboard/commerce/delivery/digital-delivery.stx +332 -0
  298. package/views/dashboard/commerce/delivery/drivers.stx +397 -0
  299. package/views/dashboard/commerce/delivery/index.stx +18 -0
  300. package/views/dashboard/commerce/delivery/license-keys.stx +380 -0
  301. package/views/dashboard/commerce/delivery/shipping-methods.stx +346 -0
  302. package/views/dashboard/commerce/delivery/shipping-rates.stx +338 -0
  303. package/views/dashboard/commerce/delivery/shipping-zones.stx +302 -0
  304. package/views/dashboard/commerce/delivery/tabs.ts +25 -0
  305. package/views/dashboard/commerce/gift-cards/index.stx +561 -0
  306. package/views/dashboard/commerce/manufacturers/index.stx +308 -0
  307. package/views/dashboard/commerce/orders/index.stx +247 -0
  308. package/views/dashboard/commerce/payments/index.stx +535 -0
  309. package/views/dashboard/commerce/pos/index.stx +653 -0
  310. package/views/dashboard/commerce/printers/devices/index.stx +273 -0
  311. package/views/dashboard/commerce/printers/receipts/index.stx +308 -0
  312. package/views/dashboard/commerce/products/detail.stx +563 -0
  313. package/views/dashboard/commerce/products/index.stx +370 -0
  314. package/views/dashboard/commerce/reviews/index.stx +656 -0
  315. package/views/dashboard/commerce/reviews/index.ts +0 -0
  316. package/views/dashboard/commerce/taxes/index.stx +377 -0
  317. package/views/dashboard/commerce/units/index.stx +317 -0
  318. package/views/dashboard/commerce/variants/index.stx +319 -0
  319. package/views/dashboard/commerce/waitlist/products.stx +942 -0
  320. package/views/dashboard/commerce/waitlist/restaurant.stx +1024 -0
  321. package/views/dashboard/components/index.stx +330 -0
  322. package/views/dashboard/composables/index.ts +19 -0
  323. package/views/dashboard/composables/useChart.ts +77 -0
  324. package/views/dashboard/composables/useNavigation.ts +99 -0
  325. package/views/dashboard/composables/useRole.ts +58 -0
  326. package/views/dashboard/composables/useTheme.ts +74 -0
  327. package/views/dashboard/content/authors/index.stx +171 -0
  328. package/views/dashboard/content/blog/index.stx +493 -0
  329. package/views/dashboard/content/categories/index.stx +169 -0
  330. package/views/dashboard/content/comments/index.stx +189 -0
  331. package/views/dashboard/content/dashboard.stx +383 -0
  332. package/views/dashboard/content/files/index.stx +706 -0
  333. package/views/dashboard/content/pages/index.stx +174 -0
  334. package/views/dashboard/content/posts/index.stx +269 -0
  335. package/views/dashboard/content/seo/index.stx +240 -0
  336. package/views/dashboard/content/tags/index.stx +167 -0
  337. package/views/dashboard/data/activity/index.stx +261 -0
  338. package/views/dashboard/data/dashboard/index.stx +116 -0
  339. package/views/dashboard/data/subscribers.stx +270 -0
  340. package/views/dashboard/data/teams.stx +275 -0
  341. package/views/dashboard/data/users.stx +279 -0
  342. package/views/dashboard/dependencies/index.stx +178 -0
  343. package/views/dashboard/deployments/[id].stx +234 -0
  344. package/views/dashboard/deployments/index.stx +9 -0
  345. package/views/dashboard/dns/index.stx +163 -0
  346. package/views/dashboard/environment/index.stx +283 -0
  347. package/views/dashboard/errors/index.stx +274 -0
  348. package/views/dashboard/forgot-password.stx +57 -0
  349. package/views/dashboard/functions/index.stx +159 -0
  350. package/views/dashboard/health/index.stx +248 -0
  351. package/views/dashboard/inbox/activity.stx +350 -0
  352. package/views/dashboard/inbox/index.stx +452 -0
  353. package/views/dashboard/inbox/settings.stx +290 -0
  354. package/views/dashboard/index.stx +252 -0
  355. package/views/dashboard/insights/index.stx +529 -0
  356. package/views/dashboard/jobs/[id].stx +430 -0
  357. package/views/dashboard/jobs/history.stx +222 -0
  358. package/views/dashboard/jobs/index.stx +214 -0
  359. package/views/dashboard/kanban/[id].stx +899 -0
  360. package/views/dashboard/kanban/index.stx +260 -0
  361. package/views/dashboard/layouts/default.stx +565 -0
  362. package/views/dashboard/layouts/guest.stx +10 -0
  363. package/views/dashboard/login.stx +48 -0
  364. package/views/dashboard/logs/index.stx +540 -0
  365. package/views/dashboard/mailboxes/index.stx +149 -0
  366. package/views/dashboard/management/permissions/index.stx +490 -0
  367. package/views/dashboard/marketing/campaigns/index.stx +604 -0
  368. package/views/dashboard/marketing/lists/index.stx +514 -0
  369. package/views/dashboard/marketing/reviews/index.stx +475 -0
  370. package/views/dashboard/marketing/social-posts/index.stx +560 -0
  371. package/views/dashboard/models/[model].stx +195 -0
  372. package/views/dashboard/models/index.stx +159 -0
  373. package/views/dashboard/monitoring/errors/index.stx +415 -0
  374. package/views/dashboard/notifications/dashboard.stx +383 -0
  375. package/views/dashboard/notifications/email.stx +336 -0
  376. package/views/dashboard/notifications/history.stx +373 -0
  377. package/views/dashboard/notifications/sms.stx +332 -0
  378. package/views/dashboard/packages/index.stx +195 -0
  379. package/views/dashboard/queries/[id].stx +381 -0
  380. package/views/dashboard/queries/history.stx +227 -0
  381. package/views/dashboard/queries/index.stx +335 -0
  382. package/views/dashboard/queries/slow.stx +318 -0
  383. package/views/dashboard/queue/index.stx +427 -0
  384. package/views/dashboard/realtime/index.stx +429 -0
  385. package/views/dashboard/register.stx +46 -0
  386. package/views/dashboard/releases/index.stx +389 -0
  387. package/views/dashboard/requests/index.stx +462 -0
  388. package/views/dashboard/serverless/index.stx +475 -0
  389. package/views/dashboard/servers/[id].stx +299 -0
  390. package/views/dashboard/servers/index.stx +483 -0
  391. package/views/dashboard/settings/billing.stx +50 -0
  392. package/views/dashboard/settings/index.stx +256 -0
  393. package/views/dashboard/settings/mail.stx +252 -0
  394. package/views/dashboard/stores/auth.ts +123 -0
  395. package/views/dashboard/stores/ci.ts +342 -0
  396. package/views/dashboard/stores/index.ts +129 -0
  397. package/views/dashboard/stores/kanban.ts +723 -0
  398. package/views/dashboard/stores/rbac.ts +350 -0
  399. package/views/dashboard/stx.config.ts +34 -0
  400. package/views/dashboard/teams/[id].stx +170 -0
  401. package/views/forum/category.stx +92 -0
  402. package/views/forum/index.stx +209 -0
  403. package/views/forum/new-topic.stx +113 -0
  404. package/views/forum/profile.stx +1 -0
  405. package/views/forum/topic.stx +143 -0
  406. package/views/hello-world/[name].stx +47 -0
  407. package/views/index.stx +21 -0
  408. package/views/system-tray/index.stx +147 -0
@@ -0,0 +1,289 @@
1
+ #!/usr/bin/env bun
2
+
3
+ import { spawnSync } from 'node:child_process';
4
+ import fs from 'node:fs';
5
+ import os from 'node:os';
6
+ import path from 'node:path';
7
+ import { fileURLToPath, pathToFileURL } from 'node:url';
8
+
9
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
+ const skillRoot = path.resolve(__dirname, '..');
11
+
12
+ const TYPES = new Set(['architecture', 'workflow', 'sequence', 'dataflow', 'lifecycle']);
13
+
14
+ function usage() {
15
+ return `Usage:
16
+ technical-diagrams render <type> <input.json> [output.html]
17
+ technical-diagrams validate <type> <input.json> [--json] [--layout-json]
18
+ technical-diagrams inspect <type> <input.json>
19
+ technical-diagrams check <output.html>
20
+ technical-diagrams examples [output-directory]
21
+ technical-diagrams doctor
22
+ technical-diagrams demo [output-directory]
23
+
24
+ Types:
25
+ architecture, workflow, sequence, dataflow, lifecycle
26
+ `;
27
+ }
28
+
29
+ function fail(message, code = 2) {
30
+ console.error(message);
31
+ process.exit(code);
32
+ }
33
+
34
+ function rendererPath(type) {
35
+ if (!TYPES.has(type)) {
36
+ fail(`Unknown diagram type "${type}". Expected one of: ${[...TYPES].join(', ')}`);
37
+ }
38
+ return path.join(skillRoot, 'renderers', type, `render-${type}.mjs`);
39
+ }
40
+
41
+ function runRuntime(args, options = {}) {
42
+ return spawnSync(process.execPath, [
43
+ `--config=${path.join(skillRoot, 'bunfig.toml')}`,
44
+ '--no-env-file',
45
+ ...args,
46
+ ], {
47
+ cwd: options.cwd || process.cwd(),
48
+ encoding: 'utf8',
49
+ stdio: options.stdio || 'inherit',
50
+ });
51
+ }
52
+
53
+ function exitFrom(result) {
54
+ if (result.error) fail(result.error.message, 1);
55
+ process.exit(result.status ?? 1);
56
+ }
57
+
58
+ function commandRender(args) {
59
+ const [type, input, output] = args;
60
+ if (!type || !input) fail(usage());
61
+ const result = runRuntime([rendererPath(type), input, ...(output ? [output] : [])]);
62
+ if (result.status !== 0) exitFrom(result);
63
+ }
64
+
65
+ function commandCheck(args) {
66
+ const [html] = args;
67
+ if (!html) fail(usage());
68
+ const result = runRuntime([path.join(skillRoot, 'scripts/check-render-output.mjs'), html]);
69
+ if (result.status !== 0) exitFrom(result);
70
+ }
71
+
72
+ function commandExamples(args) {
73
+ if (args.length > 1) fail(usage());
74
+ const outputDirectory = path.resolve(args[0] || process.cwd());
75
+ fs.mkdirSync(outputDirectory, { recursive: true });
76
+ const result = runRuntime([
77
+ path.join(skillRoot, 'scripts/render-examples.mjs'),
78
+ outputDirectory,
79
+ ]);
80
+ if (result.status !== 0) exitFrom(result);
81
+ }
82
+
83
+ async function commandDoctor() {
84
+ const checks = [];
85
+ const bunVersion = process.versions.bun || '0.0.0';
86
+ const [bunMajor, bunMinor] = bunVersion.split('.').map(Number);
87
+ checks.push({
88
+ label: `Bun v${bunVersion} (requires >=1.3)`,
89
+ ok: bunMajor > 1 || (bunMajor === 1 && bunMinor >= 3),
90
+ missing: 0,
91
+ failureLabel: 'unsupported',
92
+ });
93
+
94
+ const template = path.join(skillRoot, 'assets/template.html');
95
+ checks.push({
96
+ label: 'Core template',
97
+ ok: fs.existsSync(template),
98
+ missing: fs.existsSync(template) ? 0 : 1,
99
+ });
100
+
101
+ const examplesRenderer = path.join(skillRoot, 'scripts/render-examples.mjs');
102
+ checks.push({
103
+ label: 'Example renderer',
104
+ ok: fs.existsSync(examplesRenderer),
105
+ missing: fs.existsSync(examplesRenderer) ? 0 : 1,
106
+ });
107
+
108
+ const isolatedConfig = path.join(skillRoot, 'bunfig.toml');
109
+ checks.push({
110
+ label: 'Isolated Bun configuration',
111
+ ok: fs.existsSync(isolatedConfig),
112
+ missing: fs.existsSync(isolatedConfig) ? 0 : 1,
113
+ });
114
+
115
+ const validators = path.join(skillRoot, 'renderers/shared/generated-validators.mjs');
116
+ const validatorsExist = fs.existsSync(validators);
117
+ let validatorsValid = false;
118
+ if (validatorsExist) {
119
+ try {
120
+ const module = await import(`${pathToFileURL(validators).href}?doctor=${Date.now()}`);
121
+ validatorsValid = [...TYPES].every((type) => typeof module[type] === 'function');
122
+ } catch {
123
+ validatorsValid = false;
124
+ }
125
+ }
126
+ checks.push({
127
+ label: 'Standalone schema validators',
128
+ ok: validatorsValid,
129
+ missing: validatorsExist ? 0 : 1,
130
+ invalid: validatorsExist && !validatorsValid ? 1 : 0,
131
+ failureLabel: validatorsExist ? 'invalid' : 'missing',
132
+ });
133
+
134
+ const examples = {
135
+ architecture: 'web-app.architecture.json',
136
+ workflow: 'agent-tool-call.workflow.json',
137
+ sequence: 'cache-miss-request.sequence.json',
138
+ dataflow: 'product-analytics.dataflow.json',
139
+ lifecycle: 'agent-run.lifecycle.json',
140
+ };
141
+
142
+ for (const type of TYPES) {
143
+ const required = [
144
+ path.join(skillRoot, 'renderers', type, `render-${type}.mjs`),
145
+ path.join(skillRoot, 'schemas', `${type}.schema.json`),
146
+ path.join(skillRoot, 'examples', examples[type]),
147
+ ];
148
+ const missing = required.filter((file) => !fs.existsSync(file)).length;
149
+ checks.push({
150
+ label: `${type} renderer, schema, and example`,
151
+ ok: missing === 0,
152
+ missing,
153
+ });
154
+ }
155
+
156
+ console.log('Technical diagram renderer doctor\n');
157
+ for (const check of checks) {
158
+ console.log(`[${check.ok ? 'ok' : (check.failureLabel || 'missing')}] ${check.label}`);
159
+ }
160
+
161
+ const runtimeFailed = checks[0].ok ? 0 : 1;
162
+ const missingFiles = checks.reduce((count, check) => count + check.missing, 0);
163
+ const invalidRuntime = checks.reduce((count, check) => count + (check.invalid || 0), 0);
164
+ if (runtimeFailed === 0 && missingFiles === 0 && invalidRuntime === 0) {
165
+ console.log('\nTechnical diagram renderer is ready.');
166
+ return;
167
+ }
168
+
169
+ const problems = [];
170
+ if (runtimeFailed) problems.push('Bun 1.3 or newer is required');
171
+ if (missingFiles) problems.push(`${missingFiles} required file${missingFiles === 1 ? '' : 's'} missing`);
172
+ if (invalidRuntime) problems.push(`${invalidRuntime} runtime check${invalidRuntime === 1 ? '' : 's'} failed`);
173
+ console.error(`\nTechnical diagram renderer is not ready: ${problems.join('; ')}.`);
174
+ process.exitCode = 1;
175
+ }
176
+
177
+ function commandDemo(args) {
178
+ if (args.length > 1) fail(usage());
179
+
180
+ const outputDirectory = path.resolve(args[0] || process.cwd());
181
+ const output = path.join(outputDirectory, 'technical-diagram-demo.html');
182
+ const input = path.join(skillRoot, 'examples/web-app.architecture.json');
183
+
184
+ try {
185
+ fs.mkdirSync(outputDirectory, { recursive: true });
186
+ } catch (error) {
187
+ fail(`Could not create demo directory "${outputDirectory}": ${error.message}`, 1);
188
+ }
189
+
190
+ const result = runRuntime([rendererPath('architecture'), input, output]);
191
+ if (result.status !== 0) exitFrom(result);
192
+
193
+ console.log(`\nDemo ready: ${output}`);
194
+ console.log('Next: open the HTML in your browser, then render your own diagram:');
195
+ console.log(' technical-diagrams render architecture <input.json> <output.html>');
196
+ }
197
+
198
+ function commandValidate(args) {
199
+ const json = args.includes('--json');
200
+ const layoutJson = args.includes('--layout-json');
201
+ const rest = args.filter((arg) => arg !== '--json' && arg !== '--layout-json');
202
+ const [type, input] = rest;
203
+ if (!type || !input) fail(usage());
204
+ const renderer = rendererPath(type);
205
+
206
+ if (layoutJson) {
207
+ if (type !== 'architecture') {
208
+ fail('--layout-json is currently supported for architecture diagrams only.');
209
+ }
210
+ const result = runRuntime([renderer, input, '/dev/null', '--layout-json'], { stdio: 'pipe' });
211
+ if (result.status !== 0) {
212
+ if (result.stderr) process.stderr.write(result.stderr);
213
+ if (result.stdout) process.stdout.write(result.stdout);
214
+ process.exit(result.status ?? 1);
215
+ }
216
+ process.stdout.write(result.stdout);
217
+ return;
218
+ }
219
+
220
+ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'technical-diagrams-validate-'));
221
+ const out = path.join(tmp, `${type}.html`);
222
+ let exitCode = 0;
223
+
224
+ try {
225
+ const render = runRuntime([renderer, input, out], { stdio: 'pipe' });
226
+ if (render.status !== 0) {
227
+ if (render.stderr) process.stderr.write(render.stderr);
228
+ if (render.stdout) process.stdout.write(render.stdout);
229
+ exitCode = render.status ?? 1;
230
+ } else {
231
+ const check = runRuntime([path.join(skillRoot, 'scripts/check-render-output.mjs'), out], { stdio: 'pipe' });
232
+ if (check.status !== 0) {
233
+ if (check.stdout) process.stdout.write(check.stdout);
234
+ if (check.stderr) process.stderr.write(check.stderr);
235
+ exitCode = check.status ?? 1;
236
+ } else {
237
+ const result = JSON.parse(check.stdout);
238
+ if (json) {
239
+ console.log(JSON.stringify({
240
+ ok: true,
241
+ type,
242
+ input: path.resolve(input),
243
+ checks: result.checks,
244
+ }, null, 2));
245
+ } else {
246
+ console.log(`ok ${type} ${path.resolve(input)} (${result.checks.length} checks)`);
247
+ }
248
+ }
249
+ }
250
+ } finally {
251
+ fs.rmSync(tmp, { recursive: true, force: true });
252
+ }
253
+
254
+ if (exitCode !== 0) process.exit(exitCode);
255
+ }
256
+
257
+ const [command, ...args] = process.argv.slice(2);
258
+
259
+ switch (command) {
260
+ case undefined:
261
+ case '-h':
262
+ case '--help':
263
+ case 'help':
264
+ console.log(usage());
265
+ break;
266
+ case 'render':
267
+ commandRender(args);
268
+ break;
269
+ case 'validate':
270
+ commandValidate(args);
271
+ break;
272
+ case 'inspect':
273
+ commandValidate([...args, '--layout-json']);
274
+ break;
275
+ case 'check':
276
+ commandCheck(args);
277
+ break;
278
+ case 'examples':
279
+ commandExamples(args);
280
+ break;
281
+ case 'doctor':
282
+ await commandDoctor();
283
+ break;
284
+ case 'demo':
285
+ commandDemo(args);
286
+ break;
287
+ default:
288
+ fail(`Unknown command "${command}".\n\n${usage()}`);
289
+ }
@@ -0,0 +1 @@
1
+ # Intentionally empty. The diagram renderer must not inherit application preloads.
@@ -0,0 +1,64 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "lifecycle",
4
+ "meta": {
5
+ "title": "Agent Run Lifecycle",
6
+ "subtitle": "State machine for planning, tool execution, human approval, retries, and terminal outcomes",
7
+ "output": "examples/lifecycle-agent-run.html",
8
+ "viewBox": [980, 660]
9
+ },
10
+ "lanes": [
11
+ { "id": "main", "label": "Lifecycle phases" },
12
+ { "id": "waiting", "label": "Interruptions" },
13
+ { "id": "exceptions", "label": "Recovery loop" },
14
+ { "id": "terminal", "label": "Terminal exits" }
15
+ ],
16
+ "states": [
17
+ { "id": "queued", "type": "start", "label": "Queued", "sublabel": "request accepted", "lane": "main", "col": 0, "step": "01", "tag": "entry" },
18
+ { "id": "planning", "type": "active", "label": "Planning", "sublabel": "build task graph", "lane": "main", "col": 1, "step": "02", "tag": "model" },
19
+ { "id": "executing", "type": "active", "label": "Executing", "sublabel": "tool calls", "lane": "main", "col": 2, "step": "03", "tag": "work" },
20
+ { "id": "reviewing", "type": "decision", "label": "Reviewing", "sublabel": "quality gate", "lane": "main", "col": 3, "step": "04", "tag": "check" },
21
+ { "id": "completed", "type": "success", "label": "Completed", "sublabel": "final response", "lane": "main", "col": 4, "step": "05", "tag": "done" },
22
+ { "id": "approval", "type": "waiting", "label": "Needs Approval", "sublabel": "human gate", "lane": "waiting", "col": 0, "tag": "pause" },
23
+ { "id": "blocked", "type": "waiting", "label": "Blocked", "sublabel": "missing input", "lane": "waiting", "col": 1, "tag": "wait" },
24
+ { "id": "failed", "type": "failure", "label": "Failed", "sublabel": "recoverable error", "lane": "exceptions", "col": 0, "yOffset": 78, "tag": "retryable" },
25
+ { "id": "cancelled", "type": "failure", "label": "Cancelled", "sublabel": "user stopped", "lane": "terminal", "col": 0, "tag": "terminal" },
26
+ { "id": "expired", "type": "failure", "label": "Expired", "sublabel": "timeout", "lane": "terminal", "col": 1, "tag": "terminal" }
27
+ ],
28
+ "transitions": [
29
+ { "from": "executing", "to": "approval", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
30
+ { "from": "reviewing", "to": "blocked", "variant": "default", "route": "drop" },
31
+ { "from": "executing", "to": "failed", "variant": "security", "fromSide": "left", "toSide": "top", "via": [[340, 342], [402, 342]] },
32
+ { "from": "blocked", "to": "expired", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
33
+ { "from": "approval", "to": "cancelled", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" }
34
+ ],
35
+ "cards": [
36
+ {
37
+ "dot": "emerald",
38
+ "title": "Main Path",
39
+ "items": [
40
+ "The run has five ordered phases from queue to completion",
41
+ "The primary lifecycle is carried by one horizontal rail",
42
+ "Completion is a phase, not a detached side box"
43
+ ]
44
+ },
45
+ {
46
+ "dot": "amber",
47
+ "title": "Human + Input Gates",
48
+ "items": [
49
+ "Approval pauses execution without ending the run",
50
+ "Blocked waits for missing user input",
51
+ "Wait states can resume back into planning or execution"
52
+ ]
53
+ },
54
+ {
55
+ "dot": "rose",
56
+ "title": "Terminal + Recovery",
57
+ "items": [
58
+ "Failed loops back while retry budget remains",
59
+ "Cancelled and Expired are exits from the lifecycle",
60
+ "Terminal exits do not point back into active execution"
61
+ ]
62
+ }
63
+ ]
64
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "workflow",
4
+ "meta": {
5
+ "title": "Agent Tool Call Workflow",
6
+ "subtitle": "Renderer-driven workflow prototype with lanes, anchored nodes, and orthogonal edges",
7
+ "output": "examples/workflow-agent-tool-call-rendered.html",
8
+ "viewBox": [720, 900]
9
+ },
10
+ "lanes": [
11
+ { "id": "ui", "label": "User Interface" },
12
+ { "id": "agent", "label": "Agent Runtime" },
13
+ { "id": "policy", "label": "Policy Boundary" },
14
+ { "id": "exceptions", "label": "Exception Handling", "variant": "exception" },
15
+ { "id": "tools", "label": "Tool Execution" },
16
+ { "id": "trace", "label": "Observability" }
17
+ ],
18
+ "phases": [
19
+ { "id": "intake", "label": "Intake", "fromCol": 0, "toCol": 1 },
20
+ { "id": "reasoning", "label": "Plan + route", "fromCol": 2, "toCol": 3, "variant": "emphasis" },
21
+ { "id": "execution", "label": "Execute + report", "fromCol": 4, "toCol": 5, "variant": "dashed" }
22
+ ],
23
+ "groups": [
24
+ { "id": "agent_loop", "label": "Planning loop", "lane": "agent", "fromCol": 2, "toCol": 3, "variant": "emphasis" },
25
+ { "id": "tool_work", "label": "Tool work", "lane": "tools", "fromCol": 4, "toCol": 5, "variant": "dashed" },
26
+ { "id": "exception_path", "label": "Human or policy stop", "lane": "exceptions", "fromCol": 3, "toCol": 5, "variant": "security" }
27
+ ],
28
+ "mainPath": ["user", "chat", "planner", "router", "approval", "tool", "external", "final"],
29
+ "nodes": [
30
+ { "id": "user", "lane": "ui", "col": 0, "type": "external", "label": "User", "sublabel": "asks for work" },
31
+ { "id": "chat", "lane": "ui", "col": 1, "type": "frontend", "label": "Chat Surface", "sublabel": "thread + files" },
32
+ { "id": "final", "lane": "ui", "col": 5, "type": "backend", "label": "Final Reply", "sublabel": "answer + changes" },
33
+ { "id": "planner", "lane": "agent", "col": 2, "type": "backend", "label": "Agent Planner", "sublabel": "plan next step", "tag": "context aware" },
34
+ { "id": "router", "lane": "agent", "col": 3, "type": "backend", "label": "Tool Router", "sublabel": "choose capability" },
35
+ { "id": "approval", "lane": "policy", "col": 3, "type": "security", "label": "Approval Gate", "sublabel": "scope + consent", "tag": "block risky ops" },
36
+ { "id": "blocked", "lane": "exceptions", "col": 4, "type": "security", "label": "Blocked", "sublabel": "wait or reject" },
37
+ { "id": "retry", "lane": "exceptions", "col": 5, "type": "messagebus", "label": "Retry Path", "sublabel": "revise request" },
38
+ { "id": "tool", "lane": "tools", "col": 4, "type": "messagebus", "label": "Tool Call", "sublabel": "shell / browser / MCP", "tag": "structured result" },
39
+ { "id": "external", "lane": "tools", "col": 5, "type": "cloud", "label": "External API", "sublabel": "network service" },
40
+ { "id": "store", "lane": "trace", "col": 1, "type": "database", "label": "Context Store", "sublabel": "repo + memory" },
41
+ { "id": "trace", "lane": "trace", "col": 4, "type": "database", "label": "Trace Log", "sublabel": "events + output" }
42
+ ],
43
+ "edges": [
44
+ { "from": "user", "to": "chat", "variant": "default" },
45
+ { "from": "chat", "to": "planner", "label": "plan", "variant": "emphasis", "fromSide": "bottom", "toSide": "top", "route": "drop", "labelSegment": 1 },
46
+ { "from": "planner", "to": "router", "variant": "default" },
47
+ { "from": "router", "to": "approval", "label": "needs approval?", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "drop", "labelSegment": 0, "labelDx": 34, "labelDy": 18 },
48
+ { "from": "approval", "to": "tool", "variant": "emphasis", "fromSide": "left", "toSide": "left", "route": "return-left" },
49
+ { "from": "approval", "to": "blocked", "label": "denied", "variant": "security", "role": "error", "fromSide": "bottom", "toSide": "top", "route": "drop", "labelSegment": 1, "labelDy": 12 },
50
+ { "from": "blocked", "to": "retry", "variant": "dashed", "role": "branch" },
51
+ { "from": "tool", "to": "external", "variant": "default" },
52
+ { "from": "external", "to": "final", "variant": "emphasis", "role": "return", "fromSide": "right", "toSide": "right", "route": "outside-right", "width": 1.2 },
53
+ { "from": "external", "to": "trace", "label": "record result", "variant": "dashed", "fromSide": "bottom", "toSide": "bottom", "route": "bottom-channel", "labelSegment": 1 },
54
+ { "from": "store", "to": "trace", "label": "trace + memory", "variant": "dashed", "labelAt": [365, 735] }
55
+ ],
56
+ "cards": [
57
+ {
58
+ "dot": "cyan",
59
+ "title": "Renderer Rules",
60
+ "items": [
61
+ "Lanes and columns determine node placement",
62
+ "Edges attach to explicit node anchors",
63
+ "Cross-lane paths use orthogonal routing",
64
+ "Short adjacent links stay unlabeled"
65
+ ]
66
+ },
67
+ {
68
+ "dot": "rose",
69
+ "title": "Workflow Semantics",
70
+ "items": [
71
+ "Approval is a first-class policy step",
72
+ "Consent gates are visible in the main path",
73
+ "External calls stay inside the tool lane",
74
+ "Trace writes are separate from the hot path"
75
+ ]
76
+ },
77
+ {
78
+ "dot": "emerald",
79
+ "title": "Why It Matters",
80
+ "items": [
81
+ "This is closer to a diagram_type renderer",
82
+ "The graph can be edited without SVG surgery",
83
+ "Layout rules can be tested and improved",
84
+ "A future IR can reuse this shape directly"
85
+ ]
86
+ }
87
+ ]
88
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "sequence",
4
+ "meta": {
5
+ "title": "Cache Miss Request Sequence",
6
+ "subtitle": "Frontend request path with auth, cache fallback, persistence, and async trace",
7
+ "output": "examples/sequence-cache-miss-request.html",
8
+ "viewBox": [820, 760]
9
+ },
10
+ "participants": [
11
+ { "id": "user", "type": "external", "label": "User", "sublabel": "browser session" },
12
+ { "id": "web", "type": "frontend", "label": "Web App", "sublabel": "React UI" },
13
+ { "id": "api", "type": "backend", "label": "API", "sublabel": "request handler" },
14
+ { "id": "auth", "type": "security", "label": "Auth", "sublabel": "JWT verify" },
15
+ { "id": "redis", "type": "database", "label": "Redis", "sublabel": "cache" },
16
+ { "id": "db", "type": "database", "label": "Postgres", "sublabel": "source of truth" },
17
+ { "id": "trace", "type": "messagebus", "label": "Trace", "sublabel": "async event" }
18
+ ],
19
+ "segments": [
20
+ { "from": 150, "to": 295, "label": "Request" },
21
+ { "from": 315, "to": 505, "label": "Fallback" },
22
+ { "from": 525, "to": 665, "label": "Response + trace" }
23
+ ],
24
+ "messages": [
25
+ { "from": "user", "to": "web", "y": 185, "label": "open page", "variant": "default" },
26
+ { "from": "web", "to": "api", "y": 228, "label": "GET /dashboard", "variant": "emphasis" },
27
+ { "from": "api", "to": "auth", "y": 270, "label": "verify JWT", "variant": "security" },
28
+ { "from": "auth", "to": "api", "y": 305, "label": "claims ok", "variant": "return" },
29
+ { "from": "api", "to": "redis", "y": 354, "label": "read cache", "variant": "default" },
30
+ { "from": "redis", "to": "api", "y": 391, "label": "miss", "variant": "return" },
31
+ { "from": "api", "to": "db", "y": 443, "label": "query profile + metrics", "variant": "emphasis" },
32
+ { "from": "db", "to": "api", "y": 489, "label": "rows", "variant": "return" },
33
+ { "from": "api", "to": "redis", "y": 536, "label": "set cache", "variant": "dashed" },
34
+ { "from": "api", "to": "trace", "y": 580, "label": "emit trace", "variant": "dashed" },
35
+ { "from": "api", "to": "web", "y": 625, "label": "200 JSON", "variant": "return" },
36
+ { "from": "web", "to": "user", "y": 662, "label": "render", "variant": "return" }
37
+ ],
38
+ "activations": [
39
+ { "participant": "web", "from": 220, "to": 668, "type": "frontend" },
40
+ { "participant": "api", "from": 228, "to": 632, "type": "backend" },
41
+ { "participant": "auth", "from": 265, "to": 310, "type": "security" },
42
+ { "participant": "redis", "from": 349, "to": 398, "type": "database" },
43
+ { "participant": "db", "from": 438, "to": 496, "type": "database" },
44
+ { "participant": "trace", "from": 575, "to": 630, "type": "messagebus" }
45
+ ],
46
+ "cards": [
47
+ {
48
+ "dot": "emerald",
49
+ "title": "Happy Path",
50
+ "items": [
51
+ "The main request is Web App -> API -> data source -> response",
52
+ "Return messages are quieter than forward calls",
53
+ "Activation bars make ownership duration visible"
54
+ ]
55
+ },
56
+ {
57
+ "dot": "rose",
58
+ "title": "Policy + Fallback",
59
+ "items": [
60
+ "JWT verification is colored as a security interaction",
61
+ "Cache miss is visible without overpowering the main path",
62
+ "Database access only appears after cache fallback"
63
+ ]
64
+ },
65
+ {
66
+ "dot": "orange",
67
+ "title": "Async Trace",
68
+ "items": [
69
+ "Trace emission is dashed and secondary",
70
+ "It does not block the response path",
71
+ "The diagram separates user-facing latency from observability"
72
+ ]
73
+ }
74
+ ]
75
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "dataflow",
4
+ "meta": {
5
+ "title": "Product Analytics Data Flow",
6
+ "subtitle": "Events, consent, PII isolation, warehouse sync, and downstream analytics",
7
+ "output": "examples/dataflow-product-analytics.html",
8
+ "viewBox": [1080, 760]
9
+ },
10
+ "stages": [
11
+ { "label": "Sources" },
12
+ { "label": "Ingest" },
13
+ { "label": "Process" },
14
+ { "label": "Store" },
15
+ { "label": "Consume" }
16
+ ],
17
+ "nodes": [
18
+ { "id": "web", "type": "frontend", "label": "Web App", "sublabel": "browser SDK", "stage": 0, "row": 0, "tag": "events" },
19
+ { "id": "mobile", "type": "frontend", "label": "Mobile", "sublabel": "iOS / Android", "stage": 0, "row": 2, "tag": "events" },
20
+ { "id": "edge", "type": "cloud", "label": "Edge API", "sublabel": "collector", "stage": 1, "row": 1, "tag": "TLS" },
21
+ { "id": "consent", "type": "security", "label": "Consent Gate", "sublabel": "policy filter", "stage": 2, "row": 0, "tag": "PII guard" },
22
+ { "id": "stream", "type": "messagebus", "label": "Event Stream", "sublabel": "Kafka topic", "stage": 2, "row": 2, "tag": "ordered" },
23
+ { "id": "pii", "type": "security", "label": "PII Vault", "sublabel": "encrypted", "stage": 3, "row": 0, "tag": "restricted" },
24
+ { "id": "warehouse", "type": "database", "label": "Warehouse", "sublabel": "analytics tables", "stage": 3, "row": 2, "tag": "curated" },
25
+ { "id": "features", "type": "database", "label": "Feature Store", "sublabel": "daily batch", "stage": 3, "row": 4, "tag": "derived" },
26
+ { "id": "dashboard", "type": "backend", "label": "Dashboards", "sublabel": "product metrics", "stage": 4, "row": 1, "tag": "SQL" },
27
+ { "id": "model", "type": "backend", "label": "ML Model", "sublabel": "ranking job", "stage": 4, "row": 4, "tag": "features" }
28
+ ],
29
+ "flows": [
30
+ { "from": "web", "to": "edge", "label": "clickstream", "classification": "user events", "variant": "emphasis", "fromSide": "right", "toSide": "left", "via": [[184, 157], [184, 271]], "labelAt": [204, 190] },
31
+ { "from": "mobile", "to": "edge", "label": "app events", "classification": "device events", "variant": "default", "fromSide": "right", "toSide": "left", "via": [[222, 385], [222, 271]], "labelAt": [220, 342] },
32
+ { "from": "edge", "to": "consent", "label": "identity + consent", "classification": "PII touch", "variant": "security", "fromSide": "top", "toSide": "left", "via": [[315, 112], [450, 112], [450, 157]], "labelAt": [382, 100] },
33
+ { "from": "edge", "to": "stream", "label": "accepted events", "classification": "append-only", "variant": "emphasis", "fromSide": "right", "toSide": "left", "via": [[420, 271], [420, 385]], "labelAt": [438, 324] },
34
+ { "from": "consent", "to": "pii", "label": "identity map", "classification": "encrypted PII", "variant": "security", "route": "straight", "labelAt": [638, 144] },
35
+ { "from": "stream", "to": "warehouse", "label": "normalized facts", "classification": "non-PII", "variant": "emphasis", "route": "straight", "labelAt": [638, 372] },
36
+ { "from": "warehouse", "to": "features", "label": "daily aggregates", "classification": "batch", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "route": "straight", "labelAt": [745, 496] },
37
+ { "from": "warehouse", "to": "dashboard", "label": "metrics SQL", "classification": "read-only", "variant": "default", "fromSide": "right", "toSide": "left", "via": [[852, 385], [852, 271]], "labelAt": [830, 326] },
38
+ { "from": "features", "to": "model", "label": "feature vectors", "classification": "derived", "variant": "dashed", "route": "straight", "labelAt": [852, 598] },
39
+ { "from": "pii", "to": "dashboard", "label": "restricted join", "classification": "approved only", "variant": "security", "fromSide": "right", "toSide": "top", "via": [[878, 157], [878, 212], [960, 212]], "labelAt": [880, 198] }
40
+ ],
41
+ "cards": [
42
+ {
43
+ "dot": "emerald",
44
+ "title": "Primary Data Path",
45
+ "items": [
46
+ "Events move left to right through source, ingest, process, store, and consume stages",
47
+ "The hot path stays visually clear even with secondary batch flows",
48
+ "Labels name data assets instead of generic API verbs"
49
+ ]
50
+ },
51
+ {
52
+ "dot": "rose",
53
+ "title": "Sensitive Boundary",
54
+ "items": [
55
+ "Consent and PII paths are styled as security flows",
56
+ "PII lands in a restricted vault, separate from the analytics warehouse",
57
+ "Restricted joins are visible without implying default access"
58
+ ]
59
+ },
60
+ {
61
+ "dot": "orange",
62
+ "title": "Derived Consumers",
63
+ "items": [
64
+ "Dashboards read curated facts from the warehouse",
65
+ "Feature vectors are derived by batch from analytics tables",
66
+ "Consumption paths stay distinct from collection and consent handling"
67
+ ]
68
+ }
69
+ ]
70
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "schema_version": 1,
3
+ "diagram_type": "architecture",
4
+ "meta": {
5
+ "title": "Sample Web App",
6
+ "subtitle": "Classic 3-tier SaaS on AWS",
7
+ "output": "web-app-rendered.html"
8
+ },
9
+ "components": [
10
+ { "id": "users", "type": "external", "label": "Users", "sublabel": "Browser / Mobile", "pos": [40, 300], "size": [120, 60] },
11
+ { "id": "auth", "type": "security", "label": "Auth Provider", "sublabel": "OAuth 2.0", "pos": [40, 110], "size": [120, 64], "tag": "JWT + PKCE" },
12
+ { "id": "cdn", "type": "cloud", "label": "CloudFront", "sublabel": "CDN", "pos": [250, 300], "size": [130, 60] },
13
+ { "id": "lb", "type": "cloud", "label": "Load Balancer", "sublabel": "HTTPS :443", "pos": [460, 300], "size": [130, 60] },
14
+ { "id": "api", "type": "backend", "label": "API Server", "sublabel": "FastAPI :8000", "pos": [670, 300], "size": [130, 60] },
15
+ { "id": "cache", "type": "database", "label": "Redis", "sublabel": "cache :6379", "pos": [670, 150], "size": [130, 60] },
16
+ { "id": "db", "type": "database", "label": "PostgreSQL", "sublabel": "primary :5432", "pos": [880, 300], "size": [130, 60] },
17
+ { "id": "s3", "type": "cloud", "label": "S3", "sublabel": "static assets", "pos": [250, 440], "size": [130, 60], "tag": "OAI protected" },
18
+ { "id": "queue", "type": "messagebus", "label": "SQS", "sublabel": "job queue", "pos": [670, 440], "size": [130, 60] },
19
+ { "id": "worker", "type": "backend", "label": "Worker", "sublabel": "async jobs", "pos": [880, 440], "size": [130, 60] }
20
+ ],
21
+ "boundaries": [
22
+ { "kind": "region", "label": "AWS Region: us-west-2", "wraps": ["cdn", "lb", "api", "cache", "db", "s3", "queue", "worker"] },
23
+ { "kind": "security-group", "label": "sg-api :443/:8000", "wraps": ["lb", "api"] }
24
+ ],
25
+ "connections": [
26
+ { "from": "users", "to": "cdn", "label": "HTTPS", "variant": "emphasis" },
27
+ { "from": "auth", "to": "api", "label": "verify JWT", "variant": "security", "fromSide": "right", "toSide": "top" },
28
+ { "from": "cdn", "to": "lb" },
29
+ { "from": "cdn", "to": "s3", "label": "static", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "labelDy": 58 },
30
+ { "from": "lb", "to": "api" },
31
+ { "from": "api", "to": "cache", "label": "read-through", "fromSide": "top", "toSide": "bottom", "labelDy": -68 },
32
+ { "from": "api", "to": "db", "label": "SQL" },
33
+ { "from": "api", "to": "queue", "label": "enqueue", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "labelDy": 58 },
34
+ { "from": "queue", "to": "worker" }
35
+ ],
36
+ "cards": [
37
+ { "dot": "cyan", "title": "Edge", "items": ["CloudFront CDN fronts all traffic", "S3 serves static assets via OAI"] },
38
+ { "dot": "emerald", "title": "Application", "items": ["FastAPI behind an HTTPS load balancer", "Redis read-through cache", "Async work drained from SQS by a worker"] },
39
+ { "dot": "rose", "title": "Security", "items": ["OAuth 2.0 with JWT + PKCE", "API + LB isolated in a security group"] }
40
+ ]
41
+ }