Casual Editor

A document editor that respects the .docx.

Open a Word document, edit it in the browser with WYSIWYG fidelity, save it back as .docx — the layout painter keeps OOXML's box model so the file round-trips cleanly. Real-time co-editing rides on a stateless Go gateway that speaks the y-websocket protocol in roughly 120 lines.

Pristine fixtures
44 / 44
Floor cleared
100%
Gateway LOC
~120
Co-edit smoke
5 s
License
Apache-2.0 + MIT
What it does

A Word-flavored surface, with .docx as the source of truth.

OOXML-preserving model

ProseMirror schema + layout painter (forked from eigenpal/docx-editor, MIT) keeps Word's box model intact through every edit. Round-trips audited per-tag — 44 of 44 fixtures pristine = 100%, with a published gap matrix.

G

Stateless Go gateway

No DB, no on-disk update log. The gateway implements the y-websocket protocol in ~120 lines, brokers frames between room members, and drops the room when the last client disconnects. Document persistence is owned by the host.

Real-time co-editing, verified

Yjs + y-prosemirror. Each room is a single in-memory Y.Doc. A 5-second smoke test proves text fan-out, awareness, and live filename rename across two peers — every push runs it. Share-link model for v0; WOPI / JWT slot in behind one Go interface.

🎁

14-template home gallery

Real .docx files across four categories (Personal, Work, Education, Career), each with a first-page PNG preview rendered via LibreOffice. Title-bar logo click returns to the gallery — the Google Docs pattern.

3

Three-way fidelity harness

Every push runs the suite against LibreOffice and OnlyOffice DocumentBuilder, then compares. Word-compat heuristics live behind an opt-in wordCompat flag for non-spec behaviour (e.g. the last-row closing border, issue #395).

H

Pluggable host integration

One Go interface (host.Integration) with a concrete inline impl for the v0 share-link flow. WOPI and JWT-secured REST API slot in for v1+ without touching the WebSocket layer.

Stack

React on top, Go underneath, OOXML in the middle.

React + Bun + Vite ProseMirror Yjs + y-prosemirror Go 1.24 y-websocket protocol LibreOffice fidelity harness
Self-host with one image. The Docker image bundles the SPA, the Go gateway, and a static file server into a single port. Upload a .docx, click Share, send the link, edit live.
docker run -p 8080:8080 schnsrw/casual-editor:latest