@beechcms/cms 0.4.3 → 0.6.0-preview.1

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.
package/LICENSE CHANGED
@@ -1,21 +1,40 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Flavio De Musso
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Business Source License 1.1
2
+
3
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
4
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
5
+
6
+ Parameters
7
+
8
+ Licensor: Flavio De Musso
9
+ Licensed Work: BeechCMS
10
+ The Licensed Work is (c) 2024–2026 Flavio De Musso
11
+ Additional Use Grant: You may make production use of the Licensed Work,
12
+ provided that such use does not include offering
13
+ a CMS-as-a-Service or content management platform
14
+ to third parties where BeechCMS constitutes the
15
+ primary functionality of such service.
16
+ Change Date: 2030-06-10
17
+ Change License: GNU General Public License v2.0 or later
18
+
19
+ ---
20
+
21
+ For information about alternative licensing arrangements for the
22
+ Licensed Work, please contact: demusso1617@gmail.com
23
+
24
+ Terms
25
+
26
+ The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use.
27
+
28
+ Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you the rights provided under the Change License, and this Business Source License will terminate as to that version of the Licensed Work.
29
+
30
+ If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work.
31
+
32
+ All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor.
33
+
34
+ You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work.
35
+
36
+ Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work.
37
+
38
+ This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License).
39
+
40
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
package/README.md CHANGED
@@ -17,8 +17,8 @@ Cloudflare's free tier covers D1, R2, and Workers for the vast majority of real-
17
17
  ### Native SQL Performance
18
18
  Unlike other "flexible" CMSs that store data in slow JSON blobs, Beech generates **dedicated SQL tables** for every content type. Enjoy native B-Tree indexing, `REAL` and `INTEGER` types for mathematical operations, and ultra-fast queries.
19
19
 
20
- ### Schema-as-Code
21
- Define your content model once in TypeScript. The **Botanical Engine** compiles your definitions into deterministic SQL DDL. Run `beech seed:load` and your database schema is automatically synchronized. No manual migrations, no manual SQL, no schema drift.
20
+ ### Schema-as-Code & Runtime Definitions
21
+ Define your content model dynamically via the dashboard UI or in code (TypeScript). The **Botanical Engine** compiles your definitions into deterministic SQL DDL at runtime. Bootstrap your schema from code using `beech onboard` or `beech seed:load`, then let the D1 database act as the single source of truth—with real-time updates and zero server downtime.
22
22
 
23
23
  ### Works as a dependency, not a boilerplate
24
24
 
