@dollie_ai/editor
v0.1.0
Published
Framework-neutral contracts and React runtime for catalog-driven page builders
Maintainers
Readme
@dollie_ai/editor
Dollie Editor SDK — a unified SDK for building an AI-driven visual editor into your application. Embed it in your SaaS, wireframe with it internally, or use it to deliver visual editing to your customers.
One package, both halves. The editor surface: a guardrailed Base UI editor, renderer, blocks and illustrations, and the loop an AI copilot needs to ship valid pages on your own components (catalog → prompt, propose, validate, apply). The backend spine: JSON/TypeScript contracts, catalog sources, a manifest generator, transports and stores with revisions and conflict detection, and framework adapters. No telemetry, no Laravel, Inertia, or AI-vendor dependency in this package.
The fastest start is a starter kit: clone the TanStack Start starter (page-builder-demo, built on the Vercel AI SDK) for a working editor and copilot in minutes. Copilot integrations are named for two stacks at launch — the Laravel AI SDK (the Laravel adapter plus the Dollie agent stack, the flagship) and the Vercel AI SDK (the TanStack Start starter) — with bring-your-own-AI documentation for everything else in docs/ai-copilot.md. The package is coming to npm; today it is consumed as a path/workspace dependency.
Hosts own their components, content, storage, authorization, and branding. Register catalog sources with createCatalog, inject a PageBuilderEditorRuntime, and provide a TransportClient.
Import the SDK's Tailwind v4 contract immediately after Tailwind in the host stylesheet. It owns package source detection, Base UI state variants, animation utilities, and semantic token mappings; the host only supplies its shadcn color variables.
@import 'tailwindcss';
@import '@dollie_ai/editor/styles.css';Run dollie-editor --config page-builder.config.mjs to generate a host manifest and React registry. See examples/standalone for the agentless path.
Wire-format promise
Stored PageConfig JSON is a public API. The current wire format is version 1 — a definition without _version IS version 1. Additive changes (new optional keys, new field kinds) never bump the version; breaking changes bump PAGE_CONFIG_VERSION and ship a migrator for migratePageConfig, so stored definitions upgrade stepwise on read. Content history is a separate axis: the document's revision token changes on every save and doubles as the conflict-detection token. See docs/persistence.md.
Documentation
- docs/getting-started.md — install, Tailwind wiring, minimal editor, rendering, Next.js notes
- docs/custom-catalog.md — registering your own components and field definitions, plus publishing auto-discoverable catalog packages (
defineCatalog,catalogs discover) - docs/generator.md — deriving field definitions from TypeScript prop types
- docs/ai-copilot.md — AI copilots and MCP tools that generate page definitions (
buildPromptCatalog,validatePageConfig) - docs/converting-existing-components.md — converting shadcn/registry blocks into catalog sections
- docs/persistence.md — transports, stores, documents, revisions, the file store, HTTP glue, and
_versionmigrations - docs/laravel-adapter.md — the Laravel/Inertia backing services
- docs/x-dollie-editor-spec.md — the
x-dollie-editorregistry extension for builder-ready component packs
The docs are for humans; the skills are for agents: SKILL.md carries the working rules for both packages, and docs/converting-existing-components.md doubles as the conversion skill's playbook.
