@builderos/create-agent-os 0.0.2

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 (194) hide show
  1. package/README.md +39 -0
  2. package/bin/cli.js +133 -0
  3. package/package.json +40 -0
  4. package/src/template/App.tsx +68 -0
  5. package/src/template/agent-os/commands/create-tasks/1-get-spec-requirements.md +19 -0
  6. package/src/template/agent-os/commands/create-tasks/2-create-tasks-list.md +234 -0
  7. package/src/template/agent-os/commands/create-tasks/create-tasks.md +254 -0
  8. package/src/template/agent-os/commands/design-screen/design-screen.md +32 -0
  9. package/src/template/agent-os/commands/design-shell/design-shell.md +34 -0
  10. package/src/template/agent-os/commands/design-tokens/design-tokens.md +36 -0
  11. package/src/template/agent-os/commands/export-product/export-product.md +44 -0
  12. package/src/template/agent-os/commands/implement-tasks/1-determine-tasks.md +13 -0
  13. package/src/template/agent-os/commands/implement-tasks/2-implement-tasks.md +63 -0
  14. package/src/template/agent-os/commands/implement-tasks/3-verify-implementation.md +113 -0
  15. package/src/template/agent-os/commands/implement-tasks/implement-tasks.md +207 -0
  16. package/src/template/agent-os/commands/initialize-design/initialize-design.md +54 -0
  17. package/src/template/agent-os/commands/orchestrate-tasks/orchestrate-tasks.md +180 -0
  18. package/src/template/agent-os/commands/plan-product/1-product-concept.md +53 -0
  19. package/src/template/agent-os/commands/plan-product/2-create-mission.md +78 -0
  20. package/src/template/agent-os/commands/plan-product/3-create-roadmap.md +73 -0
  21. package/src/template/agent-os/commands/plan-product/4-create-tech-stack.md +46 -0
  22. package/src/template/agent-os/commands/plan-product/plan-product.md +241 -0
  23. package/src/template/agent-os/commands/sample-data/sample-data.md +51 -0
  24. package/src/template/agent-os/commands/scaffold-implementation/scaffold-implementation.md +36 -0
  25. package/src/template/agent-os/commands/screenshot-design/screenshot-design.md +21 -0
  26. package/src/template/agent-os/commands/shape-spec/1-initialize-spec.md +95 -0
  27. package/src/template/agent-os/commands/shape-spec/2-shape-spec.md +300 -0
  28. package/src/template/agent-os/commands/shape-spec/shape-spec.md +40 -0
  29. package/src/template/agent-os/commands/write-spec/write-spec.md +134 -0
  30. package/src/template/agent-os/config.yml +13 -0
  31. package/src/template/agent-os/product/mission.md +29 -0
  32. package/src/template/agent-os/product/roadmap.md +9 -0
  33. package/src/template/agent-os/product/tech-stack.md +14 -0
  34. package/src/template/agent-os/specs/README.md +1 -0
  35. package/src/template/agent-os/standards/backend/api.md +10 -0
  36. package/src/template/agent-os/standards/backend/migrations.md +9 -0
  37. package/src/template/agent-os/standards/backend/models.md +10 -0
  38. package/src/template/agent-os/standards/backend/queries.md +9 -0
  39. package/src/template/agent-os/standards/frontend/accessibility.md +10 -0
  40. package/src/template/agent-os/standards/frontend/components.md +11 -0
  41. package/src/template/agent-os/standards/frontend/css.md +7 -0
  42. package/src/template/agent-os/standards/frontend/responsive.md +11 -0
  43. package/src/template/agent-os/standards/global/coding-style.md +10 -0
  44. package/src/template/agent-os/standards/global/commenting.md +5 -0
  45. package/src/template/agent-os/standards/global/conventions.md +11 -0
  46. package/src/template/agent-os/standards/global/error-handling.md +9 -0
  47. package/src/template/agent-os/standards/global/tech-stack.md +31 -0
  48. package/src/template/agent-os/standards/global/validation.md +11 -0
  49. package/src/template/agent-os/standards/testing/test-writing.md +9 -0
  50. package/src/template/agent-os-ui/README.md +73 -0
  51. package/src/template/agent-os-ui/package-lock.json +5028 -0
  52. package/src/template/agent-os-ui/package.json +52 -0
  53. package/src/template/agent-os-ui/postcss.config.js +6 -0
  54. package/src/template/agent-os-ui/src/components/AgentShell.tsx +31 -0
  55. package/src/template/agent-os-ui/src/components/AgentSidebar.tsx +65 -0
  56. package/src/template/agent-os-ui/src/components/GuidanceCard.tsx +75 -0
  57. package/src/template/agent-os-ui/src/components/MarkdownViewer.tsx +25 -0
  58. package/src/template/agent-os-ui/src/components/PromptButton.tsx +28 -0
  59. package/src/template/agent-os-ui/src/components/StatusItem.tsx +45 -0
  60. package/src/template/agent-os-ui/src/components/ThemeToggle.tsx +72 -0
  61. package/src/template/agent-os-ui/src/index.ts +11 -0
  62. package/src/template/agent-os-ui/src/style.css +3 -0
  63. package/src/template/agent-os-ui/tailwind.config.js +50 -0
  64. package/src/template/agent-os-ui/tsconfig.json +33 -0
  65. package/src/template/agent-os-ui/vite.config.ts +32 -0
  66. package/src/template/control-center/backend/backend.log +2 -0
  67. package/src/template/control-center/backend/index.js +228 -0
  68. package/src/template/control-center/backend/package-lock.json +951 -0
  69. package/src/template/control-center/backend/package.json +19 -0
  70. package/src/template/control-center/frontend/README.md +73 -0
  71. package/src/template/control-center/frontend/eslint.config.js +23 -0
  72. package/src/template/control-center/frontend/index.html +21 -0
  73. package/src/template/control-center/frontend/package-lock.json +5752 -0
  74. package/src/template/control-center/frontend/package.json +42 -0
  75. package/src/template/control-center/frontend/public/runtime-config.json +11 -0
  76. package/src/template/control-center/frontend/public/vite.svg +1 -0
  77. package/src/template/control-center/frontend/src/App.css +42 -0
  78. package/src/template/control-center/frontend/src/App.tsx +738 -0
  79. package/src/template/control-center/frontend/src/assets/react.svg +1 -0
  80. package/src/template/control-center/frontend/src/components/ThemeToggle.tsx +64 -0
  81. package/src/template/control-center/frontend/src/components/ui/ToastContext.tsx +81 -0
  82. package/src/template/control-center/frontend/src/index.css +194 -0
  83. package/src/template/control-center/frontend/src/main.tsx +14 -0
  84. package/src/template/control-center/frontend/src/vite-env.d.ts +1 -0
  85. package/src/template/control-center/frontend/tsconfig.app.json +28 -0
  86. package/src/template/control-center/frontend/tsconfig.json +7 -0
  87. package/src/template/control-center/frontend/tsconfig.node.json +26 -0
  88. package/src/template/control-center/frontend/vite.config.ts +22 -0
  89. package/src/template/design/.claude/commands/design-os/data-model.md +122 -0
  90. package/src/template/design/.claude/commands/design-os/design-screen.md +309 -0
  91. package/src/template/design/.claude/commands/design-os/design-shell.md +238 -0
  92. package/src/template/design/.claude/commands/design-os/design-tokens.md +166 -0
  93. package/src/template/design/.claude/commands/design-os/export-product.md +1105 -0
  94. package/src/template/design/.claude/commands/design-os/product-roadmap.md +121 -0
  95. package/src/template/design/.claude/commands/design-os/product-vision.md +99 -0
  96. package/src/template/design/.claude/commands/design-os/sample-data.md +263 -0
  97. package/src/template/design/.claude/commands/design-os/screenshot-design.md +112 -0
  98. package/src/template/design/.claude/commands/design-os/shape-section.md +138 -0
  99. package/src/template/design/.claude/skills/frontend-design/SKILL.md +42 -0
  100. package/src/template/design/.github/CODE_OF_CONDUCT.md +5 -0
  101. package/src/template/design/.github/CONTRIBUTING.md +51 -0
  102. package/src/template/design/.github/ISSUE_TEMPLATE/config.yml +22 -0
  103. package/src/template/design/.github/PULL_REQUEST_TEMPLATE.md +20 -0
  104. package/src/template/design/.github/SECURITY.yml +5 -0
  105. package/src/template/design/.github/SUPPORT.md +19 -0
  106. package/src/template/design/.github/workflows/pr-decline.yml +135 -0
  107. package/src/template/design/.github/workflows/stale.yml +25 -0
  108. package/src/template/design/CHANGELOG.md +13 -0
  109. package/src/template/design/LICENSE +21 -0
  110. package/src/template/design/README.md +54 -0
  111. package/src/template/design/agents.md +218 -0
  112. package/src/template/design/claude.md +1 -0
  113. package/src/template/design/components.json +22 -0
  114. package/src/template/design/docs/codebase-implementation.md +153 -0
  115. package/src/template/design/docs/design-section.md +135 -0
  116. package/src/template/design/docs/export.md +149 -0
  117. package/src/template/design/docs/getting-started.md +59 -0
  118. package/src/template/design/docs/index.md +56 -0
  119. package/src/template/design/docs/product-planning.md +113 -0
  120. package/src/template/design/docs/requirements.md +22 -0
  121. package/src/template/design/docs/usage.md +62 -0
  122. package/src/template/design/eslint.config.js +23 -0
  123. package/src/template/design/index.html +21 -0
  124. package/src/template/design/package-lock.json +5473 -0
  125. package/src/template/design/package.json +47 -0
  126. package/src/template/design/product-plan.zip +0 -0
  127. package/src/template/design/public/vite.svg +1 -0
  128. package/src/template/design/src/assets/react.svg +1 -0
  129. package/src/template/design/src/components/AppLayout.tsx +95 -0
  130. package/src/template/design/src/components/DataCard.tsx +139 -0
  131. package/src/template/design/src/components/DataModelPage.tsx +120 -0
  132. package/src/template/design/src/components/DesignPage.tsx +284 -0
  133. package/src/template/design/src/components/EmptyState.tsx +155 -0
  134. package/src/template/design/src/components/ExportPage.tsx +344 -0
  135. package/src/template/design/src/components/NextPhaseButton.tsx +33 -0
  136. package/src/template/design/src/components/PhaseNav.tsx +152 -0
  137. package/src/template/design/src/components/PhaseWarningBanner.tsx +81 -0
  138. package/src/template/design/src/components/ProductOverviewCard.tsx +102 -0
  139. package/src/template/design/src/components/ProductPage.tsx +97 -0
  140. package/src/template/design/src/components/ScreenDesignPage.tsx +370 -0
  141. package/src/template/design/src/components/ScreenDesignsCard.tsx +49 -0
  142. package/src/template/design/src/components/SectionPage.tsx +256 -0
  143. package/src/template/design/src/components/SectionsCard.tsx +47 -0
  144. package/src/template/design/src/components/SectionsPage.tsx +181 -0
  145. package/src/template/design/src/components/ShellCard.tsx +85 -0
  146. package/src/template/design/src/components/ShellDesignPage.tsx +242 -0
  147. package/src/template/design/src/components/SpecCard.tsx +121 -0
  148. package/src/template/design/src/components/StepIndicator.tsx +75 -0
  149. package/src/template/design/src/components/ThemeToggle.tsx +86 -0
  150. package/src/template/design/src/components/ui/ToastContext.tsx +81 -0
  151. package/src/template/design/src/components/ui/avatar.tsx +53 -0
  152. package/src/template/design/src/components/ui/badge.tsx +46 -0
  153. package/src/template/design/src/components/ui/button.tsx +60 -0
  154. package/src/template/design/src/components/ui/card.tsx +92 -0
  155. package/src/template/design/src/components/ui/collapsible.tsx +48 -0
  156. package/src/template/design/src/components/ui/dialog.tsx +143 -0
  157. package/src/template/design/src/components/ui/dropdown-menu.tsx +255 -0
  158. package/src/template/design/src/components/ui/input.tsx +21 -0
  159. package/src/template/design/src/components/ui/label.tsx +22 -0
  160. package/src/template/design/src/components/ui/progress.tsx +24 -0
  161. package/src/template/design/src/components/ui/scroll-area.tsx +18 -0
  162. package/src/template/design/src/components/ui/select.tsx +67 -0
  163. package/src/template/design/src/components/ui/separator.tsx +28 -0
  164. package/src/template/design/src/components/ui/sheet.tsx +137 -0
  165. package/src/template/design/src/components/ui/skeleton.tsx +13 -0
  166. package/src/template/design/src/components/ui/switch.tsx +46 -0
  167. package/src/template/design/src/components/ui/table.tsx +116 -0
  168. package/src/template/design/src/components/ui/tabs.tsx +64 -0
  169. package/src/template/design/src/index.css +284 -0
  170. package/src/template/design/src/lib/data-model-loader.ts +91 -0
  171. package/src/template/design/src/lib/design-system-loader.ts +101 -0
  172. package/src/template/design/src/lib/product-loader.ts +221 -0
  173. package/src/template/design/src/lib/router.tsx +52 -0
  174. package/src/template/design/src/lib/section-loader.ts +272 -0
  175. package/src/template/design/src/lib/shell-loader.ts +175 -0
  176. package/src/template/design/src/lib/utils.ts +6 -0
  177. package/src/template/design/src/main.tsx +15 -0
  178. package/src/template/design/src/sections/.gitkeep +0 -0
  179. package/src/template/design/src/sections/ai-orchestration-engine-oai/OrchestrationEngine.tsx +348 -0
  180. package/src/template/design/src/sections/core-platform-shell/AppShell.tsx +403 -0
  181. package/src/template/design/src/sections/gemini-live-integration/GeminiIntegration.tsx +332 -0
  182. package/src/template/design/src/sections/interactive-2d-canvas/WhiteboardCanvas.tsx +334 -0
  183. package/src/template/design/src/sections/participation-equity-tracker/EquityTracker.tsx +383 -0
  184. package/src/template/design/src/sections/persistent-memory-system/PersistentMemory.tsx +308 -0
  185. package/src/template/design/src/sections/real-time-communication-layer/VideoSession.tsx +342 -0
  186. package/src/template/design/src/sections/visual-intelligence-agents/VisualAgents.tsx +311 -0
  187. package/src/template/design/src/types/product.ts +97 -0
  188. package/src/template/design/src/types/section.ts +33 -0
  189. package/src/template/design/tsconfig.app.json +34 -0
  190. package/src/template/design/tsconfig.json +13 -0
  191. package/src/template/design/tsconfig.node.json +26 -0
  192. package/src/template/design/vite.config.ts +18 -0
  193. package/src/template/package.json +27 -0
  194. package/src/template/vite.config.ts +16 -0
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "design-os",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "lint": "eslint .",
10
+ "preview": "vite preview"
11
+ },
12
+ "dependencies": {
13
+ "@radix-ui/react-avatar": "^1.1.11",
14
+ "@radix-ui/react-collapsible": "^1.1.12",
15
+ "@radix-ui/react-dialog": "^1.1.15",
16
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
17
+ "@radix-ui/react-label": "^2.1.8",
18
+ "@radix-ui/react-separator": "^1.1.8",
19
+ "@radix-ui/react-slot": "^1.2.4",
20
+ "@radix-ui/react-tabs": "^1.1.13",
21
+ "@tailwindcss/vite": "^4.1.17",
22
+ "class-variance-authority": "^0.7.1",
23
+ "clsx": "^2.1.1",
24
+ "jszip": "^3.10.1",
25
+ "lucide-react": "^0.554.0",
26
+ "react": "^19.2.0",
27
+ "react-dom": "^19.2.0",
28
+ "react-router-dom": "^7.9.6",
29
+ "tailwind-merge": "^3.4.0",
30
+ "tailwindcss": "^4.1.17"
31
+ },
32
+ "devDependencies": {
33
+ "@eslint/js": "^9.39.1",
34
+ "@types/node": "^24.10.1",
35
+ "@types/react": "^19.2.5",
36
+ "@types/react-dom": "^19.2.3",
37
+ "@vitejs/plugin-react": "^5.1.1",
38
+ "eslint": "^9.39.1",
39
+ "eslint-plugin-react-hooks": "^7.0.1",
40
+ "eslint-plugin-react-refresh": "^0.4.24",
41
+ "globals": "^16.5.0",
42
+ "tw-animate-css": "^1.4.0",
43
+ "typescript": "~5.9.3",
44
+ "typescript-eslint": "^8.46.4",
45
+ "vite": "^7.2.4"
46
+ }
47
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
@@ -0,0 +1,95 @@
1
+ import type { ReactNode } from 'react'
2
+ import { useNavigate } from 'react-router-dom'
3
+ import { Layers, ArrowLeft } from 'lucide-react'
4
+ import { PhaseNav } from './PhaseNav'
5
+ import { ThemeToggle } from './ThemeToggle'
6
+ import { Button } from '@/components/ui/button'
7
+
8
+ interface AppLayoutProps {
9
+ children: ReactNode
10
+ /** Optional title shown in the header (for sub-pages) */
11
+ title?: string
12
+ /** Optional back navigation path */
13
+ backTo?: string
14
+ /** Optional back label */
15
+ backLabel?: string
16
+ /** Whether to show the phase nav (default: true) */
17
+ showPhaseNav?: boolean
18
+ }
19
+
20
+ export function AppLayout({
21
+ children,
22
+ title,
23
+ backTo,
24
+ backLabel = 'Back',
25
+ showPhaseNav = true,
26
+ }: AppLayoutProps) {
27
+ const navigate = useNavigate()
28
+
29
+ // Determine if this is a sub-page (has back navigation)
30
+ const isSubPage = !!backTo
31
+
32
+ return (
33
+ <div className="min-h-screen bg-background animate-fade-in flex flex-col">
34
+ {/* Header */}
35
+ <header className="border-b border-stone-200 dark:border-stone-800 bg-card/80 backdrop-blur-sm sticky top-0 z-20">
36
+ {/* Headless Theme Listener */}
37
+ <ThemeToggle headless />
38
+
39
+ <div className="px-4 sm:px-6 py-3">
40
+ {isSubPage ? (
41
+ /* Sub-page header with back button */
42
+ <div className="max-w-3xl mx-auto flex items-center gap-4">
43
+ <Button
44
+ variant="ghost"
45
+ size="sm"
46
+ onClick={() => navigate(backTo)}
47
+ className="text-stone-600 dark:text-stone-400 hover:text-stone-900 dark:hover:text-stone-100 -ml-2"
48
+ >
49
+ <ArrowLeft className="w-4 h-4 mr-2" strokeWidth={1.5} />
50
+ {backLabel}
51
+ </Button>
52
+ {title && <h1 className="text-lg font-semibold">{title}</h1>}
53
+ {showPhaseNav && (
54
+ <div className="flex-1 flex justify-center">
55
+ <PhaseNav />
56
+ </div>
57
+ )}
58
+ <div className="w-10 shrink-0" />
59
+ </div>
60
+ ) : (
61
+ /* Main header */
62
+ <div className="max-w-3xl mx-auto flex items-center justify-between gap-4">
63
+ <div className="flex items-center gap-4 flex-1">
64
+ {showPhaseNav && <PhaseNav />}
65
+ </div>
66
+ {/* Theme Toggle */}
67
+ <div className="w-10 shrink-0 flex justify-end" />
68
+ </div>
69
+ )}
70
+ </div>
71
+ </header>
72
+
73
+ {/* Main content */}
74
+ <main className="flex-1 max-w-3xl mx-auto px-6 py-12 w-full">
75
+ {children}
76
+ </main>
77
+
78
+ {/* Footer with logo */}
79
+ <footer className="py-8 flex justify-center">
80
+ <a
81
+ href="https://buildermethods.com/design-os"
82
+ target="_blank"
83
+ rel="noopener noreferrer"
84
+ className="flex items-center gap-2 text-stone-400 dark:text-stone-500 hover:text-stone-600 dark:hover:text-stone-400 transition-colors group"
85
+ >
86
+ <span className="text-xs">Powered by</span>
87
+ <div className="w-5 h-5 rounded bg-stone-300 dark:bg-stone-600 flex items-center justify-center transition-colors group-hover:bg-stone-400 dark:group-hover:bg-stone-500">
88
+ <Layers className="w-3 h-3 text-stone-100 dark:text-stone-900" strokeWidth={1.5} />
89
+ </div>
90
+ <span className="text-xs font-medium">Design OS</span>
91
+ </a>
92
+ </footer>
93
+ </div>
94
+ )
95
+ }
@@ -0,0 +1,139 @@
1
+ import { useState } from 'react'
2
+ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
3
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'
4
+ import { ChevronDown } from 'lucide-react'
5
+ import { EmptyState } from '@/components/EmptyState'
6
+
7
+ interface DataMeta {
8
+ models: Record<string, string>
9
+ relationships: string[]
10
+ }
11
+
12
+ interface DataCardProps {
13
+ data: Record<string, unknown> | null
14
+ sectionTitle?: string
15
+ sectionId?: string
16
+ }
17
+
18
+ function extractMeta(data: Record<string, unknown>): DataMeta | null {
19
+ const meta = data._meta as DataMeta | undefined
20
+ if (meta && typeof meta === 'object' && meta.models && meta.relationships) {
21
+ return meta
22
+ }
23
+ return null
24
+ }
25
+
26
+ function getDataWithoutMeta(data: Record<string, unknown>): Record<string, unknown> {
27
+ const { _meta, ...rest } = data
28
+ return rest
29
+ }
30
+
31
+ function countRecords(data: Record<string, unknown>): number {
32
+ // Count arrays at the top level as record collections (excluding _meta)
33
+ let count = 0
34
+ for (const [key, value] of Object.entries(data)) {
35
+ if (key !== '_meta' && Array.isArray(value)) {
36
+ count += value.length
37
+ }
38
+ }
39
+ return count
40
+ }
41
+
42
+ export function DataCard({ data, sectionTitle, sectionId }: DataCardProps) {
43
+ const [isJsonOpen, setIsJsonOpen] = useState(false)
44
+
45
+ // Empty state
46
+ if (!data) {
47
+ return <EmptyState type="data" context={sectionTitle} contextId={sectionId} />
48
+ }
49
+
50
+ const meta = extractMeta(data)
51
+ const dataWithoutMeta = getDataWithoutMeta(data)
52
+ const recordCount = countRecords(data)
53
+
54
+ return (
55
+ <Card className="border-stone-200 dark:border-stone-700 shadow-sm">
56
+ <CardHeader className="pb-4">
57
+ <div className="flex items-center gap-3">
58
+ <CardTitle className="text-lg font-semibold text-stone-900 dark:text-stone-100">
59
+ Sample Data
60
+ </CardTitle>
61
+ {recordCount > 0 && (
62
+ <span className="text-xs font-medium text-stone-500 dark:text-stone-400 bg-stone-100 dark:bg-stone-800 px-2 py-0.5 rounded">
63
+ {recordCount} {recordCount === 1 ? 'record' : 'records'}
64
+ </span>
65
+ )}
66
+ </div>
67
+ </CardHeader>
68
+ <CardContent className="pt-0 space-y-4">
69
+ {/* Data Model Descriptions */}
70
+ {meta && (
71
+ <div className="space-y-6">
72
+ {/* Models - Card Grid */}
73
+ <div>
74
+ <h4 className="text-sm font-medium text-stone-500 dark:text-stone-400 uppercase tracking-wide mb-3">
75
+ Data Models
76
+ </h4>
77
+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
78
+ {Object.entries(meta.models).map(([modelName, description]) => (
79
+ <div
80
+ key={modelName}
81
+ className="bg-stone-50 dark:bg-stone-800/50 rounded-lg p-4"
82
+ >
83
+ <h3 className="font-semibold text-stone-900 dark:text-stone-100 mb-1">
84
+ {modelName}
85
+ </h3>
86
+ <p className="text-stone-600 dark:text-stone-400 text-sm leading-relaxed">
87
+ {description}
88
+ </p>
89
+ </div>
90
+ ))}
91
+ </div>
92
+ </div>
93
+
94
+ {/* Relationships */}
95
+ {meta.relationships.length > 0 && (
96
+ <div>
97
+ <h4 className="text-sm font-medium text-stone-500 dark:text-stone-400 uppercase tracking-wide mb-3">
98
+ How They Connect
99
+ </h4>
100
+ <ul className="space-y-2">
101
+ {meta.relationships.map((relationship, index) => (
102
+ <li
103
+ key={index}
104
+ className="text-stone-700 dark:text-stone-300 flex items-start gap-3"
105
+ >
106
+ <span className="w-1.5 h-1.5 rounded-full bg-stone-400 dark:bg-stone-500 mt-2 shrink-0" />
107
+ {relationship}
108
+ </li>
109
+ ))}
110
+ </ul>
111
+ </div>
112
+ )}
113
+ </div>
114
+ )}
115
+
116
+ {/* Collapsible JSON View */}
117
+ <Collapsible open={isJsonOpen} onOpenChange={setIsJsonOpen}>
118
+ <CollapsibleTrigger className="flex items-center gap-2 text-left group">
119
+ <ChevronDown
120
+ className={`w-4 h-4 text-stone-400 dark:text-stone-500 transition-transform ${isJsonOpen ? 'rotate-180' : ''
121
+ }`}
122
+ strokeWidth={1.5}
123
+ />
124
+ <span className="text-xs text-stone-500 dark:text-stone-400 group-hover:text-stone-700 dark:group-hover:text-stone-300 transition-colors">
125
+ {isJsonOpen ? 'Hide' : 'View'} JSON
126
+ </span>
127
+ </CollapsibleTrigger>
128
+ <CollapsibleContent>
129
+ <div className="bg-stone-50 dark:bg-stone-900 rounded-md p-4 overflow-x-auto mt-3">
130
+ <pre className="text-xs font-mono text-stone-700 dark:text-stone-300 whitespace-pre-wrap">
131
+ {JSON.stringify(dataWithoutMeta, null, 2)}
132
+ </pre>
133
+ </div>
134
+ </CollapsibleContent>
135
+ </Collapsible>
136
+ </CardContent>
137
+ </Card>
138
+ )
139
+ }
@@ -0,0 +1,120 @@
1
+ import { useMemo } from 'react'
2
+ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
3
+ import { AppLayout } from '@/components/AppLayout'
4
+ import { EmptyState } from '@/components/EmptyState'
5
+ import { StepIndicator, type StepStatus } from '@/components/StepIndicator'
6
+ import { NextPhaseButton } from '@/components/NextPhaseButton'
7
+ import { loadProductData } from '@/lib/product-loader'
8
+
9
+ export function DataModelPage() {
10
+ const productData = useMemo(() => loadProductData(), [])
11
+ const dataModel = productData.dataModel
12
+
13
+ const hasDataModel = !!dataModel
14
+ const stepStatus: StepStatus = hasDataModel ? 'completed' : 'current'
15
+
16
+ return (
17
+ <AppLayout>
18
+ <div className="space-y-6">
19
+ {/* Page intro */}
20
+ <div className="mb-8">
21
+ <h1 className="text-2xl font-semibold text-stone-900 dark:text-stone-100 mb-2">
22
+ Data Model
23
+ </h1>
24
+ <p className="text-stone-600 dark:text-stone-400">
25
+ Define the core entities and relationships in your product.
26
+ </p>
27
+ </div>
28
+
29
+ {/* Step 1: Data Model */}
30
+ <StepIndicator step={1} status={stepStatus} isLast={!hasDataModel}>
31
+ {!dataModel ? (
32
+ <EmptyState type="data-model" />
33
+ ) : (
34
+ <div className="space-y-6">
35
+ {/* Entities */}
36
+ <Card className="border-stone-200 dark:border-stone-700 shadow-sm">
37
+ <CardHeader>
38
+ <CardTitle className="text-lg font-semibold text-stone-900 dark:text-stone-100">
39
+ Entities
40
+ <span className="ml-2 text-sm font-normal text-stone-500 dark:text-stone-400">
41
+ ({dataModel.entities.length})
42
+ </span>
43
+ </CardTitle>
44
+ </CardHeader>
45
+ <CardContent>
46
+ {dataModel.entities.length === 0 ? (
47
+ <p className="text-stone-500 dark:text-stone-400">No entities defined.</p>
48
+ ) : (
49
+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
50
+ {dataModel.entities.map((entity, index) => (
51
+ <div
52
+ key={index}
53
+ className="bg-stone-50 dark:bg-stone-800/50 rounded-lg p-4"
54
+ >
55
+ <h3 className="font-semibold text-stone-900 dark:text-stone-100 mb-1">
56
+ {entity.name}
57
+ </h3>
58
+ <p className="text-stone-600 dark:text-stone-400 text-sm leading-relaxed">
59
+ {entity.description}
60
+ </p>
61
+ </div>
62
+ ))}
63
+ </div>
64
+ )}
65
+ </CardContent>
66
+ </Card>
67
+
68
+ {/* Relationships */}
69
+ <Card className="border-stone-200 dark:border-stone-700 shadow-sm">
70
+ <CardHeader>
71
+ <CardTitle className="text-lg font-semibold text-stone-900 dark:text-stone-100">
72
+ Relationships
73
+ <span className="ml-2 text-sm font-normal text-stone-500 dark:text-stone-400">
74
+ ({dataModel.relationships.length})
75
+ </span>
76
+ </CardTitle>
77
+ </CardHeader>
78
+ <CardContent>
79
+ {dataModel.relationships.length === 0 ? (
80
+ <p className="text-stone-500 dark:text-stone-400">No relationships defined.</p>
81
+ ) : (
82
+ <ul className="space-y-2">
83
+ {dataModel.relationships.map((relationship, index) => (
84
+ <li key={index} className="flex items-start gap-3">
85
+ <span className="w-1.5 h-1.5 rounded-full bg-stone-400 dark:bg-stone-500 mt-2 shrink-0" />
86
+ <span className="text-stone-700 dark:text-stone-300">
87
+ {relationship}
88
+ </span>
89
+ </li>
90
+ ))}
91
+ </ul>
92
+ )}
93
+ </CardContent>
94
+ </Card>
95
+
96
+ {/* Edit hint */}
97
+ <div className="bg-stone-100 dark:bg-stone-800 rounded-md px-4 py-3">
98
+ <p className="text-sm text-stone-600 dark:text-stone-400">
99
+ To update the data model, run{' '}
100
+ <code className="font-mono text-stone-800 dark:text-stone-200">/data-model</code>{' '}
101
+ or edit the file directly at{' '}
102
+ <code className="font-mono text-stone-800 dark:text-stone-200">
103
+ product/data-model/data-model.md
104
+ </code>
105
+ </p>
106
+ </div>
107
+ </div>
108
+ )}
109
+ </StepIndicator>
110
+
111
+ {/* Next Phase Button - shown when all steps complete */}
112
+ {hasDataModel && (
113
+ <StepIndicator step={2} status="current" isLast>
114
+ <NextPhaseButton nextPhase="design" />
115
+ </StepIndicator>
116
+ )}
117
+ </div>
118
+ </AppLayout>
119
+ )
120
+ }