Skip to content

fran98m/speedreader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speed Reader

Speed Reader is an open-source, AI-powered web app that helps you read, learn, and retain information from long texts, lectures, and documents. It combines a rapid reading interface with persistent session management and local LLM (Large Language Model) integration for personalized recaps, checkpoints, and interactive learning.


🚀 Features

  • Speed Reading UI: Read any text at your chosen pace, with word-by-word or chunked display.
  • Session Persistence: Automatically saves your reading position, answered questions, and progress for every text—resume anytime, even after closing the browser.
  • AI-Powered Checkpoints: At intervals, the app asks comprehension questions and provides instant feedback using a local LLM (e.g., llama.cpp, Qwen3.5-27B).
  • Seamless Resumption: When you return, the app bridges your last session with a smart AI-generated recap, so you never lose context.
  • Local-First & Private: All session data is stored locally in your browser (IndexedDB). No cloud required. LLM runs locally or on your own server.
  • Custom LLM Provider: Easily configure your own OpenAI-compatible LLM endpoint (supports llama.cpp, OpenRouter, etc.).
  • Robust Error Handling: Persistent loading overlays and clear feedback ensure the UI never gets stuck, even with slow or failing AI responses.
  • Modern, Responsive UI: Built with React, designed for clarity and focus.
  • Tested & Reliable: 80+ unit tests, clean build, and robust async flows.

🖥️ Demo

Speed Reader Demo


🛠️ Getting Started

1. Clone the Repo

git clone https://github.com/yourusername/speed-reader.git
cd speed-reader

2. Install Dependencies

npm install

3. Start the App

npm start

The app will be available at http://localhost:3000.


🤖 Local LLM Integration

Speed Reader is designed to work with any OpenAI-compatible LLM API (e.g., llama.cpp, OpenRouter, local server). For best results:

  1. Run a local LLM server (e.g., llama.cpp) with the /v1/chat/completions endpoint enabled.
  2. Configure the provider URL in the app's Home screen (auto-filled for common setups).
  3. Choose your model (Qwen3.5-27B, Llama-2, etc.) and adjust max tokens as needed.

Note: All AI processing happens locally or on your server—your data never leaves your machine.


📦 Project Structure

public/
  index.html
  demo.gif
src/
  App.js            # Main app entry
  index.js          # React entry point
  db/sessions.js    # IndexedDB session persistence
  hooks/useSpeedReader.js # Reading/session logic
  components/
    ReadingScreen.js
    HomeScreen.js
    ResumeOverlay.js
  api/llm.js        # LLM API integration
  __tests__/
    api/llm.test.js # Unit tests
package.json
README.md

🧠 How It Works

  • Reading Loop: The app displays text at your chosen speed, pausing at checkpoints for AI-generated questions.
  • Session Save/Resume: Progress, answers, and text are saved in IndexedDB. Resume anytime, even after a browser restart.
  • AI Recaps: When resuming, the LLM summarizes your last session and bridges to the new one, so you never lose context.
  • Error Handling: Persistent overlays and robust async flows ensure the UI never gets stuck, even if the LLM is slow or fails.

🧩 Extending & Customizing

  • Add New LLM Providers: Point the provider URL to any OpenAI-compatible endpoint.
  • Customize Checkpoints: Tweak the checkpoint logic in useSpeedReader.js for different question types or intervals.
  • UI Themes: Style the app via CSS or add new components for different reading modes.
  • Analytics & Export: All data is local, but you can add export/import features for your sessions.

📝 Contributing

Contributions are welcome! Please open issues or pull requests for bugs, features, or improvements.

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Commit your changes
  4. Push and open a PR

🛡️ License

MIT License. See LICENSE for details.


🙏 Acknowledgements

  • llama.cpp for blazing-fast local LLMs
  • idb for IndexedDB convenience
  • OpenRouter for API compatibility inspiration
  • All open-source contributors and the AI community

💡 Why Speed Reader?

Reading is the foundation of learning, but long texts and lectures can be overwhelming. Speed Reader helps you:

  • Stay focused and engaged
  • Retain more with active checkpoints
  • Learn at your own pace
  • Own your data and privacy
  • Leverage the power of local AI

Open source, private, and built for curious minds. Happy reading!

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors