Foyana
Operations Manual

Foyana Operations Manual.

Official product documentation and deployment guide for the Foyana automated crypto trading and copy trading PHP script (Laravel 13 & PHP 8.3+).

Version 1.0.0 100% Unencrypted Source Self-Hosted Multi-Chain
02

Server Requirements

Foyana is built on Laravel 13 and strictly requires PHP 8.3 or higher. All frontend CSS, JS, and font assets come 100% pre-compiled, so Node.js or NPM is not required on your server.

PHP Version
PHP >= 8.3 / 8.4
Web Server
Nginx / Apache / cPanel
Database
MySQL 8.0+ / MariaDB
Node / NPM
Not Required

All 16 Required PHP Extensions

Extension Technical Purpose
gmp Big number math for Secp256k1 EVM & Bitcoin elliptic curve arithmetic
sodium Ed25519 offline transaction signing for Solana
bcmath Arbitrary precision conversions for Wei, Sun, Satoshis, Lamports
curl HTTP JSON-RPC blockchain communication and price feeds
openssl AES-256-CBC database encryption for private keys
pdo / pdo_mysql Database connectivity and transaction handling
mbstring Multibyte UTF-8 string encoding and address hashing
gd QR code rendering and image manipulation for deposit addresses
fileinfo MIME type verification for KYC document uploads
dom / xml DOM parsing for DomPDF invoices & sitemaps
zip / json ZIP export/import and JSON payload serialization
ctype / tokenizer / pcre Standard Laravel 13 framework core components

Recommended php.ini Directives

memory_limit = 512M
max_execution_time = 300
max_input_time = 300
upload_max_filesize = 256M
post_max_size = 256M
date.timezone = UTC
Writable Directories (chmod -R 775 or 755):
storage/ bootstrap/cache/ public/uploads/
03

Installation via Web Installer

Foyana includes a standalone, browser-based GUI Web Installer that tests your server environment, connects your database, and sets up your super administrator account in under 2 minutes.

1
Upload & Extract Package Archive

Download and extract the Foyana software release archive (foyana-v*.zip). Inside, you will find the foyana/Files folder containing the core application, alongside the foyana/documentation directory.

2
Copy Files to Web Root (public_html)

Copy or move all files and folders located inside the foyana/Files directory directly into your domain's web root (e.g., public_html, www, or /var/www/foyana).

Important for cPanel / File Manager users: Before copying, make sure "Show Hidden Files (dotfiles)" is enabled in cPanel File Manager Settings. This ensures that critical hidden files such as .env and .htaccess are selected and copied.
3
Set Web Server Document Root

Ensure your web server properly directs web traffic to the public/ folder:

Apache / LiteSpeed / cPanel Server:

Already pre-configured! The root directory includes an optimized .htaccess file that automatically routes all incoming requests into the public/ directory and enforces HTTPS. No manual document root modification is needed.

Nginx Server:

For Nginx, you must ensure your server block configuration explicitly points the root directive to the public/ folder (e.g., root /var/www/foyana/public; or root /home/user/public_html/public;).

4
Launch Web Installer

Open your browser and navigate to: https://your-domain.com/install

5
Follow 8-Step Browser Wizard
Step 1: Terms & License Agreement
Step 2: PHP Version & Extensions Check
Step 3: Server Settings Validation
Step 4: Folder Write Permissions
Step 5: Required PHP Functions
Step 6: Product Key Activation
Step 7: Database Migration & Seeding
Step 8: Admin Super Account Setup
04

Cron Job Setup & Admin Monitoring UI

For trading bots, copy trading replication, and blockchain deposit sweepers to run automatically, set up a 1-minute cron job via curl, wget, or direct CLI crontab (php artisan foyana:scheduler-daemon).

Option A: Using cURL (Web Route)
* * * * * curl -s -o /dev/null https://your-domain.com/utils/cronjob
Option B: Using wget (Web Route)
* * * * * wget -q -O- https://your-domain.com/utils/cronjob >/dev/null 2>&1
Option C: Direct Artisan CLI (Server Crontab / VPS)
* * * * * cd /path/to/foyana && php artisan foyana:scheduler-daemon >/dev/null 2>&1
Admin Cron Monitoring Screen

Navigate to Admin → Settings → Cron Jobs (/admin/settings/cronjob). It displays real-time execution health, timestamps of the last run, and generates ready-to-copy curl commands for your domain.

Automated Services Coordinated by Daemon:
  • Crypto Deposit Monitor: Scans blockchains, verifies confirmations, credits user balances, and sweeps funds into master wallets.
  • Trading Bots Engine: Runs bot cycles, calculates daily returns, writes trade logs, and returns principal upon maturity.
  • Copy Trading Synchronizer: Mirrors master trader signals to all active followers in real time.
  • Expired Deposit Cleaner: Cancels expired unconfirmed deposit windows.
  • Background Task Queue: Processes email notifications and queued asynchronous system jobs.
05

Blockchain Master Wallets & Wallet Import

