Coin Planet is a Web, mobile, backend, and smart-contract project for a managed mining and reward workflow.
The current implementation has moved away from a dedicated on-chain exchange contract. Mining and reward claims remain on-chain through MiningPool; SUPER-to-USDT exchange is handled as a backend operations workflow with recorded orders, approvals, payout batches, and audit logs.
- Web app: Vite + React + RainbowKit/Wagmi for the public site and admin console.
- Mobile app: Expo + React Native in
app-client/. - Backend API: Cloudflare Workers + D1 in
backend/. - Contracts: Hardhat project in
contracts/. - Chain: BSC by default.
- Wallet users register mining devices and claim rewards through
MiningPool. - The app can submit reward withdrawal and exchange requests to the backend.
- Exchange requests are stored in
exchange_orders. - Operators approve, complete, and batch USDT payouts through the operations/owner APIs.
- Admins manage system settings, exchange price, maintenance mode, customers, devices, rewards, agreements, and audit records.
Install dependencies:
npm install
npm --prefix backend install
npm --prefix contracts install
npm --prefix app-client installCopy and configure environment variables:
cp .env.example .env.localImportant Web/backend variables:
VITE_CHAIN_IDVITE_RPC_URLVITE_MINING_POOL_ADDRESSVITE_SUPER_ADDRESSVITE_USDT_ADDRESSVITE_API_BASE_URLVITE_ANDROID_DOWNLOAD_URLVITE_IOS_DOWNLOAD_URLRPC_URLDEPLOYER_PRIVATE_KEY
Important mobile variables:
EXPO_PUBLIC_API_BASE_URLEXPO_PUBLIC_CHAIN_IDEXPO_PUBLIC_RPC_URLEXPO_PUBLIC_MINING_POOL_ADDRESSEXPO_PUBLIC_SUPER_ADDRESSEXPO_PUBLIC_USDT_ADDRESSEXPO_PUBLIC_WALLET_PRIVATE_KEY
Web:
npm run devBackend:
npm run dev:apiMobile:
npm --prefix app-client run startContracts:
npm --prefix contracts run compile
npm --prefix contracts testUseful checks before shipping:
npm run lint
npm run build
npm run test:deprecated-swaprouter
npm --prefix backend run typecheck
npm --prefix backend test -- --run
npm --prefix contracts testnpm run build runs scripts/pre-build.mjs, which may sync app download metadata and upload the Android APK when the required deploy environment is present.
minerhub/
app-client/ Expo mobile app
backend/ Cloudflare Worker API and D1 schema
contracts/ Hardhat contracts, tests, deploy scripts
docs/ Product, integration, and operations docs
scripts/ Project automation scripts
src/ Web app
Cloudflare Pages:
npm run deploy:cfBackend Worker:
npm run deploy:apiContracts:
npm run deploy:contracts