Building a Short-Video Distribution Platform with UniApp, Recommendation Algorithm, and IM Community

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 deploy a short-video content distribution platform. The frontend uses UniApp, the backend includes an admin dashboard, and the system supports multi-language switching, IM community, and a creator points system. The full source code can be compiled into H5 and mini-programs. I am writing down the deployment process, plus a few pitfalls that are easy to step into.

System Architecture and Feature Testing

This platform is positioned as a creator content community. Core modules include short-video feed recommendation, creator center, points mall, and IM chat community. The backend admin dashboard can control recommendation weights, review content, and configure points rules. The frontend UniApp outputs multiple platforms from one codebase, saving a lot of time compared with pure native secondary development.

Recommendation Algorithm and Video Feed

The video feed recommends based on user behavior: watch duration, likes, comments, and shares each carry different weights. The admin dashboard can adjust recommendation coefficients, and new content also gets a cold-start traffic pool. In testing, refresh response time stayed within 200ms, and paginated loading of 20 videos showed no obvious lag.

Multi-Language and Regional Adaptation

The system supports multi-language switching such as Chinese and English. Language packs are stored in frontend JSON files and can be modified directly from the backend. Pay attention to time zone and date format configuration; otherwise cross-border content recommendation can cause timeline confusion.

Deployment Points and Pitfall Notes

IM Community Interface Integration

The IM function is connected to a third-party instant messaging service, supporting one-on-one chat, group chat, red packets, and friend relationship chains. The signature generation step is the most error-prone, especially the concatenation order of AppKey and random number. I recommend running message send/receive in the test environment first, then switching to the production domain.

Electronic Signature and Creator Agreement

Before publishing content, creators must electronically sign to confirm the agreement. Here Canvas handwritten signature is used, generating a Base64 image stored in OSS. On different phone resolutions, signature strokes may deform, so DPR adaptation is needed; otherwise high-resolution devices will produce blurry signatures.

User Activity and Points System

Check-in, points exchange, and creator points rewards are key to retaining users. The backend can configure daily check-in points, points rewards corresponding to content views, and points mall products. I suggest making points distribution into an asynchronous queue to avoid database table locks during high concurrency.

Deployment Tip: Never hardcode keys for IM interfaces, OSS storage, and third-party push notifications in the code. Instead, use a backend configuration center; otherwise switching environments later will be very troublesome.

Target Audience and Secondary Development Suggestions

This system suits technical teams that want to quickly build short-video communities, content distribution platforms, or creator service communities. The UniApp source code is on the frontend, so the UI layer is relatively flexible to modify. If this is your first time implementing a recommendation algorithm, I suggest first getting the video feed sorted by time working, then gradually adding recommendation weights.

For secondary development, focus on two files: the recommendation algorithm configuration table and the IM message routing table. Multi-language files are centralized in the lang directory; when adding a new language, remember to update both the backend and frontend.

FAQ

Q: Is UniApp mandatory for the frontend? Can it be changed to pure H5?
A: The source code defaults to a UniApp project and can be compiled into H5. If you only need pure H5, you will need to replace some mini-program APIs, roughly 2-3 days of work.

Q: Can the recommendation algorithm be changed to manual editor recommendation?
A: Yes. The backend has content pinning and weight configuration. After turning off automatic recommendation, it becomes pure manual sorting, suitable for the early stage when content volume is small.

Q: Where is IM chat data stored?
A: Basic messages go through the third-party IM service, while friend relationships and chat record indexes are stored in the local database. If you need sensitive word filtering, add a layer of message callback verification on the backend.

Q: What server size is needed for deployment?
A: A test environment with 2 cores and 4GB RAM is sufficient. For production, I recommend starting with 4 cores and 8GB RAM. Video files should go through OSS or CDN, not be stored directly on the server hard drive.

Q: Does multi-language support RTL layouts like Arabic?
A: The current version uses JSON language packs, but RTL layout requires separate CSS changes, so I recommend handling it as a secondary development item.

Disclaimer

This article is for technical education only. Please comply with laws and regulations. The system is intended only for legitimate content distribution technology demonstrations; actual operation requires obtaining relevant qualifications.

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 platform #UniApp development #recommendation system #IM instant messaging #multi-language platform