Short Video Content Distribution Platform Build Log: Recommendation Algorithm, Multilingual Frontend, and On-Chain Demo
Short Video Content Distribution Platform Build Log: Recommendation Algorithm and Multilingual Frontend
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.
Recently, I helped a client deploy a short video content distribution platform. The requirements were: a home feed for scrolling videos, an admin backend for managing content, multi-language switching, plus an on-chain demo module for creator address registration. After getting the source code, I started by looking at the routes and found it mainly does three things: record creator addresses, record first-level referral relationships, and provide a data dashboard for the backend. The on-chain module is purely a demo — no real assets are distributed, and it does not participate in actual transfers. Below are the deployment pitfalls I ran into and the tunable parameters worth noting.
Feature Testing: Frontend, Backend, and Dashboard
Video Feed and Recommendation Algorithm
The frontend uses an infinite-scroll video feed. Uploads support MP4 and MOV, and the backend transcodes them into multiple bitrates. For the recommendation algorithm, I wrote a simple weighted scoring formula: 0.4 for play count, 0.3 for completion rate, 0.2 for engagement rate, and 0.1 for publish-time decay. On the first deployment, I set the Redis cache TTL to five minutes. Once the video library grew, Redis got hammered. I switched to tag-bucketed caching with LRU, and CPU usage finally dropped.

Multilingual Frontend
The frontend is built on Vue 3. Language packs live in public/locales and support Chinese, English, Japanese, Korean, Thai, and Vietnamese. Switching is handled by vue-i18n, and for SEO we use hreflang tags to distinguish paths. Arabic and Hebrew would need RTL, but the client only needed East Asian and Southeast Asian languages, so we skipped it. Images and copy must use language keys; never hard-code text into templates.
Creator Address Registration and Referral Data
This system includes a “digital asset demo” module. Users fill in a blockchain address for creator revenue registration, and the backend only stores the address string and the referrer ID. Referrals are limited to one level; there is no multi-level rebate. I confirmed: there is no real asset distribution, no on-chain transfer — just a frontend demo and address record. The database only has two tables: address_book and referral_log, with clean, minimal fields.

Before deployment, make sure the client confirms in writing: the on-chain module is only a demo, and address plus referral data are for record-keeping only, not real asset flow. Putting this in the contract saves a lot of arguments later.
Deployment Notes: From Environment to APIs
Environment Setup
My stack was Nginx 1.24, PHP 8.1, MySQL 5.7, and Redis 7. PHP needs the fileinfo, openssl, redis, and gd extensions. For large video uploads, post_max_size and upload_max_filesize in php.ini must be raised to 512M, and Nginx’s client_max_body_size must match. At first I forgot to change Nginx, and a 70MB upload returned a 413 error.

Database and APIs
Core database tables: users, videos, tags, video_likes, address_book, referral_log, and admin. The recommendation endpoint uses aggregated queries plus caching; hot tags have their own tag_hot table. API responses follow a uniform JSON format. Tokens use JWT with a two-hour expiry. Backend CRUD is RESTful, and roles are split into super admin, reviewer, and operator.
Backend Controls and Payment/Withdrawal Interfaces
The backend can toggle registration, uploads, comments, and the recommendation algorithm. Payment and withdrawal interfaces are reserved, but the client is only running internal virtual points for now and has not connected real channels. I split payment gateway configuration into config/payment.php, so future integrations with Alipay, Stripe, or a digital asset demo channel only require editing that config file without touching business logic. The withdrawal review flow table is already prepared, using a state machine of pending, approved, rejected, and returned.

Customization and Who It Fits
This system fits teams that want a short video or content distribution product with a multilingual frontend. I recommend three customization directions: swap the recommendation algorithm for collaborative filtering or tag embedding vectors; expand the creator address registration into a complete on-chain demo data dashboard; and replace virtual points with a real creator payout settlement module.
I do not recommend deploying it as a production-grade video platform out of the box. VOD CDN, content moderation, and copyright detection are not built in and must be added separately. For SEO, I added a sitemap and structured data, marking video detail pages with JSON-LD.
FAQ
Q: Can this system do live streaming?
A: No. The source code only supports short video on-demand and recommendation feeds. Live streaming would require separate RTMP ingest and playback SDKs.
Q: Does the on-chain demo module actually transfer or distribute assets?
A: No. The system only records addresses and referral relationships. There is no on-chain transfer and no real asset distribution; it is for technical demonstration only.
Q: After switching languages, will video titles and content be translated automatically?
A: No automatic translation. The interface language changes, but video titles and descriptions must be entered manually in the backend for each language version. You can later connect a translation API for batch pre-filling.
Q: Can the recommendation algorithm be changed to interest-based recommendations?
A: Yes. The current version uses global popularity weighting. For a second-phase build, add interest tags to the user table and replace the current ranking with collaborative filtering or embedding vectors.
Q: What if the backend returns 404 after deployment?
A: It is most likely that URL rewriting is not configured. Nginx should route non-file requests to index.php; Apache can use the provided .htaccess. PHP 8.2 may throw some deprecation warnings, so PHP 8.1 is recommended.
Disclaimer: This article is for technical education only. Using the relevant source code must comply with applicable laws and regulations. The on-chain demo module is for technical demonstration only and should not be used for real asset transfers or unauthorized data collection.
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 #recommendation algorithm #multilingual #content distribution #blockchain demo