@beechcms/cms 0.6.0-preview.2 → 0.6.0-preview.3
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/bin/cli.mjs +15 -0
- package/package.json +30 -48
- package/LICENSE +0 -40
- package/README.md +0 -125
package/bin/cli.mjs
CHANGED
|
@@ -18,6 +18,7 @@ const COMMANDS = {
|
|
|
18
18
|
'deploy': cmdDeploy,
|
|
19
19
|
'update': cmdUpdate,
|
|
20
20
|
'onboard': cmdOnboard,
|
|
21
|
+
'reset': cmdReset,
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
function help() {
|
|
@@ -57,6 +58,11 @@ function help() {
|
|
|
57
58
|
--yes Skip all interactive prompts (non-interactive mode)
|
|
58
59
|
--db <name> Override D1 database name
|
|
59
60
|
|
|
61
|
+
reset Reset database and/or Docker containers/volumes
|
|
62
|
+
--db Wipe local Wrangler state & bootstrap D1 DB
|
|
63
|
+
--docker Down Docker containers and wipe volumes
|
|
64
|
+
--all Reset both (database & docker)
|
|
65
|
+
|
|
60
66
|
Scaffold a new project (interactive, or pass --yes for non-interactive defaults):
|
|
61
67
|
npm create @beechcms/cms [project-name] [--yes] [--with-examples]
|
|
62
68
|
|
|
@@ -205,6 +211,15 @@ async function cmdOnboard(args) {
|
|
|
205
211
|
await onboard({ local, yes, db, registry })
|
|
206
212
|
}
|
|
207
213
|
|
|
214
|
+
async function cmdReset(args) {
|
|
215
|
+
const db = args.includes('--db')
|
|
216
|
+
const docker = args.includes('--docker')
|
|
217
|
+
const all = args.includes('--all')
|
|
218
|
+
|
|
219
|
+
const { reset } = await import('@beechcms/cli')
|
|
220
|
+
await reset({ db, docker, all })
|
|
221
|
+
}
|
|
222
|
+
|
|
208
223
|
const handler = COMMANDS[command]
|
|
209
224
|
if (!handler) {
|
|
210
225
|
help()
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beechcms/cms",
|
|
3
|
-
"version": "0.6.0-preview.
|
|
4
|
-
"packageManager": "npm@11.9.0",
|
|
3
|
+
"version": "0.6.0-preview.3",
|
|
5
4
|
"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
5
|
"keywords": [
|
|
7
6
|
"cms",
|
|
@@ -17,7 +16,7 @@
|
|
|
17
16
|
"turborepo"
|
|
18
17
|
],
|
|
19
18
|
"author": "Flavio De Musso",
|
|
20
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
19
|
+
"license": "SEE LICENSE IN .github/LICENSE",
|
|
21
20
|
"homepage": "https://github.com/fdemusso/BeechCMS#readme",
|
|
22
21
|
"repository": {
|
|
23
22
|
"type": "git",
|
|
@@ -26,11 +25,6 @@
|
|
|
26
25
|
"bugs": {
|
|
27
26
|
"url": "https://github.com/fdemusso/BeechCMS/issues"
|
|
28
27
|
},
|
|
29
|
-
"workspaces": [
|
|
30
|
-
"apps/*",
|
|
31
|
-
"packages/*",
|
|
32
|
-
"examples/*"
|
|
33
|
-
],
|
|
34
28
|
"files": [
|
|
35
29
|
"bin/",
|
|
36
30
|
"README.md"
|
|
@@ -42,30 +36,6 @@
|
|
|
42
36
|
"beechcms": "bin/create.mjs",
|
|
43
37
|
"beech": "bin/cli.mjs"
|
|
44
38
|
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"dev": "node scripts/dev.mjs",
|
|
47
|
-
"dev:full": "node scripts/dev.mjs",
|
|
48
|
-
"dev:plain": "cross-env BEECH_DEV_PLAIN=1 node scripts/dev.mjs",
|
|
49
|
-
"dev:tunnel-url": "docker compose logs tunnel 2>&1 | grep -Eo 'https://[a-z0-9-]+\\.trycloudflare\\.com' | tail -n 1",
|
|
50
|
-
"dev:logs:mailpit": "docker compose logs -f mailpit",
|
|
51
|
-
"dev:logs:sqlite": "docker compose logs -f sqlite-web",
|
|
52
|
-
"dev:logs:tunnel": "docker compose logs -f tunnel",
|
|
53
|
-
"dev:logs:minio": "docker compose logs -f minio",
|
|
54
|
-
"dev:mailpit:reset": "curl -X DELETE http://localhost:8025/api/v1/messages",
|
|
55
|
-
"dev:stop": "docker compose stop",
|
|
56
|
-
"dev:reset": "docker compose down -v",
|
|
57
|
-
"build": "turbo run build",
|
|
58
|
-
"test": "turbo run test",
|
|
59
|
-
"test:coverage": "turbo run test:coverage",
|
|
60
|
-
"test:diff": "node scripts/test-coverage-diff.mjs",
|
|
61
|
-
"test:dev-cli": "vitest run --config scripts/dev-cli/vitest.config.ts",
|
|
62
|
-
"setup:graph": "node scripts/setup-graph.mjs",
|
|
63
|
-
"release": "node scripts/release.mjs",
|
|
64
|
-
"release:preview": "node scripts/release.mjs --preview",
|
|
65
|
-
"postinstall": "node scripts/check-docker.mjs",
|
|
66
|
-
"prepare": "husky",
|
|
67
|
-
"doctor": "npx react-doctor@latest"
|
|
68
|
-
},
|
|
69
39
|
"type": "module",
|
|
70
40
|
"devDependencies": {
|
|
71
41
|
"@vitest/coverage-v8": "^4.1.0",
|
|
@@ -76,29 +46,17 @@
|
|
|
76
46
|
"ink-spinner": "^5.0.0",
|
|
77
47
|
"ink-testing-library": "^4.0.0",
|
|
78
48
|
"react": "^19.2.7",
|
|
79
|
-
"react-dom": "^19.2.7",
|
|
80
49
|
"react-doctor": "^0.2.16",
|
|
50
|
+
"react-dom": "^19.2.7",
|
|
81
51
|
"shadcn": "^4.4.0",
|
|
82
52
|
"strip-ansi": "^7.2.0",
|
|
83
53
|
"tsx": "^4.22.4",
|
|
84
|
-
"turbo": "^2.9.
|
|
54
|
+
"turbo": "^2.9.18",
|
|
85
55
|
"typescript": "^5.9.3",
|
|
86
56
|
"vitest": "^4.1.0"
|
|
87
57
|
},
|
|
88
|
-
"overrides": {
|
|
89
|
-
"react": "^19.2.7",
|
|
90
|
-
"react-dom": "^19.2.7",
|
|
91
|
-
"qs": "^6.15.2",
|
|
92
|
-
"ws": "^8.21.0",
|
|
93
|
-
"miniflare": {
|
|
94
|
-
"ws": "^8.21.0"
|
|
95
|
-
},
|
|
96
|
-
"jsdom": {
|
|
97
|
-
"ws": "^8.21.0"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
58
|
"dependencies": {
|
|
101
|
-
"@beechcms/cli": "^0.6.0-preview.
|
|
59
|
+
"@beechcms/cli": "^0.6.0-preview.3",
|
|
102
60
|
"@clack/prompts": "^0.9.1",
|
|
103
61
|
"picocolors": "^1.1.1"
|
|
104
62
|
},
|
|
@@ -113,5 +71,29 @@
|
|
|
113
71
|
"@beechcms/core": {
|
|
114
72
|
"optional": true
|
|
115
73
|
}
|
|
74
|
+
},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"dev": "node scripts/dev.mjs",
|
|
77
|
+
"dev:full": "node scripts/dev.mjs",
|
|
78
|
+
"dev:plain": "cross-env BEECH_DEV_PLAIN=1 node scripts/dev.mjs",
|
|
79
|
+
"dev:tunnel-url": "docker compose -f docker/docker-compose.yml logs tunnel 2>&1 | grep -Eo 'https://[a-z0-9-]+\\.trycloudflare\\.com' | tail -n 1",
|
|
80
|
+
"dev:logs:mailpit": "docker compose -f docker/docker-compose.yml logs -f mailpit",
|
|
81
|
+
"dev:logs:sqlite": "docker compose -f docker/docker-compose.yml logs -f sqlite-web",
|
|
82
|
+
"dev:logs:tunnel": "docker compose -f docker/docker-compose.yml logs -f tunnel",
|
|
83
|
+
"dev:logs:minio": "docker compose -f docker/docker-compose.yml logs -f minio",
|
|
84
|
+
"dev:mailpit:reset": "curl -X DELETE http://localhost:8025/api/v1/messages",
|
|
85
|
+
"dev:stop": "docker compose -f docker/docker-compose.yml stop",
|
|
86
|
+
"dev:reset": "docker compose -f docker/docker-compose.yml down -v",
|
|
87
|
+
"build": "turbo run build",
|
|
88
|
+
"type-check": "turbo run type-check",
|
|
89
|
+
"test": "turbo run test",
|
|
90
|
+
"test:coverage": "turbo run test:coverage",
|
|
91
|
+
"test:diff": "node scripts/test-coverage-diff.mjs",
|
|
92
|
+
"test:dev-cli": "vitest run --config scripts/dev-cli/vitest.config.ts",
|
|
93
|
+
"setup:graph": "node scripts/setup-graph.mjs",
|
|
94
|
+
"release": "node scripts/release.mjs",
|
|
95
|
+
"release:preview": "node scripts/release.mjs --preview",
|
|
96
|
+
"postinstall": "node scripts/check-docker.mjs",
|
|
97
|
+
"doctor": "pnpm dlx react-doctor@latest"
|
|
116
98
|
}
|
|
117
|
-
}
|
|
99
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
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-12
|
|
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
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
**BeechCMS** is a precision-engineered, solo-developer headless CMS built for developers who deliver high-performance websites for clients with **zero infrastructure overhead**.
|
|
4
|
-
|
|
5
|
-
The pitch is simple: you build the site, you hand it over, and your client can manage their own content forever — with **zero hosting costs**. No monthly subscriptions, no server bills, no maintenance contract needed just to keep the lights on.
|
|
6
|
-
|
|
7
|
-
This is possible because BeechCMS runs entirely on **Cloudflare's free tier** — Workers for the API, D1 (SQLite at the edge) for the database, and R2 for media storage. A Cloudflare account is all the infrastructure a client ever needs.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Why Beech?
|
|
12
|
-
|
|
13
|
-
### Zero running costs for your clients
|
|
14
|
-
|
|
15
|
-
Cloudflare's free tier covers D1, R2, and Workers for the vast majority of real-world content sites. You deliver a fully self-managed product — dashboard, API, media uploads — and the client pays nothing to keep it running. That's a compelling offer.
|
|
16
|
-
|
|
17
|
-
### Native SQL Performance
|
|
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
|
-
|
|
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
|
-
|
|
23
|
-
### Works as a dependency, not a boilerplate
|
|
24
|
-
|
|
25
|
-
Your project is four files. The BeechCMS engine, dashboard, and API live inside `node_modules/@beechcms/api`. Update with `npm update @beechcms/api`.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Getting Started
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npx @beechcms/cms
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
The interactive wizard scaffolds a ready-to-use project in seconds. For everything from configuration to deployment, see the **[Developer Guide](./docs/guide.md)**.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## The Botanical Engine
|
|
40
|
-
|
|
41
|
-
The heart of BeechCMS is the **Botanical Engine**, a high-performance **Schema Compiler** that bridges the gap between TypeScript definitions and SQL infrastructure.
|
|
42
|
-
|
|
43
|
-
Instead of generic document storage, the Engine analyzes your **Seeds** (content types) and compiles them into **dedicated SQL tables** within Cloudflare D1. Every field you define becomes a native, type-safe SQL column, allowing for:
|
|
44
|
-
|
|
45
|
-
- **Native Performance**: Real B-Tree indices and FTS5 virtual tables for ultra-fast filtering and full-text search.
|
|
46
|
-
- **Data Integrity**: Native SQL types (REAL, INTEGER, TEXT) with CHECK constraints for robust data handling.
|
|
47
|
-
- **Zero-Manual SQL**: Deterministic DDL generation—defined in code or via the UI, and the Engine handles the database synchronization at runtime.
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Tech Stack
|
|
52
|
-
|
|
53
|
-
| Layer | Technology |
|
|
54
|
-
|---|---|
|
|
55
|
-
| Edge runtime | Cloudflare Workers (V8 Isolates) |
|
|
56
|
-
| API framework | Hono v4 |
|
|
57
|
-
| Database | Cloudflare D1 (SQLite at the edge) |
|
|
58
|
-
| Object storage | Cloudflare R2 (zero egress cost) |
|
|
59
|
-
| Shared logic | `@beechcms/core` — Botanical Engine, types, validation |
|
|
60
|
-
| Dashboard | React 19 + Vite 7 |
|
|
61
|
-
| UI | Tailwind CSS v4 + Shadcn/ui |
|
|
62
|
-
| Server state | TanStack Query v5 |
|
|
63
|
-
| Rich text | TipTap v3 + KaTeX |
|
|
64
|
-
| Auth | `jose` JWT + bcryptjs |
|
|
65
|
-
| Validation | Zod v4 |
|
|
66
|
-
| Testing | Vitest v3 |
|
|
67
|
-
| Build orchestration | Turborepo v2 |
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
## Documentation
|
|
72
|
-
|
|
73
|
-
| Document | Description |
|
|
74
|
-
|---|---|
|
|
75
|
-
| [Developer Guide](./docs/guide.md) | End-to-end guide: scaffolding, seeds, API consumption, deployment |
|
|
76
|
-
| [Architecture](./docs/nuovidocs/architecture.md) | Monorepo topology, Botanical Engine data flow, D1 model |
|
|
77
|
-
| [API Reference](./docs/nuovidocs/api-reference.md) | Auth, Content CRUD, Media Engine, Public API, rate limiting |
|
|
78
|
-
| [Frontend Guide](./docs/nuovidocs/frontend-guide.md) | FieldRenderer registry, TanStack Query patterns, adding field types |
|
|
79
|
-
| [System Map](./docs/SYSTEM_MAP.md) | Folder structure, conventions, and architectural constraints |
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
# Faq about BeechCMS
|
|
83
|
-
## Why "Beech"?
|
|
84
|
-
|
|
85
|
-
One afternoon I was staring at half a CMS with no name. I'd spent weeks building my desk setup — monitors, peripherals, the works — and the last thing I added was a beech wood desktop. I cut it, shaped it, sanded it, finished it until it was exactly right.
|
|
86
|
-
|
|
87
|
-
I was sitting at that desk trying to think of a name, looked to the side, and saw the wood. Beech. And then it clicked — seeds, branches, the forest, the fruit. The whole metaphor was already there in the project: content types are seeds, fields are branches, the data that grows from them is the fruit. The name took about three seconds.
|
|
88
|
-
|
|
89
|
-
Sometimes the best names aren't invented. They're found.
|
|
90
|
-
|
|
91
|
-
## Why I Built This
|
|
92
|
-
|
|
93
|
-
In 2025 I lost a €2,000 contract for a React showcase site for a construction company. The client needed two things beyond a static site: a blog where they could post photos of new builds, and a contact form. Simple requests — but they turned the project into a problem.
|
|
94
|
-
|
|
95
|
-
The tools that existed were either too heavy (WordPress, which the client had already had a bad experience with), too expensive once you added hosting and a managed database, or simply not designed to work alongside a modern React frontend without standing up a dedicated backend. The monthly running costs pushed my quote above what a larger agency — one that already had its own internal tooling — could offer. I lost the contract.
|
|
96
|
-
|
|
97
|
-
That was the moment I understood the real gap. Small agencies and freelancers don't lose on talent or quality. They lose because they don't have the same leverage as larger competitors who've already amortized the cost of building their own CMS. I decided to build mine.
|
|
98
|
-
|
|
99
|
-
**Why Cloudflare?** I was already looking for an alternative to Vercel that didn't require a paid plan for commercial projects. When I discovered that Cloudflare's free tier included not just Workers but also D1 (a relational database at the edge) and R2 (S3-compatible object storage), the whole architecture became clear. A full CMS backend — API, database, media storage, auth — with zero monthly cost for the client.
|
|
100
|
-
|
|
101
|
-
**Why the Botanical Engine?** I built the Botanical Engine as a high-performance **Schema Compiler**. It bridges the gap between the flexibility of a CMS and the power of a relational database. Instead of storing data in generic blobs, it compiles TypeScript definitions into native SQL tables and columns. This ensures rigid data integrity (crucial for things like financial records) and unlocks massive performance gains by leveraging native D1 indexing. This true relational model maintains the simplicity of "Schema-as-Code" while allowing for advanced features like cross-seed relations and complex aggregations.
|
|
102
|
-
|
|
103
|
-
**What I learned building it.** BeechCMS is my first serious serverless project. I had no prior experience with Cloudflare Workers, edge computing, or D1. Everything I know about this stack I learned by building this — reading documentation, hitting limits, understanding why they exist, and finding the right abstractions. The project is currently in active development toward a public 1.0 release and is already available on npm.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
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).
|