Short Video Content Distribution System Build Log: Recommendation Feed Deployment and Multilingual Frontend Pitfalls
Short Video Content Distribution System Build Log: Recommendation Feed Deployment and Multilingual Frontend Pitfalls
Disclaimer: This article is for technical education and demonstration only. It is not professional or financial advice. Any real-world deployment must comply with applicable laws and regulations.
I recently helped a client who runs content operations deploy a short video content distribution system, covering content analysis modules for Douyin, Kuaishou, and Xiaohongshu, plus a Baidu Maps merchant info collection feature. The client wanted multi-tier referral promotion and a partner onboarding backend — basically a multi-tenant operations hub. It took two and a half days of fiddling, so I’m writing down the process to avoid stepping on the same rake next time.

How the Environment Was Actually Set Up
The source code is written in PHP with the ThinkPHP framework, and the frontend is Vue. I went straight to the BaoTa panel, with the following stack:
Specific Configuration
PHP 7.4 (don’t use 8.0 — there’s a regex in the framework using a deprecated modifier that causes a blank screen), MySQL 5.7, Nginx 1.22, and Redis 6.2 for queues. Use ThinkPHP rewrite rules for the pseudo-static config. The default backend entry is /admin.php — the first thing to do after installation is rename the entry file, or scanners will hammer it with brute-force attempts all day.
Installation flow: import the database → update connection info in .env → set runtime and public/uploads to 777 → bind the official account/mini-program appid. The whole thing took about 40 minutes; the biggest time sink was the collection module’s dependencies. It uses a third-party HTTP client, and composer install couldn’t pull from the domestic mirror — I switched to the Aliyun mirror to get it through.
Running the Collection and Recommendation Analysis Modules
The core features are three blocks: Douyin smart analysis, Kuaishou smart analysis, and Xiaohongshu smart analysis. Essentially they’re all content data scraping plus keyword aggregation, helping operators see what competitor accounts are posting and which content gets good engagement. The Baidu Maps merchant acquisition part is just POI retrieval — pulling merchant lists by city and category.

The Queue Is the Lifeline
All collection tasks go through the Redis queue, with supervisor running queue:work as a daemon. I didn’t configure supervisor at first, so the queue stopped the moment my SSH session dropped, and the client thought the system was broken. In the config file I set max_trades to 3 and retry_after to 90 seconds, and capped the scraping rate at 30 requests per minute — you must control this, otherwise the target platform will ban your IP outright.
Another detail: when collection results are written to the database there’s a deduplication step based on a content hash field. I added a composite index on that table (platform_id + hash), otherwise after two days the table hits a million rows and queries become painfully slow.
Customizing the Referral and Partner Onboarding Backend
The multi-tier referral structure is three levels, bound via a pid field in the user table, with settlement handled through manual review in the backend. The partner onboarding module is just a landing page + form + automatic customer service assignment — the logic isn’t complicated, but there are quite a few templates, so editing them means checking them one by one.

Multilingual Frontend
The Vue frontend build supports both Chinese and English, with language packs in the /lang directory in JSON format. The client wanted Japanese added, so I copied en.json to ja.json and registered the language entry in the config. Note that VUE_APP_I18N_LOCALE must be updated in sync when building, otherwise the switch button shows up but the text doesn’t change — that pitfall took me nearly an hour to track down.
Highlight: the collection scheduling and referral settlement in this system are fully decoupled. When customizing, you only need to touch the business layer — the core scheduling code stays untouched, which makes upgrades painless.

FAQ
Q: The backend login keeps saying the captcha is wrong?
A: Nine times out of ten, the server time differs from Beijing time by more than 2 minutes — the captcha check includes a timestamp. Sync with ntpdate and it’s fixed.
Q: Collection tasks stay pending after submission?
A: Check whether Redis is running and whether QUEUE_CONNECTION in .env is set to redis. Also, I’d recommend at least 2 workers in supervisor — a single process easily gets blocked by slow tasks.
Q: Does it support secondary development? Where do I make changes?
A: Business logic is concentrated in the app/api and app/admin modules, and templates are under src/views in the Vue frontend. I’d suggest getting it running locally first before going to production, and back up the database before changing any code.
Q: Can data be exported?
A: The backend has built-in CSV export. For anything over 50,000 rows, export in batches — exporting everything at once easily exceeds the memory limit. I bumped PHP memory_limit to 512M.
Overall, this system has a clean architecture and medium deployment difficulty. Most of the work is in tuning the collection frequency and adapting the multilingual frontend. Once it runs stably, scheduled tasks execute automatically every day, and humans only need to review the reports. One final reminder: comply with all applicable laws and regulations when deploying and using this system; collected data may only be used for lawful content operations analysis.
Disclaimer: This article is for technical education and demonstration only. It is not professional or financial advice. Any real-world deployment must comply with applicable laws and regulations.
#Short Video System #Deployment Log #Content Distribution #Multilingual Frontend #Source Code Setup
-
Alipay QR Code Scan
-
WeChat Scan Pay