A lightweight, high-performance, and entirely offline application designed for speed reading using Rapid Serial Visual Presentation (RSVP). This document outlines the comprehensive specifications, architectural patterns, tech stack details, and developmental milestones for building the application.
- Overview
- Product Requirements
- Technology Stack
- System Architecture
- Milestones & Roadmap
- Offline Verification Guide
Traditional reading involves moving eyes screen-wide from left to right, which is inherently throttled by physical eye muscles. Rapid Serial Visual Presentation (RSVP) circumvents this visual sweep limit by flashing individual words sequentially in a fixed focal position on the screen.
This application allows users to paste raw text, adjust their reading velocity (in Words Per Minute), and read content efficiently with zero internet connection dependencies.
- 100% Client-Side Reliance: The core reading visualizers must run entirely without external CDNs, third-party APIs, or standard cloud handshakes.
- Asset Bundling: All visual styling, fonts, and scripts must be hosted and served locally.
- Input Canvas: A clean, spacious, high-contrast
<textarea>accepting diverse copy-pasted document formats. - Input Handlers: Dynamic character cleanups, line-break sanitizations, and whitespace trimming.
- Visual Focus Center: A large, prominent focal display frame positioned in the physical center of the interface.
- Optimal Recognition Point (ORP): The engine should center each word slightly to the left of its physical middle (specifically near the 35-40% mark of the word) and highlight this focal character in red to maximize peripheral character recognition.
- Dynamic Interval Sliching: Support for adjusting focal dwell times on longer words or punctuation to keep reading flow organic.
- Interactive Control Ribbons: Dedicated visual triggers for Play, Pause, and Reset/Stop.
- Progress Scrubber: Visual indicators tracking the reading progress (e.g., word count tracker, remaining time estimator, progress bar).
- Words Per Minute (WPM) Controls: Adjustable slider ranging from 100 WPM to 1000 WPM with precise, real-time speed calculation adjustments.
- Clean Boundaries: The logic must be cleanly divided into dedicated modules (e.g., text parser, interval timers, state controllers, UI layout handlers) rather than a monolithic script block.
ββββββββββββββββββββββββββ
β Express.js Server β (Local serving and support
β (node_modules) β for future local loaders)
βββββββββββββ¬βββββββββββββ
β Serve Static Files
βΌ
ββββββββββββββββββββββββββ
β HTML5 / CSS3/ JS β (Static Client Assets)
βββββββββββββ¬βββββββββββββ
β ESM Imports
βββββββββββββ΄βββββββββββββ
β Modular ES6 Engines β (Parser, RSVP, Timer Modules)
ββββββββββββββββββββββββββ
The stack is kept highly clean to guarantee instantaneous local execution:
- Backend Environment: Node.js coupled with a minimal, zero-dependency Express server serving assets purely on port
3000. This provides an extensible foundation if local file loaders (e.g., parsing local.pdf,.epub, or.txtbinary inputs) are integrated later. - Frontend Delivery: Semantic HTML5, high-contrast CSS3 focusing on eye straining reduction, and vanilla JavaScript (ES6 Modules) to implement dynamic speed control interfaces cleanly.
The proposed modular workspace ensures separation of concerns:
/
βββ server.js # Minimal Express server to host static local directory
βββ public/
β βββ index.html # Core structural shell of the Speed Reader
β βββ styles.css # Clean, dark-mode display sheets with focus styling
β βββ js/
β βββ main.js # UI binder and initialization entry-point
β βββ parser.js # Tokenizes text strings and sanitizes punctuations
β βββ engine.js # Precise RSVP interval tracker and state engine
βββ package.json # Minimal Node metadata configuration
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MILESTONE 1: Local Server Setup & Semantic HTML Interface β
βββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MILESTONE 2: ES6 Parsing Module & Text Sanitization Logic β
βββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MILESTONE 3: High-Frequency RSVP Core State Engine & Timers β
βββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MILESTONE 4: Interactive Control Loops & Real-time WPM Calibration β
βββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MILESTONE 5: UX Refinement, Dark-Mode Pairing & Local Testing β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Set up a minimal local server routing using
expressserving static root streams. - Construct index markup representing two core screens:
- Preparation Pane: Input area, speed preferences, document statistics.
- Reader Pane: Visual focal canvas (massive typography) and media-player style sliders.
- Create
/js/parser.jsspecializing in string ingestion. - Implement support for:
- Splitting text securely on regular spaces and line breaks.
- Tracking punctuation delimiters to inject conversational pausing delays (e.g., matching
.,,,!,?to temporarily insert delay modifiers). - Removing rogue hidden control characters.
- Create
/js/engine.jsimplementing a deterministic state machine:- States:
IDLE,PLAYING,PAUSED,FINISHED.
- States:
- Leverage high-precision timers (
setIntervalor customizedrequestAnimationFrameticks) to schedule RSVP text renders without layout shifts. - Auto-adjust presentation timing per-word based on length to maintain a natural comprehension flow.
- Wire physical buttons to engine bindings (
play(),pause(),stop()). - Implement interactive range sliders translating immediate user range offsets (e.g.,
350 WPM$\approx$ 171msper word focal cycle) into live speed interval updates. - Track active reading index position to support dynamic pausing and resumes.
- Ensure all styling assets are local copies (no external Font Awesome, Google Font links, or CDN scripts).
- Refine the typography choices and layout dimensions for optimal readability.
- Perform comprehensive memory leak analysis to guarantee that lengthy reading tasks do not degrade thread performance.
To test full offline capabilities during development and deploy the server locally:
- Clean Installation: Ensure all primary static assets are fully contained inside the directory tree.
- Offline Simulation: Start the local service, disconnect the development machine from the local networking router, and confirm that all media states, parser triggers, speed settings, and UI styling remain fully interactive and pixel-perfect.