$ show WhiteMinds/LiveAutoRecord
LiveAutoRecord is a multi-platform live stream recording application built on a TypeScript monorepo architecture. It supports three distinct deployment modes: a desktop client (Electron), a headless HTTP server (Express), and a CLI tool. The core functionality revolves around automatically detecting live streams from platforms like Bilibili, Douyu, Huya, and Douyin, resolving stream URLs, and capturing video via FFmpeg while simultaneously collecting metadata such as danmu and gift messages. The system uses a provider pattern to allow extensibility for new platforms. The architecture relies heavily on Node.js 22+ and Electron 40, indicating a commitment to bleeding-edge runtime versions. Data persistence is handled via LowDB with JSON file adapters, which serves the application's needs but introduces scalability limitations for large datasets. The codebase demonstrates solid engineering practices in its separation of concerns, with distinct packages for core logic, platform-specific adapters, and shared utilities. However, the reliance on platform-specific anti-crawl logic (e.g., VM execution for Huya, signature generation for Douyu) creates inherent fragility. A critical technical debt issue is the use of the `vm2` library in the Douyu recorder, which carries known critical security vulnerabilities (CVE-2023-37466). While a replacement plan exists in the documentation, the current state poses a significant security risk. Additionally, the high number of open issues (89) relative to the star count suggests accumulating technical debt and feature requests that may impact long-term stability.
The LLM identified 3 files worth highlighting for reuse:
Implements the core `RecorderManager` logic that orchestrates recording tasks. It manages the lifecycle of recorders, handles scheduling, and coordinates with provider adapters. This component is reusable as a generic task scheduler for any event-driven recording system, demonstrating a clean separation of business logic from platform-specific implementation.
Provides a custom file writing utility that ensures atomic JSON file writes to prevent corruption. This pattern is highly reusable for any application requiring safe persistence of configuration or state data. It demonstrates non-obvious skill in handling file system race conditions and data integrity.
Defines the central `DatabaseSchema` and shared types used across the monorepo. This acts as the single source of truth for data structures, ensuring type safety between the CLI, server, and desktop clients. It is a reusable contract that could be extracted for any application requiring a consistent data model.