═══════════════════════════════════════════════════════════════
  UKAMA FUNERAL PLAN — cPanel Deployment Guide
  MySQL / MariaDB  |  PHP 8.1+  |  Apache with mod_rewrite
═══════════════════════════════════════════════════════════════

─── REQUIREMENTS ───────────────────────────────────────────────
  PHP 8.1 or higher
  MySQL 5.7+ or MariaDB 10.3+
  Apache mod_rewrite enabled
  PHP extensions: pdo_mysql, mbstring, openssl, tokenizer,
                  xml, ctype, json, bcmath, fileinfo

─── OPTION A  —  Recommended (clean subdomain) ─────────────────
  1. Create a subdomain in cPanel, e.g. app.yourdomain.com
     Set its document root to:
       /home/USERNAME/ukama-funeral/public

  2. Upload this zip to /home/USERNAME/ and extract it.
     You should have: /home/USERNAME/ukama-funeral/

  3. In cPanel File Manager, give these folders write permission
     (select folder → Permissions → 755, tick subdirectories):
       storage/
       bootstrap/cache/

  4. Create a MySQL database in cPanel:
     Databases → MySQL Databases → Create Database
     Create a user, assign all privileges to that database.

  5. Open your browser and go to:
       https://app.yourdomain.com/install/
     Follow the 5-step installer.

  6. After install, optionally delete the install/ folder:
       /home/USERNAME/ukama-funeral/public/install/

─── OPTION B  —  Root domain via .htaccess ─────────────────────
  1. Upload and extract the zip to /home/USERNAME/ukama-funeral/

  2. In cPanel, your domain's document root is public_html/.
     Copy the root .htaccess into public_html/ — it will
     route requests through ukama-funeral/public/ automatically.

     Alternatively, move the extracted folder contents up one
     level so they sit inside public_html/ directly, then rename
     or symlink public/ as the entry point.

  3. Follow steps 3–6 from Option A above.

─── COMMON cPanel ISSUES ───────────────────────────────────────
  403 / blank page:
    → storage/ and bootstrap/cache/ not writable.
      Run in Terminal: chmod -R 755 storage bootstrap/cache

  500 error:
    → Check storage/logs/laravel.log for the real error.
      Often caused by wrong DB credentials in .env.

  "Class not found":
    → Run: php artisan config:clear && php artisan cache:clear

  Installer not showing:
    → Make sure public/install/index.php exists and is readable.
      If mod_rewrite is off, contact your host to enable it.

─── AFTER INSTALLATION ─────────────────────────────────────────
  Admin panel:   https://yourdomain.com/login
  Default roles: super-admin, admin, manager, claims-officer,
                 cashier, underwriter, agent
  (Admin credentials are set during the installer wizard.)

  To update later: Admin panel → Administration → System Updater

─── FILE PERMISSIONS REFERENCE ─────────────────────────────────
  storage/                  755 (recursive)
  bootstrap/cache/          755
  public/                   755
  All other files           644

═══════════════════════════════════════════════════════════════
  IPEC Regulated · Ukama Funeral Plan
═══════════════════════════════════════════════════════════════
