Skip to content

Temitope15/papermind

Repository files navigation

PaperMind

A private AI that reads, translates, and explains your most important documents — entirely offline. And, if you choose, leaves a posthumous voice letter for the people you love most.

PaperMind is an offline-first document assistant built on the Tether QVAC SDK. It pairs local OCR + translation + LLM + TTS with a novel cryptographic primitive — the AI Legacy Vault — that turns your most important documents into a posthumous gift, sealed with Shamir's Secret Sharing and timestamped on Solana.

The product is two stories, one app:

  1. Daily Use — Drop a prescription, contract, or form. Get it OCR'd, translated, explained in plain language, and read aloud, all on your laptop. Nothing leaves the device.
  2. The Vault — Process the documents you'd want your family to understand if you weren't there to explain them. The AI generates a warm, first-person "Living Letter" per document, in your chosen voice. The bundle is encrypted with AES-256-GCM and the key is split via Shamir's Secret Sharing — 2 of 3 family members must come together to unlock.

Quick Start

Download

Platform File Size
macOS (Universal) PaperMind-0.2.1.dmg ~200 MB
Windows (x64) PaperMind-Setup-0.2.1.exe ~200 MB
Linux (x64) PaperMind-0.2.1.AppImage ~180 MB

First launch downloads ~1 GB of AI models (one time). Subsequent launches load from local cache and start in seconds.

macOS first launch

PaperMind is not signed with an Apple Developer ID (a $99/yr cert we haven't bought yet), so macOS quarantines the download and shows "PaperMind is damaged and can't be opened" the first time. The app is fine — Gatekeeper just doesn't recognize the signer. Drag PaperMind to /Applications, then run this in Terminal once:

xattr -dr com.apple.quarantine /Applications/PaperMind.app

After that, open it normally from Launchpad. You'll never see the warning again.

Build from source

git clone https://github.com/Temitope15/papermind.git
cd papermind
npm install
npm run dev

QVAC Capabilities Used

Four capabilities, each exercised twice per vaulted document:

Capability Package Used For
OCR @qvac/ocr-onnx (Latin Recognizer 1) Reading text from images and PDF pages
Translation @qvac/translation-nmtcpp (Bergamot) EN ↔ FR/ES/DE/IT/PT
LLM @qvac/llm-llamacpp (Llama 3.2 1B Q4) Plain-language explanation + Living Letter
TTS @qvac/tts-onnx (Supertonic2 multilingual) Voice playback in the target language

The LLM runs twice per document: once as a clinical explainer, once as a warm Living Letter — a design choice that maps QVAC's flexibility onto a real human use case.


Architecture

┌──────────────────────────────────────────────────────────────────┐
│  Electron Main Process (Node)                                    │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │ Pipeline                                                 │    │
│  │  · qvac.ts        — model loading hub                    │    │
│  │  · ocr.ts         — OCR wrapper                          │    │
│  │  · translate.ts   — Bergamot pair selection              │    │
│  │  · explain.ts     — multilingual explanation             │    │
│  │  · living-letter.ts — first-person letters per doc type  │    │
│  │  · speak.ts       — Supertonic2 + WAV wrapping           │    │
│  │  · vault.ts       — AES-256-GCM + Shamir's SSS           │    │
│  │  · solana.ts      — devnet Memo transactions             │    │
│  └─────────────────────────────────────────────────────────┘    │
│  IPC handlers (ai:*, vault:*, solana:*)                          │
└────────────────────────────┬─────────────────────────────────────┘
                             │  Electron contextBridge
┌────────────────────────────┴─────────────────────────────────────┐
│  Renderer (React + Tailwind, Chromium context)                   │
│  · pdfToImages.ts — pdfjs-dist multi-page rendering              │
│  · Home / Result / Vault / Unlock pages                          │
│  · SealingOverlay / SharesView / LivingLetters                   │
└──────────────────────────────────────────────────────────────────┘

Privacy Guarantees

  • Zero outbound network calls during document processing. Verifiable via OS-level network monitor.
  • No disk writes for source documents — images stay in memory as ArrayBuffer.
  • Solana payloads contain hashes, IDs, and counts — never document content.
  • AES-256-GCM for vault encryption with a freshly generated 32-byte key per seal.
  • Shamir's Secret Sharing over GF(2^8) with 128-bit padding splits the key — fewer than the threshold reveal nothing.

Hackathon Context

Built for the Colosseum Frontier hackathon and the Tether QVAC side track. The submission targets two judging axes:

  1. Depth of QVAC integration — Four capabilities used, the LLM used twice (explainer + Living Letter).
  2. Novel Solana use case — "AI Notary" pattern: Memo-program-only attestation of AI-generated content, paired with a check-in mechanic that makes the vault a dead-man's switch. No custom Anchor program required.

The landing page lives at papermind-frontend/ (deployed to Vercel).


License

Apache 2.0. The QVAC SDK and its addon packages are also Apache 2.0, maintained by Tether.

About

Offline document AI lens with AI Legacy Vault. Powered by Tether QVAC SDK.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors