A production-grade, local-first Spatial Canvas for Research Synthesis.
Transform fragmented literature into an interconnected spatial synthesis desk with 60 FPS WebGL2 rendering, zero-friction embedded SQLite vector search, and sub-15ms binary CRDT multi-device synchronization.
VellumGraph bridges the chasm between raw academic literature, unstructured thought mapping, and formal synthesized knowledge. Built from the ground up on a local-first foundation, it operates with zero cloud lock-in via single-file SQLite, while seamlessly scaling to PostgreSQL cluster backends.
The annotated hero interface above demonstrates the six foundational subsystems of the VellumGraph engine:
| Pin | Subsystem Name | Technical Invariant & Architecture | DOM Anchor & CRDT / Rust Source Link |
|---|---|---|---|
| ① | PixiJS v8 Infinite Canvas | Locked 60 FPS (≤16.6 ms/frame) pan/zoom (0.05x–2.5x) across 5,000+ cards using PixiJS v8 WebGL2 viewport culling, instanced cubic Bezier connectors, and Web Worker R-tree spatial indexing. |
#pixi-canvas-containercards (Y.Map<string, Card>)PixiCanvas.tsx
|
| ② | Semantic Zoom & Minimap Radar HUD | 3-tier Level-of-Detail (LOD): Macro Constellation (<0.35x), Meso Synthesis (0.35x–0.9x), and Micro Reading (>0.9x) with real-time frustum radar feedback. |
#semantic-lod-switcher#minimap-radarFloatingHud.tsx
|
| ③ | Ghost Whisper Semantic Tethers |
2.91 ms p99 hybrid neural retrieval combining 384-dim ONNX embeddings (fastembed-rs + BAAI/bge-small-en-v1.5) and BM25 lexical search merged via Reciprocal Rank Fusion (RRF, |
#pixi-gl-canvas tethersPOST /api/ghost-whisperembedding.rs
|
| ④ | PDF Excerpt Provenance Badge | Exact page number and normalized bounding-box [x1, y1, x2, y2] bi-directional coordinates permanently linked to excerpt cards. Clicking the badge navigates the PDF reader and pulses the highlight. |
#card-card-1 buttonExcerptProvenance structtypes.ts
|
| ⑤ | Docked PDF.js Split-Pane Reader | In-browser PDF engine extracting page-indexed text chunks via lopdf 0.35, rendering dual-pane research texts, and enabling one-click "Tear Out Excerpt Card" spawning. |
#docked-pdf-readerPOST /api/sources/pdfDockedPdfReader.tsx
|
| ⑥ | Local-First CRDT Sync Status Pill |
0 ms local mutation latency via Yjs + IndexedDB, synchronized over binary WebSockets speaking lib0 framing (messageSync + messageAwareness) to Rust yrs Axum server with 2s snapshot compaction. |
#crdt-sync-status-pill/ws/canvas/:canvas_idcrdt.rs
|
When synthesizing dozens of papers, visual density quickly overwhelms flat whiteboards. VellumGraph implements semantic zoom: as you transition across spatial scales, cards alter not just their visual dimensions, but their semantic density.
- What You See: Zooming out to
0.20xcollapses dense card bodies into glowing galactic star nodes grouped by semantic cluster hulls (e.g. Distributed Systems & CRDT Convergence in Blue, Neural Attractors in Emerald, Transformer Scaling in Violet). The dense Bezier web visualizes high-level cross-domain citations. - Under the Hood: An R-tree index (
rbush) running in a Web Worker maintains 2D spatial bounding boxes. Viewport frustum culling ensures only elements inside the visible rectangle consume render ticks. Cards outside the viewport are detached from the DOM, guaranteeing a locked 60 FPS even with 5,000+ nodes. - DOM Anatomy: See
docs/dom-snapshots/floating-hud.htmlfor the LOD switcher and minimap frustum math.
Scientific claims without traceable provenance degrade trust. In VellumGraph, no synthesis card exists in isolation from its primary literature.
- What You See: Clicking the
[Lamport 2024, p. 4]provenance pill on Card 1 automatically slides out the Docked PDF Reader, scrolls directly to page 4, and triggers an animated amber glow around the exact source bounding box[48, 142, 540, 210]. - Under the Hood: When a PDF is uploaded,
services/sync-engineparses font dictionaries and text matrices withlopdf 0.35, extracting page-indexed text blocks into SQLitesourcesand vectorizing chunks withfastembed-rs. Highlighting any text passage in the reader and clicking Tear Out Excerpt Card instantly spawns a new synthesis card on the canvas with embedded bounding-box anchors. - DOM Anatomy: See
docs/dom-snapshots/docked-pdf-reader.htmlfor split-pane reader structure and anchor pulse styling.
Literature review frequently uncovers irreconcilable empirical claims across disciplines. VellumGraph detects and surfaces these tensions automatically.
- What You See: Drawing a selection lasso around related concepts summons the floating Lasso Synthesis Bar. When an empirical contradiction exists among selected concepts (e.g., Card 4 Linearizability Bounds under Partitions vs. Card 15 Transformer Speculative Decoupling), a crimson pulsing alert beacon appears on the connector edge and action bar.
- Under the Hood: Clicking the radar reveals a side-by-side claim comparison with exact quotes, paper provenance, and architectural discrepancy analysis. Users can click Generate Reconciled Synthesis Card to generate a bridging hypothesis card (Speculative Bayesian Lattices) that connects both clusters.
- Export Cited Markdown: One click compiles selected cards into an academic Markdown synthesis document with superscript citation markers
[^1]and full bounding-box bibliographies. - DOM Anatomy: See
docs/dom-snapshots/lasso-synthesis-bar.htmlfor action pill structure.
flowchart TD
subgraph BrowserClient ["Browser Client (React 19 + PixiJS v8)"]
UI["Obsidian Canvas Viewport"]
RTree["rbush Web Worker Spatial Index"]
YDoc["Yjs CRDT Document"]
IDB[("IndexedDB (0 ms Local Mutation)")]
UI <--> RTree
UI <--> YDoc
YDoc <--> IDB
end
subgraph WireProtocol ["Binary lib0 WebSocket Channel"]
WS["ws://localhost:3001/ws/canvas/:id"]
Sync1["SyncStep1 (StateVector)"]
Sync2["SyncStep2 (Diff Updates)"]
Awareness["Awareness (Live Cursors)"]
end
subgraph RustSyncEngine ["Sync Engine (Rust Axum 0.8 + yrs 0.28)"]
AxumServer["Axum WebSocket Actor Room"]
YrsDoc["yrs::Doc Room State"]
Compactor["Snapshot Compaction Loop (2s / 250 updates)"]
Indexer["400ms Debounced Mutation Observer"]
AxumServer <--> YrsDoc
YrsDoc --> Compactor
YrsDoc --> Indexer
end
subgraph LocalAIStorage ["Dual-Mode Storage & AI Layer"]
FastEmbed["FastEmbed ONNX (BAAI/bge-small-en-v1.5)"]
SQLiteVec[("SQLite (sqlite-vec + FTS5 BM25)")]
PgVector[("PostgreSQL 16 (pgvector HNSW)")]
Indexer --> FastEmbed
FastEmbed --> SQLiteVec
FastEmbed -.-> PgVector
Compactor --> SQLiteVec
Compactor -.-> PgVector
end
YDoc <== "lib0 binary frames" ==> WS
WS <== "broadcast_tx" ==> AxumServer
VellumGraph provides two deployment profiles with identical trait APIs (CrdtSnapshotStore and SemanticIndexStore):
| Characteristic |
VELLUM_MODE=embedded (Default) |
VELLUM_MODE=cluster |
|---|---|---|
| Target Audience | Individual researchers, local privacy, offline laptops | Academic research labs, shared institutional teams |
| Prerequisites | Zero. Single self-contained binary, no Docker required. | PostgreSQL 16 + pgvector extension |
| CRDT Snapshot Storage | SQLite crdt_snapshots blob store |
PostgreSQL crdt_snapshots binary table |
| Vector Index Engine |
sqlite-vec 0.1.9 (vec0 virtual table, 384 dimensions) |
pgvector 0.4.2 (hnsw (vector_cosine_ops)) |
| Lexical Search Engine | SQLite FTS5 with BM25 ranking (fts5_cards) |
PostgreSQL tsvector with ts_rank_cd english config |
| Hybrid Fusion | In-process Reciprocal Rank Fusion ( |
SQL-level RRF CTE query |
| Local File Footprint | Single vellumgraph.sqlite file + WAL |
Managed PostgreSQL instance |
All benchmarks were evaluated using automated end-to-end integration tests (tests/sync_and_search_e2e.rs) across a 1,000-card spatial document index:
| Performance Metric | Target SLA | Measured Benchmark | Status |
|---|---|---|---|
| Local Mutation Latency | ≤ 1 ms | 0.00 ms (Synchronous Yjs + IndexedDB) | PASSED |
| WebSocket Round-Trip Sync | < 15 ms | 2.10 ms (Rust yrs binary diff) |
PASSED |
| Ghost Whisper Query (p50) | < 40 ms | 2.61 ms (FastEmbed ONNX + sqlite-vec + FTS5 RRF) | PASSED |
| Ghost Whisper Query (p90) | < 40 ms | 2.79 ms (FastEmbed ONNX + sqlite-vec + FTS5 RRF) | PASSED |
| Ghost Whisper Query (p99) | < 40 ms | 2.91 ms (FastEmbed ONNX + sqlite-vec + FTS5 RRF) | PASSED |
| Canvas Framerate (5k nodes) | Locked 60 FPS | 60.0 FPS (PixiJS v8 R-tree frustum culling) | PASSED |
- Node.js:
v20+andpnpm(corepack enable pnpm) - Rust:
1.85+(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)
git clone https://github.com/AdwaitPr/vellumgraph.git
cd vellumgraph
pnpm installcd services/sync-engine
cargo runThe engine auto-downloads BAAI/bge-small-en-v1.5 into ~/.cache/vellumgraph/models and initializes vellumgraph.sqlite on port 3001.
# In another terminal window:
pnpm --filter @vellumgraph/web devOpen http://localhost:5173 in your browser.
# Run backend CRDT & hybrid retrieval latency benchmarks cargo test --workspace # Run backend clippy validation cargo clippy --workspace -- -D warnings # Run frontend production build & TypeScript check pnpm --filter @vellumgraph/web build # Run Playwright visual telemetry capture suite pnpm run capture:telemetry
vellumgraph/
├── apps/
│ └── web/ # React 19 + PixiJS v8 Spatial Canvas
│ ├── src/
│ │ ├── components/
│ │ │ ├── PixiCanvas.tsx # 60 FPS Canvas with 3-tier LOD & Beziers
│ │ │ ├── FloatingHud.tsx # Top search HUD & minimap radar
│ │ │ ├── DockedPdfReader.tsx # Split-pane PDF viewer with bbox anchors
│ │ │ ├── LassoSynthesisBar.tsx# Multi-card synthesis & contradiction bar
│ │ │ └── ContradictionModal.tsx# Side-by-side claim discrepancy modal
│ │ ├── data/seedData.ts # Dense 18-card, 3-PDF research corpus
│ │ └── types.ts # Frontend type interfaces
│ └── package.json
├── packages/
│ └── protocol/ # Shared Yjs/Yrs schema & TypeScript contracts
├── services/
│ └── sync-engine/ # High-performance Rust Axum sync engine
│ ├── src/
│ │ ├── crdt.rs # yrs lib0 wire protocol & compaction
│ │ ├── embedding.rs # FastEmbed ONNX & RRF hybrid fusion
│ │ ├── storage/ # SQLite (sqlite-vec) & Postgres (pgvector)
│ │ └── server.rs # Axum WebSocket & REST API handlers
│ └── tests/ # Convergence & <40ms latency benchmarks
├── docs/
│ ├── screenshots/ # High-DPI coordinate-pinned screenshots
│ └── dom-snapshots/ # Structural HTML snapshots & ui-architecture-map.json
└── scripts/
└── capture-telemetry.js # Automated Playwright extraction suite
MIT © 2024-2026 Adwait Pratap Singh. Open-sourced for local-first research synthesis.



