Skip to content

sidmohan0/reader

Repository files navigation

Lumen Reader

A local-first active-learning reader for research papers. Upload a PDF, let LiteParse WASM extract sections in the browser, then work through it one section at a time — with read-aloud, highlights, flashcards, and spaced-repetition review. Everything runs and stays on your device: parsing is WASM, notes live in IndexedDB, and a service worker keeps the app working offline.

Try it here: sidmohan0.github.io/reader

Features

  • Focused reading — section table of contents (collapsible), large serif text, adjustable width, lamp/paper themes
  • Read-aloud — Web Speech playback per section or selection, with sentence/word follow-along and voice profiles
  • Highlights & notes — select text to highlight; attach margin notes
  • Flashcards — turn a selection or highlight into a cloze card; review with an SM-2 spaced-repetition scheduler (Review button in the top bar shows due count)
  • Recall prompts — free-recall practice at the end of each section (auto-opens when read-aloud finishes)
  • Library — papers are keyed by content hash; reopen instantly with position, highlights, and cards restored
  • Export — highlights/notes/recalls as Markdown, cards as Anki-importable TSV
  • Offline — self-hosted fonts, service worker, installable PWA

Run Locally

npm install
npm run dev

Test

npm test

Unit tests cover the markdown→sections parser, sentence splitting, and the SM-2 scheduler (tests/).

Build

npm run build

The production site is emitted to dist/.

Structure

  • src/markdown.js — pure markdown → sections pipeline (headings, tables, figures)
  • src/parse.js — LiteParse WASM glue
  • src/sentences.js / src/tts.js / src/voices.js — tokenizing and speech playback
  • src/render.js — reading stage / TOC rendering
  • src/annotations.js — selection toolbar, highlights, recall prompts
  • src/srs.js / src/review.js — SM-2 scheduler and review view
  • src/storage.js — IndexedDB (docs, annotations, cards) + safe localStorage
  • src/exporter.js — Markdown / Anki TSV export
  • src/main.js — app wiring

Deploy To GitHub Pages

Push this project to a GitHub repository with a main branch, then enable Pages with Source: GitHub Actions. The workflow in .github/workflows/deploy.yml builds the Vite app and publishes dist/.

About

Local-first LiteParse PDF focus reader for research papers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors