The source side of the EmDash → TanStack CMS migration example: a real, runnable EmDash blog.
EmDash is Cloudflare's open-source, Astro-native, agent-ready TypeScript CMS — pitched as the "spiritual successor to WordPress." This app was scaffolded verbatim with its own tool:
npm create emdash@latest -- --platform node --template blogso it's a faithful EmDash project (not a hand-built mock): content lives in a
SQLite database, rich text is stored as Portable Text (structured JSON),
and the whole content model — collections, fields, taxonomies, bylines, menus —
is declared in seed/seed.json, EmDash's canonical,
reproducible seed/export format.
This is a standalone npm project (its own lockfile + a large dependency tree), deliberately excluded from the repo's pnpm workspace — it's the external CMS we migrate from. Run it on its own:
cd examples/emdash-before
cp .env.example .env # EmDash needs an encryption key
npm install
npm run dev # → http://localhost:3014 (admin at /_emdash/admin)npm run dev seeds the SQLite db from seed/seed.json on first start.
- Collections:
posts(title, featured_image, content, excerpt) andpages(title, content).contentis aportableTextfield. - Content: 8 posts (7 published + 1 draft) and an
aboutpage, with Portable Text bodies (paragraphs +h2headings),featured_imagemedia refs, andcategory/tagtaxonomies.
Like Payload's Lexical, EmDash's Portable Text is a structured JSON tree, not
Markdown — so the port (../emdash-after) needs a Portable
Text → Markdown converter. Unlike Payload, the content REST API requires auth, so
the migration reads the auth-free seed/seed.json directly (no running server
needed) — the same "read the source files off disk" approach as the Starlight
example. The gaps are taxonomies, bylines, menus/widgets, and non-text Portable
Text blocks (image/code/gallery).