WorkDesktop e-reader

Readalune

Your personal desktop reading room: your own books and documents, offline, private and distraction-free. Free and open source.

First release on the way
The launch video. Every shot of the app is the real 1.0.0 build, and the voice is mine. Not affiliated with Amazon. Kindle Unlimited is a trademark of Amazon.com, Inc.
My role
Product, specification, direction and review
Platforms
Windows, macOS and Linux
License
MIT. No accounts, no tracking, no ads.
Status
Version 1.0.0 is built and tested. Not released yet.

What it is

Readalune is an e-reader for the desktop. You open your own EPUB, PDF, text, Markdown, HTML or comic files and read them in a quiet window with real page numbers, highlights, notes and a choice of six themes. It comes with 1,000 classics built in.

It has no accounts, no tracking, no ads and no network connection. Not “minimal” network: none. The app blocks every request its own window could make.

The first version was built in one evening. The working session opened at 3:51 in the afternoon, and the first pull request went up 3 hours and 52 minutes later, with five file importers, a paginated reader and its tests. The two weeks since have gone into making it correct.

In numbers

  • 3 h 52 minfrom the start of the first session to the first pull request
  • 1runtime dependency: the PDF engine. Everything else is written for this app
  • 9,646lines of app code, with no framework and no build step
  • 6formats: EPUB, PDF, TXT, Markdown, HTML and comic archives
  • 1,000classics on the built-in shelf, by 558 authors
  • 0network requests. Every one is cancelled before it leaves
  • 53 + 40unit tests and end-to-end steps that drive the real app
  • 31 KBfor a cover system that draws 1,000 covers without a single image

Every figure on this page is counted from the project itself: its code, its history and its files.

About the video

The video at the top of this page is the launch video, 41 seconds long. The picture is the real app, captured from version 1.0.0, with the headlines and the cuts drawn in code and rendered frame by frame. There is no stock footage and no generated video in it.

The voice is my own, cloned in ElevenLabs, and the music and sound effects were generated there too. The subscription statement in the first shot names no service; only my spoken line does.

Read the transcript
  1. I got tired of paying for Kindle Unlimited.
  2. All I wanted was the classics… books long out of copyright… on a good reader, all in one place.
  3. So I built one. It’s called Readalune.
  4. It’s free, it’s open source, and it comes with a thousand classics.
  5. Two pages… or one.
  6. Paper. Sage. Dusk. Night.
  7. Warm light, for late-night reading.
  8. Highlight. Take notes.
  9. And it opens right where you left off.
  10. Bring your own EPUBs and PDFs, too.
  11. No subscription. No ads. No tracking.
  12. Readalune. Free for Mac and Windows.

Not affiliated with Amazon. Kindle Unlimited is a trademark of Amazon.com, Inc.

How it was built

