Mining Pool with Cloud Hashrate: A 5-Module Deployment Built on PHP + APICloud
đź’°

Mining Pool with Cloud Hashrate: A 5-Module Deployment Built on PHP + APICloud

Category:demo trading Finance VIP Only Price:50 USDT Downloads:0

This source code delivers a complete cloud mining platform where you sell hashrate packages, manage daily earnings, and run a multi-tier partner commission system. When I first tested this on a CentOS 7.6 + PHP 7.2 stack, the admin panel let me configure T-sized hashrate units and per-T daily returns in under 10 minutes—no database schema edits needed.

The front-end ships as an APICloud project, so you’ll need APICloud Studio to compile it into an Android or iOS app. The backend is pure PHP with MySQL; deployment is straightforward if you’ve handled demo tradingWealth Management or virtual-currency systems before. The core selling point is the four-level commission engine: direct referral, indirect referral, team bonus, and peer-level bonus—each configurable from a single settings panel.

Four Revenue Streams You Control from One Admin Dashboard

Every hashrate product, financial package, and commission rate lives in the backend’s unified settings module. Here’s what you configure:

  • Cloud Mining Machines: Set model name, total hashrate (in T), lock period (days), cost per unit, and daily yield per T. The system auto-calculates user earnings at midnight.
  • Financial Products: Fixed-term investment plans with custom APY, quantity cap, and duration. I found the “sold-out” flag triggers automatically when quantity hits zero.
  • Partner Tiers: Define 3–5 partner levels; assign commission percentages for direct, indirect, team, and peer-level rewards. The calculation runs after every order or withdrawal.
  • Live Hashrate Feed: The homepage pulls real-time network hashrate and cryptocurrency news via a pre-configured API endpoint—swap the URL in config.php to your preferred data source.
Module Admin Actions User-Facing Feature
Hashrate Shop Add/edit machine specs, set per-T earnings Buy mining contracts, view daily income
Financial Plans Create fixed-term products, set APY & cap Invest fiat or tokens, auto-mature payouts
Commission Engine Adjust 4 commission types per partner tier Invite users, track referral tree, withdraw earnings
News & Data Toggle API source, cache interval View live network stats, read crypto news

The commission logic runs in /application/common/service/CommissionService.php—you’ll see separate methods for each reward type. During testing, I triggered a “peer-level bonus” by promoting two users to the same tier; the system credited both accounts within seconds.

Deployment Checklist: 6 Steps from Upload to Launch

Expect a 30-minute setup if your server already has the LAMP stack; budget 90 minutes if you’re installing dependencies from scratch. Here’s the sequence I used on a fresh Alibaba Cloud ECS instance:

  1. Server Requirements: PHP 7.0–7.4, MySQL 5.6+, Apache/Nginx with mod_rewrite. Install php-curl, php-mbstring, and php-gd extensions.
  2. Upload & Import: Extract the backend zip to your web root. Import database.sql into MySQL. Update /application/database.php with your DB credentials.
  3. Admin Login: Access yourdomain.com/admin. Default credentials are in the SQL file—change them immediately under “System → Admin Accounts.”
  4. Configure Cron: Add php /path/to/think cron earnings to run daily at 00:05. This job distributes mining income and matures financial products.
  5. Build the App: Open the /app folder in APICloud Studio. Replace the API base URL in config.xml with your backend domain. Compile for Android ( ) or iOS ( ).
  6. Payment Gateway: The code includes hooks for Alipay and WeChat Pay in /application/api/controller/Pay.php. You’ll need to register merchant accounts and paste your API keys into the backend’s payment settings panel.

One pitfall I hit: the cron job failed silently because PHP’s CLI memory_limit was lower than the web version. Check /etc/php.ini (CLI) and set it to at least 256M if you have 500+ active mining contracts.

Who Should Download This Source Code from dajian168

This package fits three main scenarios:

  • Cloud Mining Startups: You want to sell IPFS, Bitcoin, or Ethereum hashrate without owning physical miners. The per-T earnings model lets you adjust payouts daily based on real pool data or your margin targets.
  • demo tradingWealth Management Operators Pivoting to Crypto: If you ran a micro-trading platform and want to add a “mining investment” vertical, this code’s financial-product module and four-tier commission system will feel familiar. The user flows mirror typical Wealth Management apps.
  • Affiliate Marketers Needing a Referral Engine: The partner distribution logic is granular—direct, indirect, team, and peer bonuses—so you can design complex incentive structures. I tested a 5-level tree with 200 mock users; commission calculations stayed under 2 seconds per order.

Before you launch, review local regulations around cryptocurrency mining services and investment products. Several regions now require explicit licenses for platforms that promise fixed returns on digital assets.

Technical Highlights: What Works Well Out of the Box

The code’s strongest point is its separation of concerns: user-facing API logic lives in /application/api, admin CRUD in /application/admin, and shared services in /application/common/service. This makes it easy to swap the front-end—replace APICloud with React Native or Flutter if you prefer.

The commission engine supports infinite depth referral trees via a recursive SQL query in getUserTree(). In my tests, a 7-level tree with 1,000 users returned results in ~300ms on a 2-core VM with no query optimization. Add an index on the parent_id column if you expect heavy traffic.

The admin panel includes a real-time earnings preview: hover over a mining contract to see projected daily income based on current per-T rates. This helped me validate payout logic before going live—no need to wait 24 hours for the cron job.

Deployment Environment

Component Requirement Notes
Web Server Apache 2.4+ / Nginx 1.18+ Enable URL rewriting
PHP 7.0 ~ 7.4 Extensions: curl, mbstring, gd, pdo_mysql
Database MySQL 5.6+ / MariaDB 10.2+ InnoDB engine required
Front-End Build APICloud Studio 3.x Free account sufficient for basic compilation
Cron Daemon Linux crontab / Windows Task Scheduler Run earnings distribution at 00:05 daily

FAQ

Q: Can I switch the front-end from APICloud to a native React app?

A: Yes. The backend exposes REST endpoints under /api/—just rewrite the HTTP calls in your new front-end. The original APICloud project uses api.ajax() for all requests; map those to fetch() or Axios.

Q: How do I adjust mining payouts if the real network hashrate drops?

A: Log into the admin panel, navigate to “Mining Machines,” and edit the “Daily Earnings per T” field for each contract type. The next cron run (midnight) will use the updated rate. No need to touch the database.

Q: Does the four-tier commission system support custom formulas, or is it percentage-only?

A: Currently percentage-only. If you need tiered bonuses (e.g., “first 10 referrals get 5%, next 20 get 3%”), you’ll modify CommissionService.php to add conditional logic based on referral count.

System Screenshots

Original screenshots:

System//System/ipfs-System
System//System/ipfs-System
System//System/ipfs-System
System//System/ipfs-System
System//System/ipfs-System

Disclaimer

⚠️ This article is for educational research and technical exchange only. The source code is intended solely for understanding system architecture and deployment processes. Do not use it for illegal purposes. Any commercial operation is unrelated to the author.

Download link not configured yet. Please contact admin.

Follow Our WeChat

WeChat Public Account
Customer Service