Page-first editor · open source

Edit the page.
Own the Doc.

Authors edit the real page as it appears on their live site. All changes are committed to Google Docs.

Draft

Editor draft

Uncommitted page structure: words, images, layout.
Written by typing
commit
Canonical

Google Doc

The page, as sections, default content and block tables.
Written by commit
publish
Snapshot

Cloudflare

Static HTML, CSS and assets for one revision. Readers never sign in.
Written by publish
The problem

Two good ideas that never met.

Doc-first

Write in a Google Doc and let a pipeline render it. Durable and collaborative, but authors can't see or edit the finished page.

| Hero | | title | Hello | | image | (img) |

Page-first

Edit the rendered page directly. A great gesture, but the source of truth becomes HTML instead of a Doc your team already lives in.

<h1 contenteditable> Hello </h1>

This app is the combination: the page-first editing gesture, with the doc-first source of truth.

Interactive sample mode · no credentials

Feel the flow.

Click the headline or subtitle on the site below and change it. Commit sends it to the Doc. Publish updates the live site.

1 · Edit the pageDraft, not saved
larkspur.example/ — editing
2 · Google Docrev 1
Larkspur — homecanonical

3 · Live sitesnapshot of rev 1
https://larkspur.example/

Notice: publish ships the last committed revision — never your unsaved draft.

How it works

Simplicity first.

Preview every change exactly as visitors will see it, then publish with confidence.

  1. EditChange words, images and layout right on the page. Nothing is saved yet.
  2. CommitYour changes are pushed to the Google Doc through Google's own API.
  3. RenderThe server pulls the change back out of the Doc, then re-renders the page's HTML in its final state.
  4. PublishThe finished HTML is uploaded to Cloudflare.
// what a person sees if they open the Doc
type Page = {
  fileId: string;
  revisionId: string;
  metadata: Record<string, string>;
  sections: Section[];
};
type Node = Prose | Block;   // headings, paragraphs, images, or table blocks
Run it

Works with no credentials.

Sample mode lists demo pages until you connect Google.

npm install
npm run dev   # http://127.0.0.1:3847
npm test
feature→develop→release/vX.Y.Z→main + tag

Pull requests run lint, unit tests and a security audit. Details in CONTRIBUTING.md.