@brightsideoy/kama 0.1.0-alpha.142 → 0.1.0-alpha.145

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 (57) hide show
  1. package/.wrangler/state/v3/cache/default/blobs/4de32ec3e619aa3f9acad3fb1a2528209381347d1cbb86e939e08724f5b35bc4000001a0b2b5b216 +0 -0
  2. package/.wrangler/state/v3/cache/default/blobs/5f895e5810a26a6319bbadde9d751e5b10faae6e141db1c454c5f53b3e725591000001a0b2b624a4 +0 -0
  3. package/.wrangler/state/v3/cache/default/blobs/74744186327d8aaf1c6078e50bc561135fd90690c96bd4b733035d0cb3fedb94000001a0b2b5be6b +0 -0
  4. package/.wrangler/state/v3/cache/default/blobs/79c1c81c1ddcd49f49eb27b9197ae0160c3a7981f308aee2ae972653de1b3668000001a0b2b60e76 +0 -0
  5. package/.wrangler/state/v3/cache/default/blobs/7cd29a3bd95a88e7e896a4ae253758cd9e4bde78fc371077f3fef974cd11c64d000001a0b098ff88 +0 -0
  6. package/.wrangler/state/v3/cache/default/blobs/7ecc4caad58c7ee119c02adb84132eaa691b9a171f932ab1c17e0f95c3fed2a8000001a0b2b5bf5e +0 -0
  7. package/.wrangler/state/v3/cache/default/blobs/81928c274111d2c3cbd3d7174136a2fdce83e267da8f8d0caf60d650396197f5000001a0b098de9d +0 -0
  8. package/.wrangler/state/v3/cache/default/blobs/8c3aa6f6625d7c0d682cb498e6715355aec1905909b04ead5e85adbca3989b19000001a0b098e4ac +0 -0
  9. package/.wrangler/state/v3/cache/default/blobs/97205d84c3e4399f6f51295e8381b21f2a8810cdaecc0ab13f2cadf712fae5f4000001a0b339609d +0 -0
  10. package/.wrangler/state/v3/cache/default/blobs/b48d02100b8f1a9520a209628a0778a0f9e0f4ce0643f8d59b3888bbd0f85fc2000001a0b2b63647 +0 -0
  11. package/.wrangler/state/v3/cache/default/blobs/cf30c018e70dad1c6859277e4361da657b79adf34e60cb05885eb32951fbbafc000001a0b09b168f +0 -0
  12. package/.wrangler/state/v3/cache/default/blobs/d0d796d0fe4efd55f61e0c3b8d30170a89703669a52854687186a66304adbf8a000001a0b2b6244d +0 -0
  13. package/.wrangler/state/v3/cache/miniflare-CacheObject/9f458c07675338a7426a7b81ac4fb1baf92d034efbcaaf4336379640ed744ded.sqlite +0 -0
  14. package/.wrangler/state/v3/cache/miniflare-CacheObject/metadata.sqlite +0 -0
  15. package/.wrangler/state/v3/cache/miniflare-CacheObject/metadata.sqlite-shm +0 -0
  16. package/.wrangler/state/v3/cache/miniflare-CacheObject/metadata.sqlite-wal +0 -0
  17. package/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/7cfce387cae19c0dfbb9cc4f2a9c353f60ca0a80fabd0b2e2837d152b58feaaa.sqlite +0 -0
  18. package/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/metadata.sqlite +0 -0
  19. package/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/metadata.sqlite-shm +0 -0
  20. package/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/metadata.sqlite-wal +0 -0
  21. package/.wrangler/state/v3/kv/miniflare-KVNamespaceObject/metadata.sqlite +0 -0
  22. package/.wrangler/state/v3/kv/miniflare-KVNamespaceObject/metadata.sqlite-shm +0 -0
  23. package/.wrangler/state/v3/kv/miniflare-KVNamespaceObject/metadata.sqlite-wal +0 -0
  24. package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite +0 -0
  25. package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite-shm +0 -0
  26. package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite-wal +0 -0
  27. package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/metadata.sqlite +0 -0
  28. package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/metadata.sqlite-shm +0 -0
  29. package/.wrangler/state/v3/observability/miniflare-wobs-trace-store/metadata.sqlite-wal +0 -0
  30. package/.wrangler/state/v3/r2/kama-media/blobs/1c7705701fba41f9a2683025d40393711daffc55d32172088a62d8999017e9c6000001a0b339607a +0 -0
  31. package/.wrangler/state/v3/r2/kama-media/blobs/1ee266c53f586a4a57a1d21be291e34bb2e2236c15e43ae30497f6054290f01d000001a0b2b6248c +0 -0
  32. package/.wrangler/state/v3/r2/kama-media/blobs/6db1f8204b6d125f0911b3e42022258cc7e1c37a95c2ce7f5c7f14da31d408ec000001a0b2b60e1f +0 -0
  33. package/.wrangler/state/v3/r2/kama-media/blobs/97b86f251c5d30df5e1eab8662cab83f5f7c4583ad14fd2d5ea99f16fdcfd6ef000001a0b2b62482 +0 -0
  34. package/.wrangler/state/v3/r2/miniflare-R2BucketObject/9ffe30cff37d40b366f64100a8f041c0a1e5aee78708ba90b9ef4ca6a6b2d883.sqlite +0 -0
  35. package/.wrangler/state/v3/r2/miniflare-R2BucketObject/metadata.sqlite +0 -0
  36. package/.wrangler/state/v3/r2/miniflare-R2BucketObject/metadata.sqlite-shm +0 -0
  37. package/.wrangler/state/v3/r2/miniflare-R2BucketObject/metadata.sqlite-wal +0 -0
  38. package/README.md +16 -37
  39. package/bin/cli.js +190 -147
  40. package/definitions/_page.yaml +52 -0
  41. package/dist/assets/index-BSBvGvQz.css +1 -0
  42. package/dist/assets/index-RzfH6iq3.js +162 -0
  43. package/dist/dist-CZEgSuN0.js +8674 -0
  44. package/dist/index.html +2 -2
  45. package/dist/index.js +6856 -11229
  46. package/dist/schema-compiler.js +38 -0
  47. package/npm-test.sh +75 -0
  48. package/package.json +14 -10
  49. package/schema.sql +3 -2
  50. package/templates/astro-starter/src/components/blocks/ImageBlock.astro +20 -56
  51. package/templates/astro-starter/src/components/global/Header.astro +19 -12
  52. package/templates/astro-starter/src/components/ui/KamaImage.astro +49 -73
  53. package/templates/astro-starter/src/pages/[...slug].astro +16 -43
  54. package/templates/astro-starter/src/pages/media/[...path].ts +8 -1
  55. package/wrangler.json +22 -0
  56. package/dist/assets/index-Bv7fPRX7.css +0 -1
  57. package/dist/assets/index-SWBz-Fr1.js +0 -162
