GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - AdwaitPr/vellumgraph: Local-first infinite spatial research canvas powered by React 19, PixiJS v8, Yjs CRDTs, Rust (Axum + yrs), and local ONNX hybrid vector/BM25 search.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
apps/web
apps/web
 
 
deploy/docker
deploy/docker
 
 
docs
docs
 
 
packages/protocol
packages/protocol
 
 
scripts
scripts
 
 
services/sync-engine
services/sync-engine
 
 
.gitignore
.gitignore
 
 
.npmrc
.npmrc
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
README.md
README.md
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 

Repository files navigation

VellumGraph

Rust 2024 Axum 0.8 React 19 PixiJS v8 Yjs / Yrs CRDT sqlite-vec / pgvector ONNX BGE-Small License: MIT

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.


The Cartographer's Obsidian Desk

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.

VellumGraph Cartographer's Obsidian Desk

Architectural Pinpoint Legend

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-container
cards (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-radar
FloatingHud.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, $k=60$). #pixi-gl-canvas tethers
POST /api/ghost-whisper
embedding.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 button
ExcerptProvenance struct
types.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-reader
POST /api/sources/pdf
DockedPdfReader.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_id
crdt.rs

Deep-Dive Visual Feature Walkthroughs

1. Three-Tier Semantic Level-of-Detail (LOD)

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.

Constellation Macro Zoom
  • What You See: Zooming out to 0.20x collapses 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.html for the LOD switcher and minimap frustum math.

2. Bi-Directional PDF Provenance & Excerpt Tear-Out

Scientific claims without traceable provenance degrade trust. In VellumGraph, no synthesis card exists in isolation from its primary literature.

PDF Provenance Jump Link
  • 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-engine parses font dictionaries and text matrices with lopdf 0.35, extracting page-indexed text blocks into SQLite sources and vectorizing chunks with fastembed-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.html for split-pane reader structure and anchor pulse styling.

3. Lasso Synthesis & Empirical Contradiction Radar

Literature review frequently uncovers irreconcilable empirical claims across disciplines. VellumGraph detects and surfaces these tensions automatically.

Lasso Synthesis and Contradiction Radar
  • 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.html for action pill structure.

System Architecture & Sync Lifecycle

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
Loading

Dual-Mode Storage Matrix

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 ($k=60$) SQL-level RRF CTE query
Local File Footprint Single vellumgraph.sqlite file + WAL Managed PostgreSQL instance

Verified Benchmarks & SLA Compliance

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

Quickstart & Installation

Prerequisites

  • Node.js: v20+ and pnpm (corepack enable pnpm)
  • Rust: 1.85+ (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)

1. Clone & Install Dependencies

git clone https://github.com/AdwaitPr/vellumgraph.git
cd vellumgraph
pnpm install

2. Start Backend Sync Engine (Embedded Mode)

cd services/sync-engine
cargo run

The engine auto-downloads BAAI/bge-small-en-v1.5 into ~/.cache/vellumgraph/models and initializes vellumgraph.sqlite on port 3001.

3. Start Frontend Web Client

# In another terminal window:
pnpm --filter @vellumgraph/web dev

Open http://localhost:5173 in your browser.

4. Run Test Suite & Benchmarks

# 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

Repository Structure

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

License

MIT © 2024-2026 Adwait Pratap Singh. Open-sourced for local-first research synthesis.

About

Local-first infinite spatial research canvas powered by React 19, PixiJS v8, Yjs CRDTs, Rust (Axum + yrs), and local ONNX hybrid vector/BM25 search.

Topics

axumcrdtlocal-firstpgvectorpixijsresearch-toolsrustspatial-canvassqlite-vecvector-searchwebgl2yjs

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.