← Back to Projects
Offline-First PWA React 19 & TypeScript Model Context Protocol (MCP) 100% Client-Side Privacy

WordNook

A fast, 100% private, offline-first English dictionary Progressive Web App (PWA) and local AI Model Context Protocol (MCP) server. Operates completely client-side with zero tracking, zero remote databases, and sub-10ms in-memory prefix search.

Launch wordnook.app npm: @hemingweb/wordnook-mcp User Manual View All Projects

Core Architectural Highlights

Sub-10ms In-Memory Search
Prefix Trie + Lemmatizer

Instant prefix autocomplete powered by an in-memory Trie (~1–3 MB RAM footprint). Includes intelligent Damerau-Levenshtein typo correction ("Did you mean...?") coupled with a morphological suffix lemmatizer that resolves inflected words (e.g. springing → spring) back to root lemmas.

100% Client-Side & Zero Liability
Zero Remote Databases

Zero user tracking, zero search query logging, and zero tracking cookies. Word bookmarks and history remain strictly on the user's device in IndexedDB via navigator.storage.persist(), with zero-friction JSON export/import for cross-device backup.

Companion MCP Server on npm
@hemingweb/wordnook-mcp

Published official Model Context Protocol (MCP) package enabling local AI agents and LLMs (Ollama, Claude Desktop, Cursor, Zed, Cline, Antigravity) to query WordNook's lexicon, definitions, synonyms, and grammatical classifications completely on-device without API fees.

Offline-First PWA Engineering
Airplane Mode Ready

Installable directly to home screens on iOS and Android without app store distribution. Features custom WebKit Service Worker guards that inspect navigator.onLine before network requests to eliminate intrusive iOS Airplane Mode network prompts.

Engineering Innovations & Architecture

WordNook is built on a modular "Envelope" architecture, strictly decoupling the typography-focused user interface from on-device dictionary storage and search indexing:

  • Interactive Reverse Definitions:

    Every single word appearing in definitions, parts of speech, and usage examples is dynamically clickable, allowing readers to explore recursive semantic lookups seamlessly without manual typing.

  • Native Offline Text-to-Speech (TTS):

    Utilizes the native browser Web Speech API (window.speechSynthesis) with an intelligent voice-scoring engine. Automatically selects fluid operating system voices (Apple CoreAudio Samantha, Ava, Daniel; Windows Jenny) while penalizing robotic software synthesizers.

  • Deterministic Offline "Word of the Day":

    A mathematical date-seeded algorithm guarantees that every user worldwide sees the exact same curated "Word of the Day" on any given calendar day, functioning 100% offline without backend servers or API requests.

  • Compressed Data Streaming & Storage Efficiency:

    The comprehensive English lexicon is served over the wire as compressed gzip (en-core.json.gz, ~6.7 MB) and decompressed directly into IndexedDB. The Service Worker deliberately avoids caching raw dictionary datasets in Cache Storage, preventing duplicate device disk consumption.

  • Notification by Exception Philosophy:

    A distraction-free typography hierarchy (Newsreader serif body + Inter sans UI) designed for serene reading. The UI stays silent during everyday usage, eliminating persistent "Offline Ready" badges and surfacing status alerts only when action is needed.

Local AI Integration via Model Context Protocol (MCP)

WordNook extends beyond the browser as a local reference engine for AI assistants. Through the official npm package @hemingweb/wordnook-mcp, developers and local LLMs can inspect lexical entries, perform fuzzy search, and extract grammatical metadata over stdio with zero latency and zero data leakage:

# Run instantly via npx (Claude Desktop, Cursor, Ollama, Antigravity)
npx -y @hemingweb/wordnook-mcp

# Available tools exposed to LLMs:
• lookup_word(word: string) → Definitions, lemmas, etymologies, examples
• search_prefix(prefix: string) → Sub-10ms prefix completions
• get_word_of_the_day(date?: string) → Deterministic global daily entry

Technical Architecture & Stack

  • React 19 & TypeScript
  • Vite Pipeline
  • Model Context Protocol (MCP)
  • npm Package (@hemingweb/wordnook-mcp)
  • In-Memory Prefix Trie (~1–3 MB)
  • Damerau-Levenshtein Matcher
  • Morphological Lemmatizer
  • IndexedDB Storage (Client-Side)
  • Web Speech API (Native TTS)
  • Progressive Web App (PWA)
  • Service Worker Cache API
  • Cloudflare Pages
Launch wordnook.app View @hemingweb/wordnook-mcp on npm Read User Manual View All Projects