A modern web-based EPUB reader built with React, TypeScript, and DexieJS (IndexedDB).
- 📚 Add EPUB books via drag-and-drop or file picker
- 🖼️ Automatic cover image extraction and display
- 💾 Local storage using IndexedDB (no server required)
- 🎨 Clean, modern UI with Tailwind CSS
- 📱 Responsive design
- Node.js 20.19+ or 22.12+
- Bun (Package Manager & Runtime)
bun installbun run devOpen http://localhost:5173 in your browser.
bun run buildThere are two ways to add EPUB books to your library:
- Drag and Drop: Simply drag an
.epubfile onto the drop zone on the library page - File Picker: Click the "Add Book" button and select an
.epubfile from your computer
The library page displays all your books with:
- Cover images (automatically extracted from EPUB metadata)
- Book title and author
- Last read date (if applicable)
- Open a book: Click on any book card (reader functionality coming soon)
- Delete a book: Hover over a book card and click the trash icon
- Database setup with DexieJS
- EPUB parsing (EPUB3 with EPUB2 fallback support)
- Metadata extraction (title, author, publisher, etc.)
- Cover image extraction
- Manifest parsing
- Spine parsing
- Table of contents parsing (NAV and NCX)
- Library page UI
- Book grid display
- Drag-and-drop file upload
- File picker upload
- Cover image display
- Book deletion
- Storage service layer
- Toast notifications
- Reader page
- Scroll mode
- Paginated mode
- Navigation between chapters
- Table of contents sidebar
- Reading settings
- Font size adjustment
- Line height adjustment
- Theme selection (light/dark/sepia)
- Reading progress tracking
- Keyboard shortcuts
- Search functionality
- Bookmarks and highlights
- Frontend Framework: React 19 with TypeScript
- Build Tool: Vite (Rolldown)
- Database: DexieJS (IndexedDB wrapper)
- UI Components: Radix UI + shadcn/ui
- Styling: Tailwind CSS
- EPUB Parsing: fflate (unzip) + native DOM parser
- Icons: Lucide React
- Notifications: Sonner
src/
├── components/
│ ├── ui/ # Reusable UI components (shadcn/ui)
│ ├── Library.tsx # Main library page component
│ └── BookCard.tsx # Individual book card component
├── hooks/
│ └── use-toast.ts # Toast notification hook
├── lib/
│ ├── db.ts # DexieDB database schema and operations
│ ├── epub-parser.ts # EPUB file parsing logic
│ ├── book-service.ts # Book management service layer
│ └── utils.ts # Utility functions
├── App.tsx # Main app component
└── main.tsx # App entry point
The application uses IndexedDB with the following stores:
- books: Book metadata (title, author, cover, manifest, spine, TOC)
- bookFiles: Raw EPUB file contents (by path)
- readingProgress: User's reading position for each book
- readingSettings: Global reading preferences
- ✅ EPUB 3.x (primary support)
- ✅ EPUB 2.x (fallback support)
- ✅ Cover image extraction (multiple methods)
- ✅ Table of contents (NAV and NCX formats)
- ✅ Metadata extraction (Dublin Core)
This application requires a modern browser with support for:
- ES2022
- IndexedDB
- File API
- Blob URLs
Tested on:
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
This is a demo project following the specifications in SPEC.md. Contributions are welcome!
MIT