Calibre is a comprehensive e-book management application that functions as a library manager, format converter, metadata editor, device synchronization tool, and content server. The codebase is a large monolith written primarily in Python with C/C++ extensions for performance-critical operations (PDF rendering, character encoding detection, compression). It provides a full desktop GUI built on PyQt6, a CLI for headless operations (calibredb, ebook-convert), and an embedded HTTP/OPDS server for remote library access. The architecture follows a plugin pattern: format conversion (input/output plugins), device drivers (USBMS, MTP, dedicated reader drivers), store search plugins, metadata source plugins, and AI provider plugins (OpenAI, Anthropic, Ollama). The core database is SQLite with full-text search (FTS5). Extensively cross-platform (Windows, macOS, Linux) with platform-specific launcher code in C. While the codebase shows high craftsmanship in many areas (e.g., SQLite extensions, font parsing, AI abstraction), it also carries legacy components such as an old RTF parser, vendored libraries (tinycss, frozen), and some device drivers for obsolete readers. Overall, it is actively maintained with regular commits and responsive issue triage.
KOReader is a document viewer application primarily designed for e-ink readers, supporting a wide range of formats including PDF, EPUB, DjVu, CBZ, and more. It provides a full-featured reading experience with file management, annotation, dictionary lookup, OPDS catalog browsing, Calibre integration, cloud storage, and extensive customization through a plugin system. The architecture is a monolithic Lua application built on a custom widget toolkit with an event-driven UI manager, platform-specific device abstraction layers (Kindle, Kobo, PocketBook, reMarkable, Android, SDL), and a robust caching and rendering pipeline. Key entry points are `reader.lua` for the main application and `kodev` for development/testing. The codebase is large and mature, with a strong emphasis on performance and e-ink optimization, but shows some technical drift in the form of deprecated code paths, platform-specific hacks, and a fragmented keyboard layout system.