Task Distribution System Source Code Deployment Guide: Three-Tier Referral, Points Mall & Payment Integration

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 combined task distribution + points mall platform built from source code. It took over three days of fiddling, and I stepped into plenty of pitfalls. While my memory is still fresh, I’m writing down the selection process and deployment details as a reference for anyone else torn between buying source code and building from scratch.

Why source code instead of custom development? The cost comparison speaks for itself

The client initially wanted to hire an outsourcing team for custom development. I ran the numbers for him right away:

  • Custom development: 2 backend devs + 1 frontend dev + 1 UI designer, at least 3 months of work, labor costs starting at 150,000 RMB — and that’s before ongoing maintenance and feature updates.
  • Mature source code: one-time purchase, 2-3 days for deployment and debugging, total cost under one-tenth of custom development, with the referral logic and task review workflow already built in.
  • SaaS hosting: monthly fees, data not in your own hands, almost no room for secondary development — more expensive in the long run.

The client went with the source code route. The core of this system is task distribution plus a three-tier referral commission structure: users complete tasks to earn points and commissions, and recruiting new users earns referral commissions at different rates by tier, while the platform takes a cut from task matching. Technically it’s written in ThinkPHP, running on PHP 7.4 + MySQL 5.7, with uni-app on the frontend producing Android and iOS builds from a single codebase.

How to actually set up the environment

Server configuration

During testing I used a 2-core 4GB lightweight server and it ran fine. For production I’d recommend starting at 4-core 8GB, because task reviews and affiliate API callbacks are concurrent, and bandwidth peaks get hit easily. System requirements:

  • PHP 7.4 (8.0 throws compatibility errors — don’t force it)
  • MySQL 5.7 — note that you need to remove ONLY_FULL_GROUP_BY from sql_mode, or the admin statistics reports will just show a blank page
  • Nginx 1.20, with ThinkPHP rewrite rules
  • The fileinfo and redis extensions are mandatory — the task queue runs on redis

Installation process

After unpacking the source package, import the database and update the connection details in .env. The default admin path is /admin. The installation itself takes half an hour; the real time goes into configuration:

  • Payment APIs: connect WeChat and Alipay merchant accounts, write the callback URLs into the config, and remember to run through the sandbox in the test environment
  • Affiliate task APIs: the system reserves a standard API integration reel simulation — after applying for an affiliate account, just fill in the key and secret to pull task data; the revenue split is configurable in the admin panel (default 8/2)
  • Three-tier referral levels: each tier’s commission rate is configurable in the admin panel, e.g. 8% for tier one, 3% for tier two, 1% for tier three, with differentiated settings by membership level

Two errors I hit twice each

Pitfall one: the withdrawal feature kept showing a “parameter error.” After digging through logs forever, I found the admin panel had no minimum withdrawal amount or daily withdrawal limit configured — both fields default to empty, and the empty values passed to the API trigger the error. My advice: the first thing you do after deployment is fill in every withdrawal-related parameter.

Pitfall two: after placing a redemption order in the points mall, the order status got stuck at “pending.” The cause was the scheduled task not running — you need to add a queue command to crontab that executes every minute, and the official docs mention it in one tiny line that I missed. Once added, the order status flow worked normally.

Deployment tip: before going live, go through the task review time, credit score deduction rules, and minimum commission for publishing tasks one by one. These three parameters directly determine the platform’s operational rhythm, and changing them later affects everything.

Secondary development potential and operational highlights

The secondary development friendliness of this source code is decent. The code has comments, controllers and methods are named consistently, and I added a multilingual package (Chinese-English switching) for the client in about two days. The points mall is a nice retention design — users earn points from tasks and redeem them for gifts in the mall, closing the loop. The admin statistics module covers affiliate finances, task feedback, and user finances, which is enough for daily operations.

The membership system is also worth mentioning: different membership levels get different task commission rates, withdrawal fees, and free featured-listing counts, which gives users a reason to level up. All the tier logic is configurable in the admin panel — no code changes needed.

FAQ

Q: What qualifications are needed to run payments?
A: You need a proper business license and WeChat/Alipay merchant accounts. Individual entities can’t accept payments, so prepare this in advance — otherwise getting stuck at the payment stage for a week or two is common.

Q: Will it lag when task volume grows?
A: For task list queries, I recommend adding a composite index on user_id and status. In my load testing, response stayed under 200ms at around 5,000 daily active users; beyond that, use redis to cache hot data.

Q: Any chance of getting on the iOS App Store?
A: Pure task apps face stricter review. I’d suggest emphasizing the points mall and utility features, avoiding any promotional-sounding wording in the description. The client’s version passed review in two weeks.

Q: Can it connect to multiple task affiliate networks?
A: Yes. The system is API-driven — just apply for a separate account for each network and fill in the config. No shortage of task sources.

All in all, this source code can go live in three days and be polished to an operable state within a week. The value for money is clear — provided you’re willing to hit the pitfalls yourself, because the documentation won’t tell you everything.

Disclaimer: This article is for technical education only. Any use of the system must comply with applicable laws and regulations, and unlawful purposes are prohibited.

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.

#source code deployment #task distribution system #three-tier referral #points mall #deployment log