$ show sub-store-org/Sub-Store
Sub-Store is a Node.js backend service for managing and converting proxy configurations across multiple platforms (QX, Loon, Surge, Stash, Shadowrocket, etc.). It provides RESTful APIs for subscription management, collection grouping, artifact processing, file handling, settings, logging, token-based sharing, and synchronization with remote storage (e.g., GitHub Gist). The system features a modular architecture with a central `$` object for shared state (caching, logging, HTTP client, environment), a proxy processing pipeline (parse → preprocess → process operators → produce), and platform-specific producers/parsers. Key capabilities include format conversion between proxy schemes (URI, Clash, Surge, Loon, QX, sing-box), rule-based traffic filtering, scriptable configuration manipulation, age-encrypted secure sharing, and automated cron jobs for tasks like artifact sync and MMDB updates. The codebase demonstrates strong engineering practices through separation of concerns, extensive test coverage (Mocha/Chai), and reusable utility patterns. Notable components include age encryption for secure data sharing, configurable caching layers with TTL and auto-cleanup, request concurrency control for external API limits, and a migration system for schema evolution. However, the reliance on `eval` for environment variable handling and dynamic imports introduces runtime fragility, and the extensive platform-specific logic (numerous producers/parsers) increases maintenance complexity. Despite these challenges, the project is actively maintained with recent commits and shows commitment to quality via structured error handling, validation patterns, and dependency management via pnpm.
The LLM identified 2 files worth highlighting for reuse:
Implements age encryption (using Web Crypto API) for secure sharing of tokens and backups. Self-contained module with clear separation of concerns, demonstrating non-obvious skill in cryptographic operations and armor format handling. Easily extractable for projects requiring age-based encryption or secure data exchange.
Provides reusable concurrent request limiting with adjustable pool size and priority queuing. Isolated dependency (only requires timers/logging), making it easily adaptable to other projects for rate-limit avoidance. Shows thoughtful design in handling promise resolution/rejection and error propagation under concurrency constraints.