Posted on :: 493 Words :: Tags: , ,

Building E-inn: A Minimalist EPUB Reader with Full Customization

Since I started reading electronic books, I was frustrated by the lack of truly customizable EPUB readers. Most existing solutions either lock you into their ecosystem, require accounts and syncing services, or simply don't offer the font and styling flexibility I wanted. So I decided to build my own: E-inn Reader.

What Makes E-inn Different

E-inn is built around a simple philosophy: maximum customization with minimal complexity. It's a single-page application that runs entirely in your browser, stores your books locally using IndexedDB, and gives you complete control over how your reading experience looks and feels.

Key Features

  • Full typography control: Multiple functional fonts, sizing, and color schemes (custom fonts would need rebuild)
  • No database required: Books are stored in your browser's IndexedDB, settings in localStorage
  • Static file serving: No server-side processing needed for basic functionality
  • Annotation support: Add notes and highlights that persist with your books
  • Local and remote support: Upload files directly or connect to a remote API

The Technical Stack

I kept the technology stack intentionally minimal:

  • Vue.js for the reactive UI components
  • Vue Router for navigation
  • epub.js for EPUB parsing and rendering

Solving Real Problems

One of the most satisfying aspects of this project was fixing a persistent issue in the epub.js library. The "No Section Found" error (GitHub issue #1214) would crash the reader when the epub's xhtml files did not contain <section>...</section> element. After diving deep into the epub.js source code, I implemented a robust error handling solution that gracefully manages section loading failures and maintains reading position.

Local-First, Sync-Optional

E-inn embraces a local-first approach. Your books, annotations, and reading progress live in your browser. There's no account creation, no mandatory cloud sync, and no vendor lock-in. However, if you're building a platform for multiple users and want to serve them the same books, you can easily configure E-inn to work with a centralized API by setting a few environment variables.

What's Next

While E-inn currently focuses on individual use, I'm considering adding device synchronization as a future enhancement. The architecture is already designed to support this - it would simply involve replacing the IndexedDB and localStorage technologies with a centralised database.

Try It Yourself

Demo

You can download an epub file from here or public archive to test it with: alice.epub

E-inn Reader is open source and available on GitHub. You can run it locally with Docker Compose or deploy it as a static site anywhere. If you've been looking for an EPUB reader that truly puts customization in your hands, give it a try.

Sometimes the best solution is the simplest one. E-inn proves that you don't need a complex architecture to build something powerful and useful.