$ show ollm/OpenComic
OpenComic is a cross-platform desktop comic, manga, and ebook reader built with Electron. It provides a full-featured library management system, supporting browsing of local folders, remote servers (SMB, FTP, SFTP, S3, WebDAV), and OPDS catalogs. The reading engine offers multiple layouts (single/double page, scroll, webtoon, manga direction, panel-guided view), image filters, AI-powered upscaling/descreening/artifact removal, and page transition animations. It integrates with external tracking services (AniList, MyAnimeList, Bangumi, MangaBaka) and includes a macro system for customizable shortcuts and gamepad support. The application is packaged for Windows, macOS, and Linux (via AppImage, Flatpak, Snap, and various store formats).
The LLM identified 5 files worth highlighting for reuse:
A promise-based mutex that prevents concurrent execution of critical sections identified by a string key. Supports timeouts and queuing. Pure utility with no internal dependencies, directly reusable in any JavaScript project needing simple mutual exclusion.
A lightweight class for handling pointer events (mouse, touch) with support for drag/swipe detection, speed calculation, and event lifecycle callbacks (onDown, onMove, onUp). No external dependencies beyond basic DOM. Usable in any web project requiring gesture recognition.
Implements marquee selection (click-and-drag to select multiple items) and keyboard multi-select (Shift/Ctrl+click) for a grid or list of items. Uses a lightweight DOM query wrapper but could be adapted to any UI project needing multi-select interactions.
A storage driver providing atomic JSON file writes (via the 'atomically' library) and optional encryption using Electron's safeStorage. Offers a consistent get/set/delete interface with throttled writes and cross-window synchronization. The pattern of configurable driver backing with fallback logic is reusable for apps needing persistent state.
A versioned data migration system that runs a sequence of pure transformation functions in order, each keyed by a version number. Supports adding new migrations without modifying existing ones. The pattern of versioning stored data and applying incremental transformations is highly reusable for any application with evolving local data schemas.