
She wanted to read Aab-e-Hayat, but it was not available in Roman English, Hindi or Urdu in a form she could use. The translation I found was a raw PDF, hard on the eyes, with narration and dialogue run together so you had to work out who was speaking. I wanted her to read the whole story in one calm place: offline, easy on the eyes, remembering where she stopped, and with narration and dialogue clear at a glance.
The reader is a static folder hosted on Netlify. The book is built ahead of time by the pipeline and shipped as data.js, so the site needs no server or database.
A heuristic parser got most of it but not all. I moved to an LLM that segments each chapter, and treat its output as untrusted: it is validated for at least 97% text coverage against the raw chapter, failed chapters retry, and anything that still fails falls back to the heuristic data. Results are cached per chapter, so re-runs skip finished work.
The service worker precaches the app shell and the full book on install. Responses are served from the cache and refreshed in the background, so the app opens instantly offline, at the cost that an update only appears on the next launch.
There is no server to ask. Search builds an in-memory index of the lowercased paragraphs the first time it is opened and matches against that. It is a plain substring search, which was enough at this size.
She approved the translation, and I published the site for her as a gift. It is live at aabehayat.anasvhora.tech, installs on a phone and reads offline. It was a joy to build for her. The repo is public with credits to the author and translator, a removal-on-request notice, and an MIT licence that covers the code only.