liammagee/reading-app

★ 0Forks 0TypeScriptGitHub ↗Compare

README

Focus Reader

Speed reading sandbox with memory, parallel text alignment, and a hermeneutics companion stub.

Quick Start

cd reading-app
npm install
npm run dev -- --port 5174

Then in the main site:

  • Set READING_APP_URL=http://localhost:5174 before running node server.js
  • Open /#/reading

If you build the reading app separately, set READING_APP_DIST to the built dist folder path.

Voice playback calls /api/tts/speak. In local Vite dev, the dev server can bridge directly to Lemonfox using LEMONFOX_API_KEY from .env (server-side only, not exposed to the client bundle).

Environment Variables

Vite automatically loads .env files. Any variable prefixed with VITE_ is exposed to the client.

Example (.env):

# Optional: enables local Vite `/api/tts/*` Lemonfox bridge
LEMONFOX_API_KEY=your_key_here

# Optional: only set when API is on a different origin
VITE_API_BASE_URL=https://api.example.com

VITE_API_BASE_URL overrides the API base for auth/sync/TTS calls (defaults to same-origin). For local Vite dev on localhost:5174, leaving it unset is recommended so /api uses the Vite proxy.

Features in This Skeleton

  • Word-by-word playback with WPM + chunk size controls
  • Local progress + bookmarks (localStorage)
  • Parallel text panel (rough proportional alignment)
  • PDF import with page ranges + TOC navigation
  • OCR option for scanned/image-only PDFs
  • Lemonfox voice playback with voice + speed controls
  • Conventional excerpt view
  • Hermeneutics companion placeholder

Roadmap Notes

  • Kindle: only DRM-free exports or personal documents (no DRM bypass)
  • EPUB parsing: add epubjs
  • Parallel alignment: add segment-level mapping data and a manual alignment UI
  • AI discussion: wire to /api/tutor/quick-chat with the current excerpt

Contributors

liammagee

Issues