$ show fancydirty/mediary-scout
Mediary Scout is a self-hosted media acquisition system that automates the discovery, transfer, and organization of media files from various cloud storage providers (such as 115, Quark, Tianyi, etc.) into the user's own storage. It features an agent-driven workflow powered by LLMs to decide acquisition steps, a web interface (Next.js) and desktop client (Electron) for management, and background workers for processing tasks. The system includes remote access via Cloudflare Tunnels (through the scout-connect service) with subscription management (Alipay payments), and supports both single-user and multi-user modes with a demo option for demonstration.
The LLM identified 4 files worth highlighting for reuse:
Defines a pluggable persistence interface for workflow data with implementations for PostgreSQL, SQLite, and in-memory. Allows swapping storage backends without changing business logic, demonstrating the repository pattern for data access abstraction.
A reusable HTTP client wrapper with timeout, retry, and error handling. Encapsulates common request logic for external API calls, reducing boilerplate and ensuring consistent error handling across integrations with cloud storage providers and other services.
A React hook for handling slug input with client-side validation, live preview, and optimization disabling. Encapsulates complex form state for slug-based routing, providing a reusable UI component for any application needing slug validation and suggestion.
A higher-order function that protects API routes by validating worker tokens and enforcing demo mode restrictions. Simple to drop into any route handler, providing a reusable pattern for securing internal APIs and managing feature flags.