$ show Penty-d/qq-farm-bot-ui
This repository is a QQ Farm automation bot that provides multi-account management and a web-based control panel. It automates farming tasks (planting, harvesting, watering, weeding, pest control), friend interactions (helping, stealing, hindering), daily rewards, task completion, and item management. The architecture consists of a Node.js backend (core) handling game automation via protocol buffers and WebAssembly encryption, and a Vue 3 frontend (web) for configuration and monitoring. Each account runs in an isolated worker process (or thread) to prevent cross-account interference, communicating with the backend via IPC for status and logs. The backend exposes REST APIs and Socket.IO for real-time updates to the frontend, which displays dashboards, logs, and controls. Data persistence is via JSON files in a mounted data directory, with game-specific configurations stored as JSON. Key technologies include Express, Socket.IO, protobuf.js, Vue 3, Pinia, UnoCSS, and Vite. The system is actively maintained with modern dependencies and demonstrates strong engineering practices in worker isolation, protocol handling, and task scheduling.
The LLM identified 3 files worth highlighting for reuse:
Manages the lifecycle of isolated worker processes (or threads) for each game account, handling start/stop/restart and IPC for status/logs. This pattern ensures fault isolation and could be reused in any multi-tenant automation system requiring process-level separation.
Dynamically loads protobuf message types from .proto files and provides encode/decode functions. This abstracts protobuf usage and allows flexible message handling without compile-time dependencies, making it reusable in any project using protobufs.
Provides robust timed task execution with overlap prevention (ensuring a task doesn't run if the previous invocation is still active). This utility solves a common automation need and can be extracted for use in any scheduling scenario requiring reliable interval management.