@beechcms/cms 0.5.0 → 0.6.0-preview.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.
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-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 CHANGED
@@ -1,107 +1,125 @@
1
- ![beechLogoDark.png](docs/images/beechLogoDark.png)
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
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.
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—I define the schema in code, and the Engine handles the database synchronization.
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._
1
+ ![beechLogoDark.png](docs/images/beechLogoDark.png)
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).