Foyana features a self-hosted multi-chain wallet engine that connects directly to blockchain RPC nodes with zero third-party payment gateway fees.

1. Unified EVM Master Wallet

Ethereum, BSC, Polygon, Base, Arbitrum, Avalanche

Generate or import a private key in /admin/deposits/master-wallets. Import the same private key into Trust Wallet or MetaMask to manage all EVM chain balances from your mobile phone.

2. TRON Master Wallet

Native TRX & TRC-20 USDT

Fund this master address with a small amount of TRX (50–100 TRX) to sponsor energy/bandwidth gas before sweeping TRC-20 USDT. Import into TronLink or Trust Wallet.

3. Solana Master Wallet

Native SOL & SPL Tokens (USDC/USDT)

Fund with a small balance (0.1 SOL); the master wallet acts as the fee payer so SPL tokens sweep without requiring SOL in user sub-wallets. Import into Phantom or Trust Wallet.

4. Bitcoin Master Wallet

Native SegWit (Bech32 bc1q...)

Direct integration with Bitcoin Esplora RPC. Validates block confirmations to prevent double-spending. Import into any BIP-84 Native SegWit compatible Bitcoin wallet.

Private Key Security:

All private keys are encrypted at rest using Laravel's Crypt::encryptString() (AES-256-CBC with HMAC validation). Private keys are never stored in plaintext.

06

Platform Settings & Configuration

Financial Settings (/admin/settings/financial)

Set base currency (USD, EUR, GBP), decimal precision, platform deposit fee percentage, deposit countdown lifespan, and global withdrawal limits.

Core Branding (/admin/settings/core)

Upload site logo (square and rectangular), tab favicon (32x32), update site name, tagline, and configure operating timezone (e.g., UTC).

Security Settings (/admin/settings/security)

Toggle mandatory email verification, login 2FA OTP codes, Google reCAPTCHA bot defense, and password strength policies.

Email & SMTP (/admin/settings/email)

Configure SMTP credentials (Host, Port, User, Password, TLS/SSL) and customize transactional email notification templates.

07

Managing Automated Trading Bots

Creating a Bot (/admin/trading-bots)

  1. Navigate to Trading → Trading Bots → New Bot.
  2. Set Bot Name (e.g. *Alpha Momentum Pro*), Trading Pair (`BTC/USDT`), and Risk Tier (Low Risk, Medium Risk, High Growth, Aggressive).
  3. Set Min & Max Balance capital limits.
  4. Set Yield Rules (fixed percentage or range like `1.5% - 2.5%`).
  5. Choose Payout Schedule (Daily, Weekly, Monthly) and Tenure Duration (7, 30, 90, 365 days).
  6. Click Save Bot. It will appear on user dashboards instantly.
Bot Execution Lifecycle:

When active, the Trading Bots Engine (coordinated automatically by php artisan foyana:scheduler-daemon) executes active bot cycles, credits daily profits to user balances, logs full records to TradingBotLog, and returns the original capital upon completion.

08

Managing Master Copy Trading

Configuring Master Traders (/admin/copy-trading)

Create verified trader profiles with historical win rates, total PnL metrics, follower limits, and custom performance fee splits (e.g. 20%).

Trade Replication Worker:

The internal Copy Trading Synchronizer (coordinated automatically by php artisan foyana:scheduler-daemon) mirrors master orders to all active follower accounts in real time, deducts the performance fee upon profitable closure, and distributes profit shares automatically.

09

User Management & KYC Verification

User 360° Hub (/admin/users)

View user balances, deposit histories, active bots, and referral downlines. Adjust balances with custom ledger notes, ban/unban users, and securely log in as any user with 1 click.

KYC Review Portal (/admin/kyc)

Review uploaded identity documents (Passports, National IDs, Proof of Address) with high-res zoom controls. Approve or reject with automated notification feedback.

10

Crypto Withdrawals & Payout Management

Process and approve payouts directly on-chain using pure-PHP withdrawal services (EthereumWithdrawalService, SolanaWithdrawalService, TronWithdrawalService, BitcoinWithdrawalService).

Automated PDF Transaction Invoices:

Upon payout approval, the script generates a branded PDF receipt with transaction hashes, timestamps, and fees using DomPDF for user accounting records.

11

Maintenance & Troubleshooting

Clearing Application Caches:
php artisan optimize:clear

Common Troubleshooting Checklist

Issue Root Cause & Resolution
Bots or copy trades not updating Ensure the cron job hitting /utils/cronjob is running every minute in your server crontab.
Crypto deposits not detected Check that your RPC endpoints in /admin/deposits/master-wallets are active and not rate-limited (HTTP 429).
TRC-20 or ERC-20 sweeps failing Ensure your master wallet holds a small balance of native gas (TRX for TRON, ETH/BNB for EVM) to sponsor sub-wallets.
Database error during install Verify your MySQL user has full ALL PRIVILEGES on the target database.
12

Support & Assistance

Need Custom Help or Modifications?

Our engineering desk is available to assist verified license holders with server deployments, custom bot strategy implementations, and multi-chain integrations.

Contact Support