Skip to content

Repository files navigation

Proofnote

Turn source material, research notes, and AI output into structured documents that are calm to read, safe to keep, and simple to share.

Open Proofnote · Document format · AI authoring guide · Diagnostics · Examples

Proofnote editing an internal adversarial audit: structural outline at left and a typeset Project document on the page

Proofnote is a local-first, AI-friendly document editor for research notes, technical reports, mathematical writing, and structured investigations. It turns ordered content blocks into an editorial reading surface instead of a generic form or a Markdown preview.

Write directly on the page, start from a considered template, or import strict JSON generated by an AI. Proofnote preserves the document as portable source data, catches problems before they erase meaning, and exports either a standalone presentation HTML document or a strict Editable HTML file that can return to Proofnote for further editing.

Local-first · Paper-first · LaTeX-safe · Structured · Portable

Current release candidate

v1.48 is feature-frozen for release. It brings the document editor, device-local Project navigation, strict import diagnostics, and the Proofnote Editable HTML 2 round-trip protocol into one tested local-first workflow. The regression suite covers document modelling, persistence, cross-document identity, editable HTML reconciliation, and editor behaviour.

A document editor for finished thinking

Read first; edit exactly where needed

The canvas reads like the exported document: prose, inline mathematics, semantic sections, and quotations render in their final typographic voice. Click the part you want to change and Proofnote reveals the native editor in place. There is no separate preview mode to keep in sync.

Give structure a visual language

Use 16 document block types—headings, paragraphs, equations, code, tables, images, quotes, lists, callouts, semantic blocks, and more—without hand-tuning fonts, margins, or colours. Editorial sections, theorem-like results, proofs, verification, and introductions receive distinct treatment when that meaning is actually present.

Keep long work navigable

The Outline is a structural view of the document, not a second copy of it. Add peer sections and subsections, collapse a branch, move or duplicate a complete subtree, and remove an entire section only with an explicit confirmation.

Organise a research project without turning it into an IDE

Projects are device-local containers for multiple independent Proofnote documents. A Project has a compact landing page and a document tree ordered by most recent edit. Move a document between Projects without changing its portable JSON, revision lineage, Editable HTML identity, title, or export. A Project can also be deleted without deleting its documents; they return to the unfiled library. This keeps the lightweight “open and write” flow for a single document while giving a research effort a calm home for its main proof, experiments, audits, and archive.

Work with AI without trusting it blindly

Copy a format-aware AI brief, then import one strict proofnote-document JSON object. Import diagnostics point to the exact line, column, block, and field at fault; they explain common JSON and LaTeX escaping mistakes and distinguish a blocking problem from a recoverable warning.

Keep the source; share the result

Every document stays in an on-device library backed by IndexedDB where available. Export a .proofnote.json backup to continue editing elsewhere, export HTML (presentation) for reading and printing, or export editable HTML when one self-contained file needs to round-trip into Proofnote later. Editable HTML carries a baseline Proofnote source plus a protocol-marked semantic document surface, so it is intentionally more private than a presentation-only deliverable.

A standalone Proofnote research note with editorial typography, mathematics, sections, and a highlighted result

What is included

Area What Proofnote provides
Document building Title, subtitle, heading, paragraph, equation, code, table, image, quote, divider, page break, callout, semantic, list, key–value, and statistics blocks.
Research structure Built-in Blank Document, Proof Note, Research Note, Lab Report, and Essay / Report templates; reusable custom templates; Project documents with editable running headers and footer.
Mathematics and code Inline and display KaTeX; syntax-labelled code blocks; restrained Prism rendering in standalone HTML exports.
AI import A schema-backed JSON format, actionable syntax and schema diagnostics, duplicate-key checks, table-shape protection, and LaTeX escape guidance.
Local documents Separate recent-document library; device-local Projects with landing pages and recent-edit ordering; rename, duplicate, delete, import-as-new-document, revision protection, and local template storage.
Portable output Presentation HTML, strict re-importable Editable HTML, a Proofnote JSON backup, and explicit Solution Note 1.0 compatibility export.
Language and privacy Chinese and English UI; no account or backend required; remote images require an explicit per-image approval.

Typical workflow

  1. Start a document, choose a built-in template, or create a local Project container for related documents.
  2. Write on the page, or use Copy AI format to prepare a structured JSON import prompt.
  3. Import as a new document. Proofnote tells you precisely what to repair if the JSON, schema, table shape, or LaTeX serialization is unsafe.
  4. Use the Outline to shape the whole argument rather than rearranging isolated paragraphs.
  5. Export HTML (presentation) for a polished deliverable, Editable HTML for a single-file Proofnote round trip, and Proofnote source for a durable editable backup.

Data safety by design

Proofnote is deliberately conservative at document boundaries:

  • Imported content is validated before it reaches the editor.
  • Rendering, table, image, and text budgets prevent a valid-looking file from freezing the browser or silently truncating content.
  • Export checks the same portable limits used by import, so a downloaded Proofnote backup can be imported again by the same version.
  • HTML and Markdown are escaped; unsafe links are rejected; KaTeX runs with trust: false.
  • Local images are stored in the document and embedded in standalone HTML. Remote images stay unloaded until the reader approves the exact URL.
  • Project membership and ordering are local library metadata. They never enter a portable document, template, backup, or Editable HTML.
  • Editable HTML is a strict, versioned Proofnote protocol—not a generic HTML importer. Proofnote reconstructs only explicit semantic fields marked by the protocol. CSS, classes, non-semantic wrappers, and rendered KaTeX are presentation details: visual-only edits are ignored and regenerated on the next export. Ambiguous, duplicated, cross-block, legacy, presentation-only, or unrelated HTML is rejected rather than guessed.

