MCPcopy Index your code
hub / github.com/PatWie/drafft-ink

github.com/PatWie/drafft-ink @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,236 symbols 3,263 edges 59 files 726 documented · 59%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Drafft.ink

Drafft.ink Logo

An infinite canvas whiteboard built with Rust and WebGPU.

Try it now: drafft.ink — draw first, sign up never.

Cross-platform (Linux, Windows, macOS, browser, mobile). Real-time collaboration via CRDTs. No account required. Self-hostable with a single binary.

Screenshot


Features

  • Shapes and Drawing - Rectangles, ellipses, lines, arrows, freehand paths with pressure sensitivity
  • Smart Guides - Smart alignment snapping, equal spacing detection, angle snapping
  • Text - Multiple font families (GelPen, GelPen Serif, Vanilla Extract), per-character styling, inline LaTeX math
  • Images - Drag-and-drop, paste from clipboard, embedded in document
  • Collaboration - Real-time sync via Loro CRDT. Watch your colleagues draw boxes around things that don't need boxes.
  • Open Formats - Export to PNG or JSON. Import them back.
  • No Telemetry - We don't know what you're drawing, and frankly, we don't want to.
  • Touch Support - iPad and tablet friendly, gesture navigation
  • Sketch Style - Sketchy on purpose. Precise when it matters. Hand-drawn aesthetic via roughr and fonts

Installation

Desktop

git clone https://github.com/PatWie/drafft-ink.git
cd drafft-ink
cargo run --release

Or use the build script:

./build.sh --native

Web (Local)

./build.sh --wasm

Collaboration Server

cargo build --release -p drafftink-server
./target/release/drafftink-server

Listens on ws://localhost:3030/ws. One binary, no configuration files. Self-host it. Or don't. We're not your manager.


Architecture

crates/
  drafftink-core/     # Canvas state, shapes, CRDT sync, snapping logic
  drafftink-render/   # Vello-based GPU rendering, text layout (Parley)
  drafftink-app/      # Application logic, UI (egui), event handling
  drafftink-server/   # WebSocket collaboration server
  drafftink-widgets/  # Custom UI components

Philosophy

Your tools should work for you. No accounts, no paywalls, no telemetry, no "upgrade to Pro."


Contributing

PRs welcome. Issues welcome. The code is right here.


License

AGPLv3 - Use it, modify it, host it. Keep it open.

Extension points exported contracts — how you extend this code

ShapeTrait (Interface)
Common trait for all shapes. [9 implementers]
crates/drafftink-core/src/shapes/mod.rs
Renderer (Interface)
Trait for rendering backends. Implementations can use Vello, wgpu directly, or other rendering engines. [1 implementers]
crates/drafftink-render/src/renderer.rs
Storage (Interface)
(no doc) [3 implementers]
crates/drafftink-core/src/storage/mod.rs
ShapeRenderer (Interface)
(no doc) [1 implementers]
crates/drafftink-render/src/renderer.rs

Core symbols most depended-on inside this repo

clone
called by 174
crates/drafftink-core/src/shapes/text.rs
show
called by 94
crates/drafftink-widgets/src/colors.rs
len
called by 79
crates/drafftink-core/src/shapes/freehand.rs
len
called by 74
crates/drafftink-core/src/canvas.rs
is_empty
called by 72
crates/drafftink-core/src/canvas.rs
line_to
called by 60
crates/drafftink-render/src/rex_backend.rs
bounds
called by 58
crates/drafftink-core/src/canvas.rs
id
called by 54
crates/drafftink-core/src/shapes/mod.rs

Shape

Method 607
Function 483
Class 99
Enum 43
Interface 4

Languages

Rust99%
Python1%

Modules by API surface

crates/drafftink-core/src/mermaid/flowchart.rs76 symbols
crates/drafftink-app/src/app.rs76 symbols
crates/drafftink-core/src/canvas.rs64 symbols
crates/drafftink-render/src/vello_impl.rs51 symbols
crates/drafftink-core/src/shapes/mod.rs45 symbols
crates/drafftink-core/src/collaboration.rs43 symbols
crates/drafftink-app/src/ui.rs38 symbols
crates/drafftink-core/src/crdt/schema.rs37 symbols
crates/drafftink-core/src/crdt/convert.rs35 symbols
crates/drafftink-core/src/selection.rs34 symbols
crates/drafftink-render/src/text_editor.rs33 symbols
crates/drafftink-core/src/shapes/text.rs33 symbols

For agents

$ claude mcp add drafft-ink \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact