Skip to content

v0.6.0

Choose a tag to compare

@fdemusso fdemusso released this 09 Jul 21:48
· 151 commits to master since this release

🌳 BeechCMS v0.6.0

This release marks a major evolution of BeechCMS as a production-ready, developer-first headless CMS. v0.6 introduces a complete DX overhaul: a type-safe client SDK, a code-generating CLI, programmatic lifecycle hooks, background job queues, GitOps-driven schema migrations, and a significantly improved UI. Every feature was designed to keep the edge-native, API-first architecture intact.


✨ What's New

🔁 Programmatic Lifecycle Hooks

Content operations now support beforeCreate, beforeUpdate, beforeDelete, afterCreate, afterUpdate, and afterDelete hooks, registered at the server factory level and executed within D1ContentRepository. (#116)

Also introduced:

  • mutateField — atomic SQL field mutation to prevent race conditions on numeric columns
  • runBatch — declarative multi-seed coordinated writes under Cloudflare D1

📦 Type-Safe Client SDK & Webhook Verifier

A new @beechcms/client package provides a fully typed client for consuming the BeechCMS API from any frontend or backend. (#124)

Key properties:

  • createBeechClient() with full TypeScript type-narrowing end-to-end
  • Ergonomic query builder: filters compile to server JSON, sort maps to orderBy/orderDir, limit clamped to ≤ 100
  • Auth via X-API-Key header
  • Every method returns BeechResult — never throws; non-2xx responses surface in .error
  • Isomorphic verifyBeechSignature — HMAC-SHA256 webhook verification via Web Crypto only (no Node crypto), constant-time comparison, accepts signatures with or without sha256= prefix

🛠️ Codegen CLI & Scaffolding

A new beech CLI accelerates project setup and day-to-day development. (#122) (#123)

  • Scaffolding commands to bootstrap new projects and features
  • Custom structured logging for CLI output
  • Internal tooling for schema and type generation

🔀 Schema Sync & GitOps Migrations

New beech schema:diff command closes the gap between local schema mutations and production deployments. (#126)

  • Compares SEED_REGISTRY against a live D1 database
  • Emits additive SQL migration files in apps/api/migrations/
  • Destructive drift (extra columns, type mismatches, FK mismatches) is surfaced as -- ⚠ comments only — never as executable SQL
  • Includes a CI template for GitOps-driven migration review (docs/ci/github-actions-migrations.yml)

⚙️ Background Job Queues

Introduced a queue system for background job handling with dedicated job handlers, decoupling async workloads from the request lifecycle. (#125)

🔌 Injected Router Pattern (Route Integration)

Refactored the routing layer to use an injected router pattern, improving modularity and testability of route registration. (#119)

🧩 Repeater & Complex Object Support

  • Added the Repeater as a core branch field type for structured, nested content arrays (#113)
  • Full support for complex nested objects as field values (#114)

🌱 Runtime Seeds

Seeds can now be executed at runtime, enabling dynamic data initialization and environment-specific bootstrapping. (#95) (#171)

🎨 UI & Dashboard Improvements

Multiple UI polish passes and dashboard feature additions: (#87) (#90) (#171)

  • Kanban drag stabilization (#129)
  • Utility and layout improvements across the admin panel

🔒 Security & Validation

  • Fixed validation issues across content operations (#185)
  • Enhanced security measures (XSS/CSRF hardening, input sanitization)

📋 Known Limitations (Cloudflare D1)

These are platform constraints, not BeechCMS bugs.

  • after* hooks are non-transactional: D1 does not support interactive transactions, so afterCreate/Update/Delete hooks run after the write batch is committed. Errors propagate to the client but the DB change persists.
  • mutateField bypasses hooks: Intentional — preserves atomic anti-race guarantees.
  • runBatch bypasses hooks: Intentional — prevents non-atomic side-effects within a D1 batch call.

📦 Full Changelog

[v0.5.0 → v0.6.0](v0.5.0...v0.6.0)