Skip to content

@siteswarm/cms

Headless content management capability engine, EmDash Cloudflare D1 adapter, tiered studio feature gating, and schema registry engine for SiteSwarm applications.

@siteswarm/cms provides the shared runtime foundation for client applications using EmDash CMS (emdash and @emdash-cms/cloudflare). It standardizes:

  • Tiered Feature Gating: Standardized lite, standard, and full tiers suppressing non-essential blogging chrome in the EmDash Admin Studio.
  • Admin Middleware: Protects disabled feature endpoints with 403 Forbidden, redirects unneeded routes, and injects scoped suppression CSS into the admin HTML shell.
  • D1 Schema Registry: Idempotent table creation and collection/field synchronization into _emdash_collections and _emdash_fields.
  • Query Safety: Draft-gated and deleted-isolated query runners (getPublishedEntries) preventing draft leaks to public frontends.
  • Dev Admin Bootstrap: Instant auto-login and setup completion flags for local development and ephemeral PR previews.
  • .: Universal entry point (re-exports schemas and server utilities).
  • ./schemas: Pure TypeScript types, tier definitions, and options schemas.
  • ./server: Cloudflare edge runtime adapters, D1 resolvers, query helpers, and middleware.