explaingit

pranav-swarup/lattice-reader

Analysis updated 2026-05-18

2JavaScriptAudience · generalComplexity · 2/5Setup · easy

TLDR

A browser tool that lets you select one snippet of a paper or document at a time and get it explained or defined, instead of summarizing the whole thing at once.

Mindmap

mindmap
  root((Lattice Reader))
    What it does
      Explain one snippet
      Define jargon in context
      Skip whole document summaries
    Reading tools
      Dark mode invert
      Highlight and annotate
      Focus mode themes
    Tech stack
      JavaScript
      Vite
      pdf.js
    Use cases
      Read research papers
      Study long documents
      Multi document library
    Audience
      Students
      Researchers
      General readers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Read a dense research paper and get one confusing paragraph explained in plain English without losing the surrounding context.

USE CASE 2

Look up every technical term in a selected passage at once instead of searching definitions one by one.

USE CASE 3

Keep a running library of multiple documents, each with its own isolated chat history and highlights.

USE CASE 4

Ask general questions to an AI assistant mid-session without it dragging in the whole document as context.

What is it built with?

JavaScriptVitepdf.js

How does it compare?

pranav-swarup/lattice-reader3imed-jaberi/cryptography-si-isamm3imed-jaberi/koa-isomorphic-router
Stars222
LanguageJavaScriptJavaScriptJavaScript
Last pushed2021-09-252021-02-06
MaintenanceDormantDormant
Setup difficultyeasyeasyeasy
Complexity2/51/52/5
Audiencegeneralresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Needs your own API key from a provider like Google Gemini, OpenAI, Anthropic, or a local Ollama setup.

In plain English

Lattice Reader is a browser tool for reading papers and long documents one piece at a time, instead of getting a summary of the whole thing dumped on you. You select a snippet of text and ask about just that piece, with the rest of the document available as context. There are two explanation modes: Basic, which restates the selected text in plain English using analogies and examples, and Define, which pulls out every technical term or symbol in the selection and explains it in light of the document around it. Each snippet you ask about becomes its own conversation thread that you can keep following up on, and you can also ask a general question without selecting any text first. A toggle lets you switch between Document mode, where the document is sent along as context, and General mode, where you get a plain assistant with no document attached. You can also highlight and annotate passages, invert PDF colors for dark mode reading, choose from several reading themes, and narrow which pages count as context so a long paper with a big appendix does not waste tokens. The tool can hold several documents at once, each in its own separate session. Lattice Reader is bring your own key: you connect your own account with Google Gemini, which has a free tier and needs no credit card, Anthropic Claude, OpenAI, OpenRouter, or a fully local Ollama setup. The whole app is static files with no server, so your key never passes through anyone else's backend, though it is still stored in the browser, which any script on the page could read. To run it yourself you need Node and npm: install dependencies and run the dev script locally, or deploy the built static files to GitHub Pages, Render, Netlify, or Vercel. It is built with JavaScript. The README also documents some internal design choices, like using prompt caching to cut repeat costs on Anthropic and rebuilding two column PDF text into proper reading order, aimed at people who might want to modify the code themselves.

Copy-paste prompts

Prompt 1
Explain what Lattice Reader's Basic mode and Define mode are each meant to be used for.
Prompt 2
Walk me through getting a free Google Gemini API key so I can use Lattice Reader.
Prompt 3
Show me how to deploy Lattice Reader to GitHub Pages using the included workflow.
Prompt 4
Explain why Lattice Reader reconstructs PDF reading order from x and y coordinates instead of using the raw text stream.

Frequently asked questions

What is lattice-reader?

A browser tool that lets you select one snippet of a paper or document at a time and get it explained or defined, instead of summarizing the whole thing at once.

What language is lattice-reader written in?

Mainly JavaScript. The stack also includes JavaScript, Vite, pdf.js.

How hard is lattice-reader to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is lattice-reader for?

Mainly general.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.