bsmnt 0.1.0 → 0.1.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 (102) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/CLAUDE.md +2 -3
  3. package/README.md +1 -2
  4. package/bun.lock +1 -1
  5. package/docs/architecture.drawio +0 -16
  6. package/docs/architecture.mermaid +1 -7
  7. package/package.json +42 -42
  8. package/packages/cli/bin/index.js +0 -4
  9. package/packages/cli/src/commands/add-integration.js +1 -14
  10. package/packages/cli/src/commands/create.js +28 -5
  11. package/packages/create-basement-app/src/mergers/config.js +4 -26
  12. package/packages/create-basement-app/src/mergers/index.js +2 -5
  13. package/packages/create-basement-app/templates/webgl/components/webgl/canvas/index.tsx +3 -8
  14. package/packages/create-basement-app/templates/webgl/components/webgl/components/scene/index.tsx +11 -3
  15. package/packages/create-basement-app/templates/webgl/lib/renderer.ts +7 -0
  16. package/packages/create-basement-app/templates/webgl/package.json +2 -2
  17. package/packages/create-basement-app/integrations/basehub/config.js +0 -21
  18. package/packages/create-basement-app/integrations/basehub/files/README.md +0 -3
  19. package/packages/create-basement-app/templates/webgpu/.biome/plugins/README.md +0 -21
  20. package/packages/create-basement-app/templates/webgpu/.biome/plugins/no-anchor-element.grit +0 -12
  21. package/packages/create-basement-app/templates/webgpu/.biome/plugins/no-relative-parent-imports.grit +0 -10
  22. package/packages/create-basement-app/templates/webgpu/.biome/plugins/no-unnecessary-forwardref.grit +0 -9
  23. package/packages/create-basement-app/templates/webgpu/.cursor/rules/README.md +0 -184
  24. package/packages/create-basement-app/templates/webgpu/.cursor/rules/architecture.mdc +0 -437
  25. package/packages/create-basement-app/templates/webgpu/.cursor/rules/components.mdc +0 -436
  26. package/packages/create-basement-app/templates/webgpu/.cursor/rules/integrations.mdc +0 -447
  27. package/packages/create-basement-app/templates/webgpu/.cursor/rules/main.mdc +0 -278
  28. package/packages/create-basement-app/templates/webgpu/.cursor/rules/styling.mdc +0 -433
  29. package/packages/create-basement-app/templates/webgpu/.editorconfig +0 -40
  30. package/packages/create-basement-app/templates/webgpu/.env.example +0 -81
  31. package/packages/create-basement-app/templates/webgpu/.gitattributes +0 -19
  32. package/packages/create-basement-app/templates/webgpu/.github/PULL_REQUEST_TEMPLATE.md +0 -14
  33. package/packages/create-basement-app/templates/webgpu/.github/workflows/lighthouse-to-slack.yml +0 -136
  34. package/packages/create-basement-app/templates/webgpu/.vscode/extensions.json +0 -20
  35. package/packages/create-basement-app/templates/webgpu/.vscode/settings.json +0 -105
  36. package/packages/create-basement-app/templates/webgpu/README.md +0 -221
  37. package/packages/create-basement-app/templates/webgpu/_gitignore +0 -67
  38. package/packages/create-basement-app/templates/webgpu/app/favicon.ico +0 -0
  39. package/packages/create-basement-app/templates/webgpu/app/layout.tsx +0 -104
  40. package/packages/create-basement-app/templates/webgpu/app/page.tsx +0 -275
  41. package/packages/create-basement-app/templates/webgpu/app/robots.ts +0 -15
  42. package/packages/create-basement-app/templates/webgpu/app/sitemap.ts +0 -16
  43. package/packages/create-basement-app/templates/webgpu/biome.json +0 -250
  44. package/packages/create-basement-app/templates/webgpu/components/basement.svg +0 -1
  45. package/packages/create-basement-app/templates/webgpu/components/layout/footer/index.tsx +0 -27
  46. package/packages/create-basement-app/templates/webgpu/components/layout/header/index.tsx +0 -11
  47. package/packages/create-basement-app/templates/webgpu/components/layout/theme/index.tsx +0 -66
  48. package/packages/create-basement-app/templates/webgpu/components/layout/wrapper/index.tsx +0 -65
  49. package/packages/create-basement-app/templates/webgpu/components/ui/README.md +0 -77
  50. package/packages/create-basement-app/templates/webgpu/components/ui/image/README.md +0 -37
  51. package/packages/create-basement-app/templates/webgpu/components/ui/image/index.tsx +0 -224
  52. package/packages/create-basement-app/templates/webgpu/components/ui/link/index.tsx +0 -146
  53. package/packages/create-basement-app/templates/webgpu/lib/README.md +0 -33
  54. package/packages/create-basement-app/templates/webgpu/lib/hooks/index.ts +0 -12
  55. package/packages/create-basement-app/templates/webgpu/lib/hooks/use-device-detection.ts +0 -81
  56. package/packages/create-basement-app/templates/webgpu/lib/hooks/use-media-breakpoint.ts +0 -15
  57. package/packages/create-basement-app/templates/webgpu/lib/hooks/use-prefetch.ts +0 -74
  58. package/packages/create-basement-app/templates/webgpu/lib/integrations/.gitkeep +0 -0
  59. package/packages/create-basement-app/templates/webgpu/lib/scripts/dev.ts +0 -52
  60. package/packages/create-basement-app/templates/webgpu/lib/scripts/generate-component.ts +0 -322
  61. package/packages/create-basement-app/templates/webgpu/lib/scripts/generate-page.ts +0 -193
  62. package/packages/create-basement-app/templates/webgpu/lib/scripts/generate.ts +0 -79
  63. package/packages/create-basement-app/templates/webgpu/lib/scripts/utils.ts +0 -246
  64. package/packages/create-basement-app/templates/webgpu/lib/store/app.ts +0 -11
  65. package/packages/create-basement-app/templates/webgpu/lib/store/index.ts +0 -11
  66. package/packages/create-basement-app/templates/webgpu/lib/styles/README.md +0 -64
  67. package/packages/create-basement-app/templates/webgpu/lib/styles/cn.ts +0 -7
  68. package/packages/create-basement-app/templates/webgpu/lib/styles/colors.ts +0 -63
  69. package/packages/create-basement-app/templates/webgpu/lib/styles/config.ts +0 -34
  70. package/packages/create-basement-app/templates/webgpu/lib/styles/css/global.css +0 -85
  71. package/packages/create-basement-app/templates/webgpu/lib/styles/css/index.css +0 -6
  72. package/packages/create-basement-app/templates/webgpu/lib/styles/css/reset.css +0 -166
  73. package/packages/create-basement-app/templates/webgpu/lib/styles/css/root.css +0 -68
  74. package/packages/create-basement-app/templates/webgpu/lib/styles/css/tailwind.css +0 -132
  75. package/packages/create-basement-app/templates/webgpu/lib/styles/easings.ts +0 -21
  76. package/packages/create-basement-app/templates/webgpu/lib/styles/fonts.ts +0 -28
  77. package/packages/create-basement-app/templates/webgpu/lib/styles/index.ts +0 -12
  78. package/packages/create-basement-app/templates/webgpu/lib/styles/layout.mjs +0 -27
  79. package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/README.md +0 -29
  80. package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/generate-root.ts +0 -57
  81. package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/generate-tailwind.ts +0 -162
  82. package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/postcss-functions.mjs +0 -168
  83. package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/setup-styles.ts +0 -24
  84. package/packages/create-basement-app/templates/webgpu/lib/styles/scripts/utils.ts +0 -20
  85. package/packages/create-basement-app/templates/webgpu/lib/styles/typography.ts +0 -36
  86. package/packages/create-basement-app/templates/webgpu/lib/utils/README.md +0 -40
  87. package/packages/create-basement-app/templates/webgpu/lib/utils/css.d.ts +0 -21
  88. package/packages/create-basement-app/templates/webgpu/lib/utils/easings.ts +0 -240
  89. package/packages/create-basement-app/templates/webgpu/lib/utils/fetch.ts +0 -84
  90. package/packages/create-basement-app/templates/webgpu/lib/utils/math.test.ts +0 -221
  91. package/packages/create-basement-app/templates/webgpu/lib/utils/math.ts +0 -236
  92. package/packages/create-basement-app/templates/webgpu/lib/utils/metadata.ts +0 -126
  93. package/packages/create-basement-app/templates/webgpu/lib/utils/strings.test.ts +0 -166
  94. package/packages/create-basement-app/templates/webgpu/lib/utils/strings.ts +0 -246
  95. package/packages/create-basement-app/templates/webgpu/lib/utils/types.d.ts +0 -15
  96. package/packages/create-basement-app/templates/webgpu/lib/utils/viewport.test.ts +0 -256
  97. package/packages/create-basement-app/templates/webgpu/lib/utils/viewport.ts +0 -193
  98. package/packages/create-basement-app/templates/webgpu/next.config.ts +0 -142
  99. package/packages/create-basement-app/templates/webgpu/package.json +0 -69
  100. package/packages/create-basement-app/templates/webgpu/postcss.config.mjs +0 -42
  101. package/packages/create-basement-app/templates/webgpu/public/fonts/geist/Geist-Mono.woff2 +0 -0
  102. package/packages/create-basement-app/templates/webgpu/tsconfig.json +0 -43
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @basementstudio/cli
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#40](https://github.com/basementstudio/basement-cli/pull/40) [`bf969b1`](https://github.com/basementstudio/basement-cli/commit/bf969b1908fc8bfc0bcca0b1de24721c1de9c992) Thanks [@BertovDev](https://github.com/BertovDev)! - Fix bunx compatibility by aligning bin name with package name
8
+
9
+ ## 0.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#39](https://github.com/basementstudio/basement-cli/pull/39) [`43a5857`](https://github.com/basementstudio/basement-cli/commit/43a5857a33350e344494d85c70a2400ac038695c) Thanks [@BertovDev](https://github.com/BertovDev)! - Add WebGPU template support
14
+
15
+ - [#33](https://github.com/basementstudio/basement-cli/pull/33) [`9bef7ca`](https://github.com/basementstudio/basement-cli/commit/9bef7ca91ba7fa5928263c76adcc9f6bf77c3143) Thanks [@BertovDev](https://github.com/BertovDev)! - Remove BaseHub CMS integration. BaseHub was a stub that was never fully implemented. Sanity remains as the only CMS option.
16
+
17
+ - [#36](https://github.com/basementstudio/basement-cli/pull/36) [`ffa1407`](https://github.com/basementstudio/basement-cli/commit/ffa1407c299a50dbf27c4472e3e8d89bf66ed4fa) Thanks [@mustache-dev](https://github.com/mustache-dev)! - One r3f canvas for webgl-webgpu avoids redundancy
18
+
3
19
  ## 0.1.0
4
20
 
5
21
  ### Minor Changes
package/CLAUDE.md CHANGED
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
 
5
5
  ## Project Overview
6
6
 
7
- This is **basement**, a CLI tool that scaffolds Next.js projects with AI agent integration. It creates projects from templates (Default, WebGL, WebGPU, Experiment) and optionally injects CMS integrations (Sanity, BaseHub) and animation libraries (GSAP, Framer Motion).
7
+ This is **basement**, a CLI tool that scaffolds Next.js projects with AI agent integration. It creates projects from templates (Default, WebGL, WebGPU, Experiment) and optionally injects CMS integrations (Sanity) and animation libraries (GSAP, Framer Motion).
8
8
 
9
9
  ## Commands
10
10
 
@@ -57,8 +57,7 @@ basement-starter-cli/
57
57
  │ │ ├── webgpu/ # + R3F WebGPU renderer (alpha)
58
58
  │ │ └── experiment/ # + Creative coding navigation UI
59
59
  │ ├── integrations/ # CMS integration files + config manifests
60
- │ │ ├── sanity/ # Sanity files, mergers, config.js
61
- │ │ └── basehub/ # BaseHub files, config.js
60
+ │ │ └── sanity/ # Sanity files, mergers, config.js
62
61
  │ ├── template-hooks/ # Reusable React hooks + config.js
63
62
  │ └── plugins/ # Biome linting rules (Grit patterns)
64
63
  ├── .changeset/ # Changeset config for versioning
package/README.md CHANGED
@@ -83,7 +83,7 @@ packages/
83
83
  │ └── src/commands/
84
84
  └── create-basement-app/ # Scaffolding assets and merge logic
85
85
  ├── templates/{default,webgl,webgpu,experiment}/
86
- ├── integrations/{sanity,basehub}/
86
+ ├── integrations/{sanity}/
87
87
  ├── template-hooks/
88
88
  └── plugins/
89
89
  ```
@@ -145,7 +145,6 @@ Templates:
145
145
 
146
146
  CMS:
147
147
  --sanity Sanity CMS
148
- --basehub BaseHub CMS
149
148
  --no-cms No CMS
150
149
 
151
150
  Animation:
package/bun.lock CHANGED
@@ -159,7 +159,7 @@
159
159
 
160
160
  "dir-glob": ["dir-glob@3.0.1", "", { "dependencies": { "path-type": "^4.0.0" } }, "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA=="],
161
161
 
162
- "dotenv": ["dotenv@17.2.4", "", {}, "sha512-mudtfb4zRB4bVvdj0xRo+e6duH1csJRM8IukBqfTRvHotn9+LBXB8ynAidP9zHqoRC/fsllXgk4kCKlR21fIhw=="],
162
+ "dotenv": ["dotenv@17.3.1", "", {}, "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA=="],
163
163
 
164
164
  "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
165
165
 
@@ -151,22 +151,6 @@
151
151
  <mxGeometry x="1175" y="355" width="145" height="70" as="geometry" />
152
152
  </mxCell>
153
153
 
154
- <!-- BaseHub -->
155
- <mxCell id="basehub" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#6b2020;strokeColor=#ff4d4d;arcSize=8;" vertex="1" parent="1">
156
- <mxGeometry x="1350" y="240" width="175" height="120" as="geometry" />
157
- </mxCell>
158
- <mxCell id="basehub_label" value="&lt;b&gt;basehub/&lt;/b&gt;" style="text;html=1;align=left;verticalAlign=top;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#ff8a8a;fontSize=11;" vertex="1" parent="1">
159
- <mxGeometry x="1360" y="245" width="80" height="22" as="geometry" />
160
- </mxCell>
161
-
162
- <mxCell id="b_config" value="&lt;b&gt;config.js&lt;/b&gt;&#xa;basehub: ^3.0.0&#xa;(minimal)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#7a2a2a;strokeColor=#ff8a8a;fontColor=#fff;fontSize=9;align=center;" vertex="1" parent="1">
163
- <mxGeometry x="1360" y="275" width="100" height="50" as="geometry" />
164
- </mxCell>
165
-
166
- <mxCell id="b_files" value="&lt;b&gt;files/&lt;/b&gt;&#xa;README.md" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#7a2a2a;strokeColor=#ff8a8a;fontColor=#fff;fontSize=9;align=center;" vertex="1" parent="1">
167
- <mxGeometry x="1468" y="275" width="50" height="50" as="geometry" />
168
- </mxCell>
169
-
170
154
  <!-- HOOKS -->
171
155
  <mxCell id="hooks" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1a3a4a;strokeColor=#4ecdc4;arcSize=6;" vertex="1" parent="1">
172
156
  <mxGeometry x="980" y="530" width="560" height="170" as="geometry" />
@@ -40,10 +40,6 @@ graph TD
40
40
  S_FILES["files/<br/><i>35 Sanity files</i>"]
41
41
  S_MERGERS["mergers/<br/><i>layout, sitemap, check</i>"]
42
42
  end
43
- subgraph BASEHUB["basehub/"]
44
- B_CONFIG["config.js<br/><i>basehub ^3.0.0</i>"]
45
- B_FILES["files/<br/><i>README.md</i>"]
46
- end
47
43
  end
48
44
 
49
45
  subgraph HOOKS["template-hooks/"]
@@ -63,11 +59,9 @@ graph TD
63
59
  CLI_BIN --> CLI_WORKTREE
64
60
  CLI_CREATE --> CBA_INDEX
65
61
  CLI_CREATE --> S_CONFIG
66
- CLI_CREATE --> B_CONFIG
67
62
  CLI_CREATE --> H_CONFIG
68
63
  CLI_ADD --> CBA_INDEX
69
64
  CLI_ADD --> S_CONFIG
70
- CLI_ADD --> B_CONFIG
71
65
  CBA_INDEX --> MERGER_INDEX
72
66
  CBA_INDEX --> ANIM_CONFIG
73
67
  MERGER_INDEX --> MERGER_CONFIG
@@ -87,5 +81,5 @@ graph TD
87
81
  class CLI cli
88
82
  class CBA cba
89
83
  class TEMPLATES,T_DEFAULT,T_WEBGL,T_WEBGPU,T_EXPERIMENT template
90
- class INTEGRATIONS,SANITY,BASEHUB integration
84
+ class INTEGRATIONS,SANITY integration
91
85
  class HOOKS hook
package/package.json CHANGED
@@ -1,44 +1,44 @@
1
1
  {
2
- "name": "bsmnt",
3
- "version": "0.1.0",
4
- "description": "CLI to scaffold basement projects and add integrations",
5
- "type": "module",
6
- "bin": {
7
- "basement": "./bin/index.js"
8
- },
9
- "scripts": {
10
- "build": "bun pm pack --dry-run --ignore-scripts",
11
- "check": "for f in $(rg --files bin src -g '*.js'); do node --check \"$f\"; done",
12
- "lint": "biome check .",
13
- "lint:fix": "biome check --write .",
14
- "test": "echo \"Error: no test specified\" && exit 1",
15
- "changeset": "changeset",
16
- "version-packages": "changeset version",
17
- "release": "changeset publish",
18
- "prepublishOnly": "bun run build"
19
- },
20
- "keywords": [
21
- "webgpu",
22
- "r3f",
23
- "agents",
24
- "claude",
25
- "opencode"
26
- ],
27
- "author": "",
28
- "license": "ISC",
29
- "dependencies": {
30
- "chalk": "^5.6.2",
31
- "dotenv": "^17.2.3",
32
- "fs-extra": "^11.3.3",
33
- "inquirer": "^9.3.8",
34
- "ora": "^9.1.0",
35
- "picocolors": "^1.1.1",
36
- "prompts": "^2.4.2",
37
- "tiged": "^2.12.7"
38
- },
39
- "devDependencies": {
40
- "@biomejs/biome": "2.3.14",
41
- "@changesets/changelog-github": "^0.5.2",
42
- "@changesets/cli": "^2.29.8"
43
- }
2
+ "name": "bsmnt",
3
+ "version": "0.1.2",
4
+ "description": "CLI to scaffold basement projects and add integrations",
5
+ "type": "module",
6
+ "bin": {
7
+ "bsmnt": "./bin/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "bun pm pack --dry-run --ignore-scripts",
11
+ "check": "for f in $(rg --files bin src -g '*.js'); do node --check \"$f\"; done",
12
+ "lint": "biome check .",
13
+ "lint:fix": "biome check --write .",
14
+ "test": "echo \"Error: no test specified\" && exit 1",
15
+ "changeset": "changeset",
16
+ "version-packages": "changeset version",
17
+ "release": "changeset publish",
18
+ "prepublishOnly": "bun run build"
19
+ },
20
+ "keywords": [
21
+ "webgpu",
22
+ "r3f",
23
+ "agents",
24
+ "claude",
25
+ "opencode"
26
+ ],
27
+ "author": "",
28
+ "license": "ISC",
29
+ "dependencies": {
30
+ "chalk": "^5.6.2",
31
+ "dotenv": "^17.2.3",
32
+ "fs-extra": "^11.3.3",
33
+ "inquirer": "^9.3.8",
34
+ "ora": "^9.1.0",
35
+ "picocolors": "^1.1.1",
36
+ "prompts": "^2.4.2",
37
+ "tiged": "^2.12.7"
38
+ },
39
+ "devDependencies": {
40
+ "@biomejs/biome": "2.3.14",
41
+ "@changesets/changelog-github": "^0.5.2",
42
+ "@changesets/cli": "^2.29.8"
43
+ }
44
44
  }
@@ -66,8 +66,6 @@ function parseArgs(args) {
66
66
  // CMS flags
67
67
  else if (arg === "-sanity" || arg === "--sanity") {
68
68
  options.cms = "sanity";
69
- } else if (arg === "-basehub" || arg === "--basehub") {
70
- options.cms = "basehub";
71
69
  } else if (arg === "-no-cms" || arg === "--no-cms") {
72
70
  options.cms = "none";
73
71
  }
@@ -120,7 +118,6 @@ ${pc.bold("Create Flags:")}
120
118
 
121
119
  ${pc.cyan("CMS:")}
122
120
  -sanity Use Sanity CMS
123
- -basehub Use BaseHub CMS
124
121
  -no-cms No CMS
125
122
 
126
123
  ${pc.cyan("Animation:")}
@@ -138,7 +135,6 @@ ${pc.bold("Create Flags:")}
138
135
 
139
136
  ${pc.bold("Add Integration Flags:")}
140
137
  -sanity Add Sanity CMS integration
141
- -basehub Add BaseHub integration
142
138
 
143
139
  ${pc.bold("Worktree Flags:")}
144
140
  ${pc.cyan("Actions:")}
@@ -4,7 +4,6 @@ import fs from "fs-extra";
4
4
  import ora from "ora";
5
5
  import pc from "picocolors";
6
6
  import prompts from "prompts";
7
- import { basehubConfig } from "../../../create-basement-app/integrations/basehub/config.js";
8
7
  import { sanityConfig } from "../../../create-basement-app/integrations/sanity/config.js";
9
8
 
10
9
  /**
@@ -58,7 +57,6 @@ async function validateProject(targetDir) {
58
57
  async function checkExistingIntegration(targetDir, integration, usesSrcPrefix) {
59
58
  const integrationPaths = {
60
59
  sanity: "lib/integrations/sanity",
61
- basehub: "lib/integrations/basehub",
62
60
  };
63
61
 
64
62
  const basePath = integrationPaths[integration];
@@ -74,7 +72,7 @@ async function addDependencies(targetDir, integration) {
74
72
  const pkgPath = path.join(targetDir, "package.json");
75
73
  const pkg = await fs.readJson(pkgPath);
76
74
 
77
- const cmsConfigs = { sanity: sanityConfig, basehub: basehubConfig };
75
+ const cmsConfigs = { sanity: sanityConfig };
78
76
  const config = cmsConfigs[integration];
79
77
 
80
78
  if (config) {
@@ -142,11 +140,6 @@ export async function addIntegration(options = {}) {
142
140
  description: "Headless CMS with real-time collaboration",
143
141
  value: "sanity",
144
142
  },
145
- {
146
- title: "BaseHub",
147
- description: "AI-native headless CMS",
148
- value: "basehub",
149
- },
150
143
  ],
151
144
  });
152
145
 
@@ -311,12 +304,6 @@ export async function addIntegration(options = {}) {
311
304
  console.log(pc.cyan(` 4. Run: bun sanity:typegen`));
312
305
  console.log(pc.cyan(` 5. Access Sanity Studio at: /studio`));
313
306
  }
314
- } else if (integration === "basehub") {
315
- console.log(
316
- pc.cyan(` 2. Create a BaseHub project at https://basehub.com`),
317
- );
318
- console.log(pc.cyan(` 3. Add your BaseHub token to .env.local:`));
319
- console.log(pc.dim(` BASEHUB_TOKEN=your-token`));
320
307
  }
