A lightweight, self-hosted EPUB reader with integrated AI analysis capabilities.
- 📚 Clean Layout - Three-column design (TOC, Content, AI Panel)
- 📖 Sticky Navigation - Top navigation bar stays visible while scrolling
- ⌨️ Keyboard Shortcuts - Arrow keys for prev/next chapter, ESC to close panels
- 🔗 Internal Links - Footnotes and author comments open in modal popups
- 🎯 Clickable Covers - Click book covers to start reading instantly
- 🤖 AI Analysis - Right-click on text for fact-checking or discussion (DeepSeek)
- � *Personal Comments - Add your own notes without AI (no API cost)
- 💾 Manual Save - Choose what to save to avoid clutter
- ✨ Color-Coded Highlights - Yellow (fact check), Blue (discussion), Green (comments)
- 🏷️ Smart Tooltips - Hover over highlights to see type
- 🗑️ Edit & Delete - Manage all your highlights and comments
- 🎨 Markdown Support - AI responses render with proper formatting
- 📝 Highlights View - See all your notes and analyses for each book
- 📤 Export to Markdown - Export highlights with AI context warnings
- 🌐 Web Upload - Upload EPUB files via click or drag & drop
- 🖼️ Cover Images - Automatic cover extraction and display
- 🔍 Search - Find books by title or author
- 🗂️ Organized Storage - All books in
books/directory, data in SQLite
Edit .env file:
OPENAI_API_KEY=your_deepseek_key
OPENAI_BASE_URL=https://api.deepseek.com
OPENAI_MODEL=deepseek-chatGet your key from: https://platform.deepseek.com/api_keys
Option A: Upload via Web Interface (Recommended)
- Start server:
uv run server.py - Open http://127.0.0.1:8123
- Click the "+" card OR drag & drop EPUB file
- Wait for automatic processing
Option B: Command Line
uv run reader3.py your_book.epubuv run server.py- Open http://127.0.0.1:8123
- Select a book
- Right-click on text → Choose analysis type
- Review AI response in side panel
- Save if important
- Highlights appear on next visit!
- Select text → Right-click → Choose:
- 📋 Fact Check - Verify facts and get context
- 💡 Discussion - Deep analysis and insights
- 💬 Add Comment - Your personal notes (no AI)
- View response in right panel
- Click "Save" for important insights
- Yellow - Fact checks
- Blue - Discussions
- Green - Your comments
- Hover to see type, click to view/edit
- All highlights are editable and deletable
- Click ⋮ menu on any book → "View Highlights"
- See all your notes and analyses in one page
- Filter by type (Fact Check, Discussion, Comment)
- Export to markdown for AI processing
- Context length warnings for large exports
- Jump directly to any chapter
- ← → - Navigate between chapters
- ESC - Close panels and modals
- Works anywhere except when typing in text fields
reader3/
├── reader3.py # EPUB processor
├── server.py # Web server
├── database.py # SQLite operations
├── ai_service.py # AI integration
├── books/ # All book data here
│ └── book_name_data/
│ ├── book.pkl
│ └── images/
├── templates/ # HTML templates
├── reader_data.db # SQLite database
└── .env # API configuration
- Click ⋮ menu on any book → "View Highlights"
- See all notes, comments, and analyses in one page
- Filter by type and jump to chapters
uv run check_database.py# Double-click: backup.bat
# Or manually:
copy reader_data.db backups\reader_data_backup.dbcheck_database.py- View raw database contents (advanced)backup.bat- Quick database backup
- ✅ Cost-effective (¥1/M tokens input, ¥2/M output)
- ✅ Excellent Chinese language support
- ✅ Fast response in China
- ✅ OpenAI-compatible API
- Check
.envfile exists and has correct key - Restart server
- Check browser console (F12) for errors
- Verify data exists:
uv run check_database.py - Hard refresh (Ctrl+Shift+R)
- Check if port 8123 is available
- Verify
.envconfiguration
MIT
Note: This project is designed to be simple and hackable. Ask your LLM to modify it however you like!