Excalidraw Git

An Excalidraw fork that commits every canvas to a Git repository — OAuth, branches, and diagram history without exports.

A dark aubergine plate with the Excalidraw Git claim and title.
A dark aubergine plate with the Excalidraw Git claim and title.

Stack Next.js · TypeScript · Excalidraw · GitHub API · Octokit

Diagrams rot in exports. A PNG in a slide deck has no history, no review, and no way to answer the question that matters six months later: why did this box move?

Excalidraw Git puts the canvas in a repository. The drawing is stored as the scene JSON Excalidraw already uses, committed to a branch through the GitHub API. Every save is a commit; every commit has a diff; every diff can be reviewed by the same people who review the code.

The awkward parts

Git was designed for lines of text, not a scene graph. A single dragged rectangle can touch every coordinate in the file, so the app serialises elements in a stable order and keeps the diff scoped to the elements that actually changed. Conflict handling is explicit: if the remote branch moved, the app shows the two scenes and asks which one wins instead of silently overwriting.

Authentication is GitHub OAuth with a narrow scope. The repository picker only sees repositories the user can already write to, and the token never reaches the client.

Why it is useful

Architecture diagrams live next to the service they describe. When the service changes, the diagram changes in the same pull request. That is a small workflow improvement with a large effect on whether documentation stays true.