The decisions that made it small, private and exact.

  1. No framework, no build step, one dependency

    The app is plain HTML, CSS and JavaScript modules inside Electron. The only library it ships is the PDF engine. Everything else that an e-reader usually borrows was written for this one.

    That includes the ZIP reader that opens EPUB and comic files. It finds the archive’s directory, walks it and decompresses each entry with the platform’s own stream decoder, with hard limits so a malicious archive cannot unpack into gigabytes: 64 MB per entry, 512 MB in total, 20,000 entries.

    The EPUB reader follows the book’s own table: container, package file, reading order. The Markdown parser is 434 lines. The plain-text importer detects the encoding, rejoins lines that were hard-wrapped decades ago, and finds the chapters.

    Readalune’s library: a shelf of books with drawn covers, a continue-reading row, collections and a search field.
    The library.
  2. Real page numbers

    “Page 14 of 212” is harder than it looks, because the number of pages changes with the font, the window and the theme. Readalune lays a section out in columns where every column is exactly one page, and measures the rest of the book in the background in an invisible copy.

    Inside, a book is a flat list of blocks and a position is a character offset. So your place, your highlights and your notes stay exactly where they were when you change the font or resize the window.

    A page of Moby Dick in Readalune’s Night theme, with the page number, percent read and time left along the bottom.
    Reading in the Night theme: page number, percent and time left.
  3. Offline means offline

    The window runs sandboxed and isolated, under a content policy that starts from “nothing is allowed”. The app’s files are served from a private scheme with an allow-list of paths. Every web request is cancelled. Even the browser engine’s own habit of downloading spell-check dictionaries had to be found and switched off.

    A script fails the build if the source contains a remote address, an eval, or a way to inject HTML. Copy-protected files are refused, never unlocked.

  4. A thousand classics, checked one by one

    The built-in shelf is 1,000 books chosen from Project Gutenberg’s catalogue of 79,747 records. They ship inside the app, compressed, and each one is checked against its fingerprint when you add it to your library. Nothing is fetched.

    Chapter detection was checked against all 1,000, which is how it learned about ordinal headings, underscore italics and “[Illustration]” placeholders.

    The legal pass mattered as much as the code. The first draft of the documentation said “public domain worldwide”. That is not true and it was corrected: these books are in the public domain in the United States. A scan of every title page then found 38 editions with contributors the catalogue did not list. 37 were replaced, and one was kept and disclosed.

    Readalune’s Classics shelf: rows of public-domain books with drawn covers, grouped by shelf.
    The Classics shelf.
  5. A thousand covers, no images

    A thousand cover images would have made the download enormous, and plain colored rectangles would have made the shelf look dead. So every cover is drawn in code: 16 palettes, 8 layouts and 10 patterns, chosen by a fingerprint of the title and author so a book always gets the same cover, plus 51 small emblems matched to the classics they suit.

    The whole cover system is 31 KB.

  6. Tested by driving the real app

    53 unit tests cover the importers and the layout math. Then 40 end-to-end steps launch the actual app, import real files, turn pages, highlight and search. The automated checks run the security script, the tests and a dependency audit on every change.

The hard parts

Opening a ZIP without a library

What fixed it
A hand-written reader on the platform’s own decompression, with limits on entry size, total size and entry count, and a refusal for encrypted archives.

A page check that failed for the wrong reason

What happened
The test for exact page turns flagged 10 of 15 turns as wrong. It was measuring during the 280-millisecond slide.
What fixed it
It waits for the animation to finish. 0 of 15 after.

A PDF engine under a strict content policy

What happened
The policy forbids the tricks PDF engines normally use for fonts.
What fixed it
Glyphs are drawn as shapes instead of loaded as fonts, and nothing is evaluated at run time.

Letter-spaced text in PDFs

What happened
A title set as “E L E N A H A R T L E Y” lost the space between the two words.
What fixed it
A function that compares the gaps between letters and puts the word break back where the gap is wider.

Chapters in a thousand different books

What happened
Every old edition marks its chapters differently.
What fixed it
Each rule change was run against all 1,000 bundled books before it was kept.

An app that still phoned home

What happened
With every request blocked, the engine itself was still trying to download dictionaries.
What fixed it
Found and disabled. The app now makes no connection at all.

A claim that was too big

What happened
“Public domain worldwide.”
What fixed it
Corrected to the United States, then every edition’s title page was scanned, 37 were replaced and one was disclosed.

The rules I set

  • Local-first: everything works offline, with no account required.
  • Support DRM-free files only. Never remove or get around copy protection.
  • Double check that it works first. No bugs, no errors, nothing that looks off.
  • No legal problems, and make that clear to the reader.
  • Remake every cover in code, and do not let it take much storage.

How I worked

I wrote the specification, set the rules above and reviewed what came back, down to whether each cover suited its book. AI coding sessions wrote the code and the tests and ran the checks.

It is not released yet. When it is, it will be a free download with its source open, and this page will link to it.

Made with

App
Electron, with plain HTML, CSS and JavaScript modules. No framework, no build step.
PDF
PDF.js, the one dependency.
Storage
Plain files on your own disk. Nothing leaves it.
Packaging
Installers for Windows, macOS and Linux.
Tests
53 unit tests, 40 end-to-end steps, a security script and a dependency audit on every change.