package/README.md CHANGED
@@ -81,67 +81,46 @@ KAMA doesn't just serve content; it actively manages its lifecycle across the gl
81
81
 
82
82
  At the heart of KAMA is the Schema Engine. Instead of complex database migrations, you define your content models, layouts, and reusable blocks in simple YAML files. KAMA dynamically bundles these definitions at build-time to auto-generate your entire Admin UI, database indexes, and API endpoints.
83
83
 
84
- **[Read the full Schema Documentation here](/@brightsideoy/kama/documentation/SCHEMAS.md)**
84
+ **[Read the full Schema Documentation here](documentation/SCHEMAS.md)**
85
85
 
86
86
  <br>
87
87
 
88
88
  ## Getting Started
89
89
 
90
- KAMA comes with an interactive executable CLI to instantly spin up a full monorepo (Backend Worker + optional Astro Frontend), add new sites to existing workspaces, or promote local setups to Cloudflare Edge.
90
+ KAMA comes with a scaffolding CLI to instantly spin up a full monorepo (Backend + Astro Frontend).
91
91
 
92
- ### 1. Initialize a Workspace\*\*
93
-
94
- Run the KAMA CLI to start the workspace wizard:
92
+ ## 1. Initialize a Workspace
95
93
 
96
94
  ```bash
97
- npx kama init
95
+ npx @brightsideoy/kama@alpha
98
96
  ```
99
97
 
100
- The CLI will prompt you for your setup preferences and automatically:
98
+ Select **"Kickstart new KAMA Monorepo"**. The CLI will automatically:
101
99
 
102
- - Scaffold the `kama-worker` engine and content definition directories (`content/definitions/`).
103
- - Authenticate with Cloudflare and auto-provision a remote D1 database + R2 bucket bindings (if deploying to Edge).
104
- - Scaffold a fully configured Astro frontend site inside `sites/` with built-in edge-caching middleware.
105
- - Configure local SQLite fallback environments for completely offline development.
100
+ - Authenticate with Cloudflare (if deploying to the Edge).
101
+ - Create a new D1 database (or local SQLite equivalent).
102
+ - Bind your R2 media buckets.
103
+ - Setup the Worker backend and Astro frontend.
106
104
 
107
- ### 2. Local Development
105
+ ## 2. Local Development
108
106
 
109
- Start the local CMS dev server from your workspace root:
107
+ Start the backend and frontend simultaneously on your local machine:
110
108
 
111
109
  ```bash
112
110
  npm run dev:cms
113
111
  ```
114
112
 
115
- This command automatically compiles your YAML/JSON schemas into runtime JavaScript definitions, syncs your local SQLite database, and launches the Miniflare worker environment on `http://localhost:8787`.
116
-
117
- ### 3. Management Commands\*\*
118
-
119
- You can run CLI commands anytime inside your workspace.
120
-
121
- #### Add a New Astro Frontend Site
122
-
123
- ```bash
124
- npx kama add site
125
- ```
126
-
127
- #### Promote a Local Workspace to Cloudflare Edge
128
-
129
- Convert a local offline workspace to Cloudflare Edge (auto-links domains & D1 databases):
113
+ This bundles your local YAML schemas, syncs the local SQLite/D1 database, and starts the Wrangler dev server on your localhost.
130
114
 
131
- ```bash
132
- npx kama promote
133
- ```
115
+ ## 3. Deploy
134
116
 
135
- ### 4. Deploy
136
-
137
- Deploy your CMS engine, content definitions, and database migrations to Cloudflare Edge:
117
+ Push your API, schemas, and database migrations to Cloudflare's global network, or package it for your virtual server:
138
118
 
139
119
  ```bash
140
120
  npm run deploy:cms
141
121
  ```
142
122
 
143
- > **Note:** For self-hosted virtual servers (VPS) or Docker environments, you can run `npm run dev:cms` under PM2/Docker as a standalone `workerd` server.
144
- > <br>
123
+ <br>
145
124
 
146
125
  ## Directory Structure Overview
147
126
 
@@ -155,7 +134,7 @@ my-kama-workspace/
155
134
  │ ├── nodes/ # e.g., page.yaml, product.yaml
156
135
  │ ├── blocks/ # e.g., hero.yaml, image_card.yaml
157
136
  │ └── node-layouts/ # e.g., two-column.yaml
158
- ├── kama-worker/ # 👉 BACKEND PIPELINE
137
+ ├── cms-worker/ # 👉 BACKEND PIPELINE
159
138
  │ ├── index.js # Worker entrypoint (ES Module)
160
139
  │ ├── wrangler.json # Bindings (D1, R2, Vars)
161
140
  │ └── package.json