321
308
 
322
309
  console.log();
@@ -5,7 +5,6 @@ import fs from "fs-extra";
5
5
  import ora from "ora";
6
6
  import pc from "picocolors";
7
7
  import prompts from "prompts";
8
- import { basehubConfig } from "../../../create-basement-app/integrations/basehub/config.js";
9
8
  import { sanityConfig } from "../../../create-basement-app/integrations/sanity/config.js";
10
9
  import { getAnimationConfig } from "../../../create-basement-app/src/configs/animations.js";
11
10
  import { hooksConfig } from "../../../create-basement-app/template-hooks/config.js";
@@ -22,12 +21,23 @@ export async function createProject(projectName, options = {}) {
22
21
  __dirname,
23
22
  "../../../create-basement-app/templates",
24
23
  );
25
- const templateNames = (
24
+ const discoveredTemplates = (
26
25
  await fs.readdir(templatesDir, { withFileTypes: true })
27
26
  )
28
27
  .filter((d) => d.isDirectory())
29
28
  .map((d) => d.name);
30
29
 
30
+ // Virtual templates that alias to an existing template folder
31
+ const TEMPLATE_ALIASES = { webgpu: "webgl" };
32
+
33
+ // Build full list: discovered folders + virtual aliases (preserving order)
34
+ const templateNames = [
35
+ ...discoveredTemplates,
36
+ ...Object.keys(TEMPLATE_ALIASES).filter(
37
+ (v) => !discoveredTemplates.includes(v),
38
+ ),
39
+ ];
40
+
31
41
  const templateLabels = {
32
42
  default: "Default (Next.js Starter)",
33
43
  webgl: "WebGL (3D Graphics)",
@@ -62,7 +72,6 @@ export async function createProject(projectName, options = {}) {
62
72
  message: "Which CMS will you use?",
63
73
  choices: [
64
74
  { title: "Sanity", value: "sanity" },
65
- { title: "BaseHub", value: "basehub" },
66
75
  { title: "None", value: "none" },
67
76
  ],
68
77
  },
@@ -124,10 +133,11 @@ export async function createProject(projectName, options = {}) {
124
133
  }
125
134
 
126
135
  // 3. Copy local template (standalone, no network call)
136
+ const actualTemplate = TEMPLATE_ALIASES[type] || type;
127
137
  const templateDir = path.resolve(
128
138
  __dirname,
129
139
  "../../../create-basement-app/templates",
130
- type,
140
+ actualTemplate,
131
141
  );
132
142
  const copySpinner = ora(`Copying ${pc.cyan(type)} template...`).start();
133
143
 
@@ -140,6 +150,19 @@ export async function createProject(projectName, options = {}) {
140
150
  await fs.rename(underscoreGitignore, path.join(targetDir, ".gitignore"));
141
151
  }
142
152
 
153
+ // Configure renderer for aliased templates (e.g. webgpu uses webgl template with WebGPU renderer)
154
+ if (type === "webgpu") {
155
+ const rendererPath = path.join(targetDir, "lib/renderer.ts");
156
+ if (await fs.pathExists(rendererPath)) {
157
+ let content = await fs.readFile(rendererPath, "utf-8");
158
+ content = content.replace(
159
+ "export const FORCE_WEBGL = true",
160
+ "export const FORCE_WEBGL = false",
161
+ );
162
+ await fs.writeFile(rendererPath, content);
163
+ }
164
+ }
165
+
143
166
  copySpinner.succeed(pc.green(`${type} template copied.`));
144
167
 
145
168
  // 3.5. Inject Integration Files (Smart Merge)
@@ -190,7 +213,7 @@ export async function createProject(projectName, options = {}) {
190
213
  // Layer deps are already in the standalone template's package.json — no injection needed
191
214
 
192
215
  // Inject CMS Dependencies from integration config manifests
193
- const cmsConfigs = { sanity: sanityConfig, basehub: basehubConfig };
216
+ const cmsConfigs = { sanity: sanityConfig };
194
217
  const cmsIntegrationConfig = cmsConfigs[cms];
195
218
  if (cmsIntegrationConfig) {
196
219
  pkg.dependencies = {
@@ -26,19 +26,11 @@ export const CMS_CONFIG = {
26
26
  "lib/integrations/README.md",
27
27
  ],
28
28
  },
29
-
30
- basehub: {
31
- // Files that need smart merging for BaseHub
32
- mergeFiles: [],
33
-
34
- // Paths that are purely additive for BaseHub
35
- additivePaths: ["lib/integrations/basehub"],
36
- },
37
29
  };
38
30
 
39
31
  /**
40
32
  * Get configuration for a specific CMS
41
- * @param {string} cms - The CMS name (e.g., 'sanity', 'basehub')
33
+ * @param {string} cms - The CMS name (e.g., 'sanity')
42
34
  * @returns {object|null} CMS configuration or null if not supported
43
35
  */
44
36
  export function getCmsConfig(cms) {
@@ -65,35 +57,21 @@ export function isCmsSupported(cms) {
65
57
  * Layers only add packages that are NOT in next-starter.
66
58
  */
67
59
  export const LAYER_CONFIG = {
60
+ // webgl and webgpu share the same template — renderer is configured via lib/renderer.ts
68
61
  webgl: {
69
62
  replaceFiles: ["app/page.tsx"],
70
63
  additivePaths: [
71
64
  "components/webgl/canvas/dynamic.tsx",
72
65
  "components/webgl/canvas/index.tsx",
73
66
  "components/webgl/components/scene/index.tsx",
67
+ "lib/renderer.ts",
74
68
  ],
75
- dependencies: {
76
- "@react-three/fiber": "^9.5.0",
77
- "@react-three/drei": "^10.7.7",
78
- three: "^0.182.0",
79
- "@radix-ui/react-navigation-menu": "^1.2.5",
80
- leva: "^0.9.35",
81
- },
82
- devDependencies: {
83
- "@types/three": "^0.182.0",
84
- },
85
- },
86
-
87
- webgpu: {
88
- replaceFiles: [],
89
- additivePaths: [],
90
69
  dependencies: {
91
70
  "@react-three/fiber": "10.0.0-alpha.2",
92
71
  "@react-three/drei": "^11.0.0-alpha.4",
93
72
  three: "^0.182.0",
94
- leva: "^0.9.35",
95
- "lucide-react": "^0.474.0",
96
73
  "@radix-ui/react-navigation-menu": "^1.2.5",
74
+ leva: "^0.9.35",
97
75
  },
98
76
  devDependencies: {
99
77
  "@types/three": "^0.182.0",
@@ -27,9 +27,6 @@ const CMS_MERGERS = {
27
27
  "../../integrations/sanity/mergers/check-integration-merger.js"
28
28
  ).then((m) => m.mergeCheckIntegration),
29
29
  },
30
- basehub: {
31
- // BaseHub mergers would go here when implemented
32
- },
33
30
  };
34
31
 
35
32
  /**
@@ -92,7 +89,7 @@ async function getMerger(cms, basePath) {
92
89
  /**
93
90
  * Inject CMS integration using smart merge
94
91
  * @param {string} targetDir - The project directory
95
- * @param {string} cms - The CMS name (e.g., 'sanity', 'basehub')
92
+ * @param {string} cms - The CMS name (e.g., 'sanity')
96
93
  * @param {object} spinner - Ora spinner for progress
97
94
  * @returns {object} Results of the merge operation
98
95
  */
@@ -110,7 +107,7 @@ export async function injectIntegration(targetDir, cms, spinner) {
110
107
  if (!cmsConfig) {
111
108
  results.failed.push({
112
109
  path: cms,
113
- error: `CMS "${cms}" is not supported. Supported: sanity, basehub`,
110
+ error: `CMS "${cms}" is not supported. Supported: sanity`,
114
111
  });
115
112
  return results;
116
113
  }
@@ -4,6 +4,7 @@ import { Preload } from "@react-three/drei"
4
4
  import { Canvas } from "@react-three/fiber"
5
5
  import dynamic from "next/dynamic"
6
6
 
7
+ import { FORCE_WEBGL } from "@/lib/renderer"
7
8
  import { cn } from "@/lib/styles/cn"
8
9
 
9
10
  const Scene = dynamic(
@@ -14,7 +15,7 @@ const Scene = dynamic(
14
15
  }
15
16
  )
16
17
 
17
- export default function WebGLCanvas({ ...props }) {
18
+ export default function AppCanvas({ ...props }) {
18
19
  return (
19
20
  <Canvas
20
21
  className={cn("pointer-events-none h-lvh! w-full")}
@@ -27,13 +28,7 @@ export default function WebGLCanvas({ ...props }) {
27
28
  fov: 16,
28
29
  position: [0, 17, 350],
29
30
  }}
30
- gl={{
31
- alpha: true,
32
- antialias: true,
33
- logarithmicDepthBuffer: true,
34
- powerPreference: "high-performance",
35
- premultipliedAlpha: true,
36
- }}
31
+ renderer={FORCE_WEBGL ? { forceWebGL: true } : true}
37
32
  {...props}
38
33
  >
39
34
  <Scene />
@@ -1,6 +1,8 @@
1
1
  import { useFrame } from "@react-three/fiber"
2
- import { useRef } from "react"
2
+ import { useMemo, useRef } from "react"
3
3
  import type { Mesh } from "three"
4
+ import { abs, cos, sin, time, vec3 } from "three/src/nodes/TSL.js"
5
+ import { MeshBasicNodeMaterial } from "three/webgpu"
4
6
 
5
7
  const Scene = () => {
6
8
  const meshRef = useRef<Mesh>(null)
@@ -10,10 +12,16 @@ const Scene = () => {
10
12
  meshRef.current.rotation.y += delta
11
13
  })
12
14
 
15
+ const material = useMemo(() => {
16
+ const mat = new MeshBasicNodeMaterial()
17
+ mat.colorNode = abs(vec3(sin(time), cos(time.mul(4)), sin(time.mul(2))))
18
+ return mat
19
+
20
+ }, [])
13
21
  return (
14
- <mesh ref={meshRef} scale={10}>
22
+ <mesh ref={meshRef} material={material} scale={10}>
15
23
  <boxGeometry />
16
- <meshBasicMaterial color="orange" />
24
+
17
25
  </mesh>
18
26
  )
19
27
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Renderer configuration
3
+ *
4
+ * When true, forces the WebGL renderer (stable, wide compatibility).
5
+ * When false, uses the WebGPU renderer (next-gen, better performance).
6
+ */
7
+ export const FORCE_WEBGL = true
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@radix-ui/react-navigation-menu": "^1.2.5",
29
- "@react-three/drei": "^10.7.7",
30
- "@react-three/fiber": "^9.5.0",
29
+ "@react-three/drei": "^11.0.0-alpha.4",
30
+ "@react-three/fiber": "10.0.0-alpha.2",
31
31
  "class-variance-authority": "^0.7.1",
32
32
  "leva": "^0.9.35",
33
33
  "next": "16.1.4",
@@ -1,21 +0,0 @@
1
- // packages/create-basement-app/integrations/basehub/config.js
2
-
3
- /**
4
- * BaseHub integration configuration manifest.
5
- * Single source of truth for dependencies, scripts, paths, and merge rules.
6
- */
7
- export const basehubConfig = {
8
- name: "basehub",
9
-
10
- dependencies: {
11
- basehub: "^3.0.0",
12
- },
13
-
14
- devDependencies: {},
15
-
16
- scripts: {},
17
-
18
- additivePaths: ["lib/integrations/basehub"],
19
-
20
- mergeFiles: [],
21
- };
@@ -1,3 +0,0 @@
1
- # BaseHub Integration
2
-
3
- Coming soon...
@@ -1,21 +0,0 @@
1
- ## Plugins
2
-
3
- ### 1. `no-anchor-element.grit`
4
- Enforces using Next.js `<Link>` component instead of HTML `<a>` elements.
5
-
6
- ### 2. `no-unnecessary-forwardref.grit`
7
- Checks for unnecessary `forwardRef` usage in React 19 with the compiler.
8
-
9
- ### 3. `no-relative-parent-imports.grit`
10
- Forbids relative parent imports (`../`) and encourages alias imports (`@/`).
11
-
12
- ## Plugin Configuration
13
-
14
- The plugins are configured in `biome.json`:
15
- ```json
16
- "plugins": [
17
- "./biome-plugins/no-anchor-element.grit",
18
- "./biome-plugins/no-unnecessary-forwardref.grit",
19
- "./biome-plugins/no-relative-parent-imports.grit"
20
- ]
21
- ```
@@ -1,12 +0,0 @@
1
- language js;
2
-
3
- `<a $attrs>$content</a>` as $anchor where {
4
- !$anchor <: within `if ($condition) { return ($jsx) }` where {
5
- $condition <: contains or { `isExternal`, `isExternalSSR` }
6
- },
7
- register_diagnostic(
8
- span = $anchor,
9
- message = "Use custom Link component instead of <a> element. The Link component handles both internal and external links automatically.",
10
- severity = "error"
11
- )
12
- }
@@ -1,10 +0,0 @@
1
- language js;
2
-
3
- `import $imports from $source` as $import where {
4
- $source <: r"['\"]\.\.\/\.\.\/.*['\"]",
5
- register_diagnostic(
6
- span = $import,
7
- message = "Use alias imports (~/dir/) instead of deep relative imports (../../). Single level imports (../) are allowed for colocated files.",
8
- severity = "error"
9
- )
10
- }
@@ -1,9 +0,0 @@
1
- language js;
2
-
3
- `forwardRef($func)` as $ref where {
4
- register_diagnostic(
5
- span = $ref,
6
- message = "forwardRef is unnecessary in React 19 with the compiler",
7
- severity = "warning"
8
- )
9
- }