Inspiration

Online learning materials assume a lot: long walls of text, a big screen, a stable connection, an account, and often a paid app. That quietly shuts out learners on phones, on buses, on shared library computers, on patchy data, and people with dyslexia or low reading stamina. I wanted the smallest possible thing that still removes those barriers: not another app to install, but a file that just opens.

What it does

PocketPack turns any web article (or pasted text) into a single, small HTML file - usually under 60 KB - that becomes a complete offline study pack:

  • Chunked reading - the text is split into short, finishable parts (~150 words) with Previous/Next navigation, so a long article stops being a wall.
  • Read aloud - one tap reads the current part using the device's built-in speech (Web Speech API). No audio files, works offline.
  • Dyslexia-friendly mode - one tap switches to wider letter and word spacing, looser line height, and an easier font. A second control enlarges the text.
  • Hard-word glossary - longer, less common words (heuristic: not in a small common-words set, and 3+ estimated syllables or 9+ letters) are underlined in the text and listed with their frequency, so a learner knows what to look up.
  • Self-quiz - rule-based fill-in-the-blank questions built from the sentences that contain the glossary words, with instant feedback.
  • Reading estimate - word count, part count, and approximate minutes up front.

Everything is inlined: text, styles, and script. The pack makes zero network requests, so it works in airplane mode, on a plane, on a bus, in a dead zone. Three sample packs (Dyslexia, Photosynthesis, Internet safety - generated from real Wikipedia articles) are linked on the homepage to try instantly.

How I built it

Zero-dependency Node.js (18+). A small server (run.mjs for local use, a Vercel serverless function api/pack.js for the live demo) fetches the URL, extracts the article's real paragraphs (boilerplate stripping + paragraph-density scoring, with an all-paragraphs fallback because nested divs defeat naive container matching), then generates the pack HTML with all interactive behavior inline. The front end is one static page. No frameworks, no build step, no npm install - node run.mjs and it runs.

Challenges I ran into

  • Article extraction without libraries. Readability-style extraction is easy to get wrong: my first container-scoring version pulled only 400 words from a long Wikipedia article because nested <div>s break naive regex matching. The fix was scoring candidate containers by paragraph text density but falling back to all-paragraph extraction when the winner is drastically smaller.
  • A true single file. Every feature had to work with no network: no web fonts, no CDN, no TTS service. The Web Speech API made read-aloud possible offline; quiz generation had to be rule-based (sentences containing glossary words become fill-in-the-blank).
  • Honesty about what it is. A wrong AI definition is worse than none, so the glossary flags words to look up instead of inventing definitions, and the pack never rewrites the learner's text - it supports the reading, it doesn't replace it.

Accomplishments that I'm proud of

  • The entire pack - 3,000+ words of article, 22 reading parts, glossary, quiz, read-aloud, dyslexia mode - fits in 31 KB and works with the network off.
  • The live demo and the local app share one code path; there is nothing to install to try it.
  • Accessibility is the feature set, not a checklist: chunked reading, TTS, dyslexia-friendly typography, and phone-first layout are the whole product.

What I learned

How much accessibility work is really about removing assumptions (connection, device, account, stamina) rather than adding features - and how far you can get with zero dependencies when you commit to that.

What's next for PocketPack

  • Better reading-level adaptation (optional simplified re-read per part), spaced-repetition review of glossary words, EPUB/PDF input, and sharing packs via QR code for classroom handouts.

Built With

Node.js, vanilla JavaScript, Web Speech API, Vercel. Zero npm dependencies.

Try it out

Built With

  • accessibility
Share this project:

Updates

Submission history