@@ -44,7 +44,7 @@ Instead of generic document storage, the Engine analyzes your **Seeds** (content
44
44
 
45
45
  - **Native Performance**: Real B-Tree indices and FTS5 virtual tables for ultra-fast filtering and full-text search.
46
46
  - **Data Integrity**: Native SQL types (REAL, INTEGER, TEXT) with CHECK constraints for robust data handling.
47
- - **Zero-Manual SQL**: Deterministic DDL generation—I define the schema in code, and the Engine handles the database synchronization.
47
+ - **Zero-Manual SQL**: Deterministic DDL generation—defined in code or via the UI, and the Engine handles the database synchronization at runtime.
48
48
 
49
49
  ---
50
50
 
@@ -105,3 +105,21 @@ That was the moment I understood the real gap. Small agencies and freelancers do
105
105
  ---
106
106
 
107
107
  _BeechCMS — Precision-engineered content infrastructure for the edge._
108
+
109
+
110
+ ## Licensing
111
+
112
+ | Package | License | Details |
113
+ |---|---|---|
114
+ | `@beechcms/core` | MIT | Free for any use, including commercial |
115
+ | `apps/api` | BUSL-1.1 | Free for self-hosting; see Additional Use Grant |
116
+ | `apps/dashboard` | BUSL-1.1 | Free for self-hosting; see Additional Use Grant |
117
+
118
+ **Self-hosting is always free.**
119
+ The BUSL-1.1 only restricts offering BeechCMS as a managed SaaS service
120
+ in direct competition with BeechCMS Cloud.
121
+ After 2030-05-26, these components convert automatically to GPL v2+.
122
+
123
+ For commercial licensing inquiries: demusso1617@gmail.com
124
+
125
+ For more detailed information, see our [Licensing Guide](./docs/LICENSING.md).
package/bin/cli.mjs CHANGED
@@ -17,6 +17,7 @@ const COMMANDS = {
17
17
  'validate': cmdValidate,
18
18
  'deploy': cmdDeploy,
19
19
  'update': cmdUpdate,
20
+ 'onboard': cmdOnboard,
20
21
  }
21
22
 
22
23
  function help() {
@@ -50,10 +51,18 @@ function help() {
50
51
  update Update @beechcms/api and @beechcms/core to latest, then
51
52
  apply any new system migrations to the local database
52
53
 
54
+ onboard One-command local provisioning (init + seed:load). Designed
55
+ for non-interactive use by agents and CI.
56
+ --remote Target remote D1 instead of local (default: local)
57
+ --yes Skip all interactive prompts (non-interactive mode)
58
+ --db <name> Override D1 database name
59
+
53
60
  Scaffold a new project (interactive, or pass --yes for non-interactive defaults):
54
61
  npm create @beechcms/cms [project-name] [--yes] [--with-examples]
55
62
 
56
63
  Golden path (local):
64
+ npx beech onboard --local --yes # fully automated
65
+ # or step by step:
57
66
  npx beech init --db --local
58
67
  npx beech seed:load --local
59
68
  npx wrangler dev
@@ -186,6 +195,16 @@ async function cmdUpdate(_args) {
186
195
  await update({})
187
196
  }
188
197
 
198
+ async function cmdOnboard(args) {
199
+ const local = !args.includes('--remote')
200
+ const yes = args.includes('--yes')
201
+ const dbIdx = args.indexOf('--db')
202
+ const db = dbIdx !== -1 ? args[dbIdx + 1] : undefined
203
+ const registry = await tryLoadLocalRegistry()
204
+ const { onboard } = await import('@beechcms/cli')
205
+ await onboard({ local, yes, db, registry })
206
+ }
207
+
189
208
  const handler = COMMANDS[command]
190
209
  if (!handler) {
191
210
  help()
package/bin/create.mjs CHANGED
@@ -33,6 +33,18 @@ const TEMPLATES = {
33
33
  file: 'contact.ts',
34
34
  registryEntries: ['messages: MESSAGE_SEED'],
35
35
  },
36
+ commerce: {
37
+ label: 'Commerce',
38
+ hint: 'e-commerce product catalog with prices, inventory and ratings',
39
+ file: 'commerce.ts',
40
+ registryEntries: ['products: PRODUCT_SEED', 'reviews: REVIEW_SEED'],
41
+ },
42
+ tasks: {
43
+ label: 'Tasks',
44
+ hint: 'project management tasks with progress slider',
45
+ file: 'tasks.ts',
46
+ registryEntries: ['tasks: TASK_SEED'],
47
+ },
36
48
  }
37
49
 
38
50
  function readTemplate(filename) {
@@ -110,8 +122,8 @@ function buildPackageJson(name) {
110
122
  'db:reset:local': 'node -e "require(\'fs\').rmSync(\'.wrangler/state\',{recursive:true,force:true})" && npm run db:migrate:local',
111
123
  },
112
124
  dependencies: {
113
- '@beechcms/api': '^0.4.0-preview.12',
114
- '@beechcms/core': '^0.4.0-preview.12',
125
+ '@beechcms/api': '^0.5.0',
126
+ '@beechcms/core': '^0.5.0',
115
127
  },
116
128
  devDependencies: {
117
129
  '@cloudflare/workers-types': '^4.0.0',
@@ -319,6 +331,8 @@ async function main() {
319
331
  { value: 'blog', label: 'Blog', hint: 'posts with rich text, cover image, tags and authors' },
320
332
  { value: 'gallery', label: 'Gallery', hint: 'media items with image, tags and featured flag' },
321
333
  { value: 'contact', label: 'Contact', hint: 'public form submissions with masked email and read status' },
334
+ { value: 'commerce',label: 'Commerce',hint: 'e-commerce product catalog with prices, inventory and ratings' },
335
+ { value: 'tasks', label: 'Tasks', hint: 'project management tasks with progress slider' },
322
336
  ],
323
337
  required: false,
324
338
  })
@@ -9,7 +9,7 @@ export const POST_SEED: Seed = {
9
9
  branches: [
10
10
  { id: 'pst_01', alias: 'title', label: 'Title', type: 'text', requiredOnCreate: true },
11
11
  { id: 'pst_02', alias: 'publishedAt', label: 'Published at', type: 'date' },
12
- { id: 'pst_03', alias: 'coverImage', label: 'Cover image', type: 'file' },
12
+ { id: 'pst_03', alias: 'coverImage', label: 'Cover image', type: 'file', fileOptions: { accept: 'image' } },
13
13
  { id: 'pst_04', alias: 'excerpt', label: 'Excerpt', type: 'text' },
14
14
  { id: 'pst_05', alias: 'tags', label: 'Tags', type: 'json', options: ['news', 'tutorial', 'release', 'guide', 'opinion'] },
15
15
  { id: 'pst_06', alias: 'body', label: 'Body', type: 'richtext' },
@@ -28,7 +28,7 @@ export const AUTHOR_SEED: Seed = {
28
28
  branches: [
29
29
  { id: 'aut_01', alias: 'name', label: 'Name', type: 'text', requiredOnCreate: true },
30
30
  { id: 'aut_02', alias: 'bio', label: 'Bio', type: 'text' },
31
- { id: 'aut_03', alias: 'photo', label: 'Photo', type: 'file' },
31
+ { id: 'aut_03', alias: 'photo', label: 'Photo', type: 'file', fileOptions: { accept: 'image' } },
32
32
  { id: 'aut_04', alias: 'website', label: 'Website URL', type: 'text' },
33
33
  { id: 'aut_05', alias: 'active', label: 'Active', type: 'boolean' },
34
34
  ],
@@ -0,0 +1,29 @@
1
+ /** Product: e-commerce product catalog with prices, inventory and ratings */
2
+ export const PRODUCT_SEED: Seed = {
3
+ slug: 'products',
4
+ label: 'Product',
5
+ labelPlural: 'Products',
6
+ displayNameAlias: 'name',
7
+ allowPublicRead: true,
8
+ branches: [
9
+ { alias: 'name', label: 'Product Name', type: 'text', requiredOnCreate: true },
10
+ { alias: 'description', label: 'Description', type: 'richtext' },
11
+ { alias: 'price', label: 'Price', type: 'number', numberOptions: { format: 'currency', currency: 'EUR', decimals: 2, min: 0, control: 'input', prefix: '€' } },
12
+ { alias: 'inventory', label: 'Stock level', type: 'number', numberOptions: { min: 0, step: 1, control: 'stepper' } },
13
+ { alias: 'rating', label: 'Rating', type: 'number', numberOptions: { min: 1, max: 5, step: 0.5, control: 'rating' } }
14
+ ],
15
+ }
16
+
17
+ /** Review: product review */
18
+ export const REVIEW_SEED: Seed = {
19
+ slug: 'reviews',
20
+ label: 'Review',
21
+ labelPlural: 'Reviews',
22
+ displayNameAlias: 'title',
23
+ allowPublicRead: true,
24
+ branches: [
25
+ { alias: 'title', label: 'Review Title', type: 'text', requiredOnCreate: true },
26
+ { alias: 'body', label: 'Body', type: 'text' },
27
+ { alias: 'score', label: 'Score', type: 'number', numberOptions: { min: 1, max: 5, step: 1, control: 'rating' } }
28
+ ],
29
+ }
@@ -8,7 +8,7 @@ export const GALLERY_SEED: Seed = {
8
8
  branches: [
9
9
  { id: 'gal_01', alias: 'title', label: 'Title', type: 'text', requiredOnCreate: true },
10
10
  { id: 'gal_02', alias: 'description', label: 'Description', type: 'text' },
11
- { id: 'gal_03', alias: 'image', label: 'Image', type: 'file', requiredOnCreate: true },
11
+ { id: 'gal_03', alias: 'image', label: 'Image', type: 'file', requiredOnCreate: true, fileOptions: { accept: 'image' } },
12
12
  { id: 'gal_04', alias: 'tags', label: 'Tags', type: 'json' },
13
13
  { id: 'gal_05', alias: 'date', label: 'Date', type: 'date' },
14
14
  { id: 'gal_06', alias: 'featured', label: 'Featured', type: 'boolean' },
@@ -0,0 +1,12 @@
1
+ /** Task: project management tasks with progress slider */
2
+ export const TASK_SEED: Seed = {
3
+ slug: 'tasks',
4
+ label: 'Task',
5
+ labelPlural: 'Tasks',
6
+ displayNameAlias: 'title',
7
+ branches: [
8
+ { alias: 'title', label: 'Task Title', type: 'text', requiredOnCreate: true },
9
+ { alias: 'taskStatus', label: 'Status', type: 'text', options: ['todo', 'in_progress', 'done'] },
10
+ { alias: 'completion', label: 'Completion', type: 'number', numberOptions: { format: 'percentage', min: 0, max: 100, step: 5, control: 'slider' } }
11
+ ],
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beechcms/cms",
3
- "version": "0.4.3",
3
+ "version": "0.6.0-preview.1",
4
4
  "packageManager": "npm@11.9.0",
5
5
  "description": "Edge-Native, Schema-Driven Headless CMS built on Cloudflare Workers, D1, and R2. Features the Botanical Engine for alias-stable field management, a modular widget layer, and a React + Vite admin dashboard.",
6
6
  "keywords": [
@@ -17,7 +17,7 @@
17
17
  "turborepo"
18
18
  ],
19
19
  "author": "Flavio De Musso",
20
- "license": "MIT",
20
+ "license": "SEE LICENSE IN LICENSE",
21
21
  "homepage": "https://github.com/fdemusso/BeechCMS#readme",
22
22
  "repository": {
23
23
  "type": "git",
@@ -42,28 +42,54 @@
42
42
  "beech": "bin/cli.mjs"
43
43
  },
44
44
  "scripts": {
45
- "dev": "turbo run dev --parallel",
45
+ "dev": "node scripts/dev.mjs",
46
+ "dev:full": "node scripts/dev.mjs",
47
+ "dev:tunnel-url": "docker compose logs tunnel 2>&1 | grep -Eo 'https://[a-z0-9-]+\\.trycloudflare\\.com' | tail -n 1",
48
+ "dev:logs:mailpit": "docker compose logs -f mailpit",
49
+ "dev:logs:sqlite": "docker compose logs -f sqlite-web",
50
+ "dev:logs:tunnel": "docker compose logs -f tunnel",
51
+ "dev:logs:minio": "docker compose logs -f minio",
52
+ "dev:mailpit:reset": "curl -X DELETE http://localhost:8025/api/v1/messages",
53
+ "dev:stop": "docker compose stop",
54
+ "dev:reset": "docker compose down -v",
46
55
  "build": "turbo run build",
47
56
  "test": "turbo run test",
48
57
  "test:coverage": "turbo run test:coverage",
49
58
  "setup:graph": "node scripts/setup-graph.mjs",
50
59
  "release": "node scripts/release.mjs",
51
- "release:preview": "node scripts/release.mjs --preview"
60
+ "release:preview": "node scripts/release.mjs --preview",
61
+ "postinstall": "node scripts/check-docker.mjs",
62
+ "prepare": "husky",
63
+ "doctor": "npx react-doctor@latest"
52
64
  },
53
65
  "type": "module",
54
66
  "devDependencies": {
67
+ "@vitest/coverage-v8": "^4.1.0",
68
+ "husky": "^9.1.7",
69
+ "react-doctor": "^0.2.16",
55
70
  "shadcn": "^4.4.0",
56
- "turbo": "^2.8.7",
57
- "typescript": "^5.9.3"
71
+ "turbo": "^2.9.16",
72
+ "typescript": "^5.9.3",
73
+ "vitest": "^4.1.0"
74
+ },
75
+ "overrides": {
76
+ "qs": "^6.15.2",
77
+ "ws": "^8.21.0",
78
+ "miniflare": {
79
+ "ws": "^8.21.0"
80
+ },
81
+ "jsdom": {
82
+ "ws": "^8.21.0"
83
+ }
58
84
  },
59
85
  "dependencies": {
60
- "@beechcms/cli": "^0.4.3",
86
+ "@beechcms/cli": "^0.6.0-preview.1",
61
87
  "@clack/prompts": "^0.9.1",
62
88
  "picocolors": "^1.1.1"
63
89
  },
64
90
  "peerDependencies": {
65
- "@beechcms/api": "^0.4.3",
66
- "@beechcms/core": "^0.4.3"
91
+ "@beechcms/api": "^0.6.0-preview.1",
92
+ "@beechcms/core": "^0.6.0-preview.1"
67
93
  },
68
94
  "peerDependenciesMeta": {
69
95
  "@beechcms/api": {