Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

SuperDoc examples

Minimal, copy-pasteable examples organized to mirror the docs: Editor, Document Engine, AI.

Examples teach one concept in the smallest useful amount of code. If you want a composed app or product workflow, see demos/ instead.

The machine-readable index lives in manifest.json.

Getting started

Framework starters. Pick one, run pnpm install && pnpm dev.

Example Description
react React + TypeScript with Vite
vue Vue 3 + TypeScript with Vite
vanilla Plain JavaScript with Vite
cdn Zero build tools, just an HTML file
angular Angular setup
nextjs Next.js (SSR-safe)
nuxt Nuxt setup
laravel Laravel + Inertia

Editor

Patterns for the browser editor surface.

Built-in UI

Example Docs
comments docs
track-changes docs
toolbar docs

Custom UI

Example Docs
selection-capture docs
configurable-toolbar docs

Theming

Example Docs
theming docs

Spell check

Example Docs
spell-check docs

Collaboration

Realtime providers and backend setups for Yjs-based collaboration.

Example Description
providers/superdoc-yjs Self-hosted Yjs server (recommended)
providers/hocuspocus Hocuspocus provider setup
providers/liveblocks Liveblocks managed service
backends/node-sdk Server-side document operations alongside the realtime layer
backends/fastapi Python FastAPI backend

Document Engine

Programmatic editing without a visible editor.

Example Docs
diffing docs
ai-redlining docs

AI

Document editing through models and agents.

Example Description
bedrock AWS Bedrock Converse API with tool use
streaming Stream model output into a visible editor
redlining LLM-driven tracked-change review (browser)

Advanced

Edge cases and infrastructure-level patterns. Most consumers won't need these.

Example Notes
extensions/custom-mark Custom mark authoring
extensions/custom-node Custom node authoring
headless-toolbar Framework-agnostic toolbar substrate

Running an example

cd <path-to-example>
pnpm install
pnpm dev

For the CDN example, open index.html directly or run npx serve ..

Documentation