Read the full format and storage contract, the JSON/LaTeX escaping guide, and the diagnostics reference.

Get started

Proofnote has no build step and no required server. Clone the repository, then open index.html in Safari, Chrome, or Firefox.

git clone https://github.com/donghaoxuan13818851792-code/ProofNote.git
cd ProofNote
open index.html

To serve the same files locally instead:

python3 -m http.server 4173 --bind 127.0.0.1
# Open http://127.0.0.1:4173/

Run the complete regression, model, persistence, editor, and boundary suite:

npm install
npm test

Formats and compatibility

Format Use it for
proofnote-document 1.0 The native portable format for AI integrations, backups, templates, and further editing.
HTML (presentation) A self-contained, presentation-ready document that retains Proofnote typography, KaTeX, code highlighting, and local images. It deliberately has no editable source payload and cannot be re-imported.
Proofnote Editable HTML 2 A strict single-file semantic round-trip format. It includes a baseline canonical source and protocol-marked editable semantic content. It can recover supported external content edits, import them as a new document, or replace the current document with an automatic recovery copy when the revision is current. Do not share it where its complete source should stay private.
solution-note 1.0 Importing older Solution Notes and exporting a compatibility view when a collaborator still needs that format.

Editable HTML is deliberately semantic

Use More exports → Export editable HTML (re-importable), then choose Import editable HTML… from the document menu when you want to continue editing that same document later. The importer accepts only the dedicated Proofnote Editable HTML 2 carrier; it does not execute a file or try to infer a document from arbitrary page markup.

An editable export has a baseline canonical Proofnote document and a visible semantic surface whose stable data-pn-block-id, data-pn-type, and data-pn-field relationships identify supported content. Existing blocks can be edited, moved, or deleted; protocol-compliant external blocks can be added. Proofnote uses the baseline and those semantic fields to reconstruct a new canonical document. This supports a deliberate loop such as Proofnote → AI or external editor → Proofnote → new editable export.

Import as new document is intentionally a fork. Proofnote gives the new local document a fresh Editable HTML lineage, so a later export from that copy cannot accidentally replace the source document. The same isolation applies to library duplicates, template instances, and automatic recovery copies. Use Replace current document only when you intentionally want to continue the same document lineage. On upgrade, Proofnote also separates any older local records that accidentally share a lineage; while a concurrent repair is unresolved, replacement stays disabled rather than risk crossing documents.

The contract is semantic, not visual. CSS changes, class changes, harmless wrapper changes, and KaTeX or other rendered previews do not become document content. If they are the only external changes, import reports that no Proofnote content changed, accepts the file as recovered, and the next export uses Proofnote's own CSS and rendered output again. In contrast, heading levels, callout kinds, table structure, and other fields represented by the Proofnote schema remain canonical and round-trip normally.

Proofnote refuses to guess when the protocol no longer identifies one clear document: duplicate or unknown block IDs, duplicate fields, fields belonging to the wrong block, unsupported block types, or malformed source/baseline data are invalid. A whole-file fingerprint is used to distinguish an unchanged export from a candidate that needs reconciliation; it is not a digital signature and a changed visual layer is not, by itself, an import failure.

This distinction matters for older exports. A historical Proofnote .html file can look exactly like a Proofnote document but may contain only rendered HTML and KaTeX output—not the baseline and semantic protocol needed to recover its original block mapping, hidden semantic body, notes, metadata, and editor settings. Rendered or KaTeX fragments are insufficient for lossless recovery. Proofnote reports such a file as a presentation export instead of guessing and risking data loss.

The earlier Editable HTML 1.0 carrier, where present, is retained only as a compatibility transport for its intact embedded source. It does not offer the version-2 semantic reconciliation workflow; export a document again to begin a version-2 round trip.

Documentation

Repository map

proofnote/
├── index.html                    app entry point
├── src/document-model.js         portable Document Format and migration model
├── src/document-store.js         IndexedDB-first document and template library
├── src/document-renderer.js      shared Markdown, KaTeX, and export rendering
├── src/editable-html-protocol.js semantic Editable HTML 2 transport and reconciliation
├── src/document-editor.*         paper-first editor workspace and styles
├── src/doc-page.js               print-aware document page shell
├── schema/                       Proofnote and Solution Note schemas
├── docs/                         format, diagnostics, AI guides, and assets
├── vendor/                       vendored KaTeX, Prism, fonts, and UI assets
├── examples/                     example documents
└── tests/                        regression, model, store, editor, and boundary tests

index.html needs the adjacent src/ and vendor/ files. Exported HTML, on the other hand, is the fully self-contained artifact.

License

MIT

About

A local-first, AI-friendly editor for structured research documents, strict JSON import, and re-importable Editable HTML.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages