# cPanel Deployment

## 1. Requirements
- PHP 8.2 or newer
- MySQL 8 or compatible hosted MySQL
- PDO MySQL extension
- OpenSSL
- Mbstring
- JSON
- Fileinfo
- HTTPS/SSL

## 2. Database
In cPanel > MySQL Databases:
- Create database: `nazango_global_services`
- Create user: `nazango_user`
- Generate a strong private password
- Add the user to the database with ALL PRIVILEGES

Your host may prefix the database/user names, e.g. `account_nazango_global_services`.

Import `database/schema.sql` using phpMyAdmin.

## 3. Configuration
Copy `.env.example` to `.env` and set the actual values.

Never upload real secrets to Git or public repositories.

## 4. Document root
Point the domain/subdomain document root to:
`/public`

If your host cannot use a separate document root, move only the contents of `public/` into the web root and keep `app/`, `config/`, `storage/` and `database/` outside public access.

## 5. HTTPS
Enable SSL and redirect HTTP to HTTPS.

## 6. First admin
Visit `/install.php` once, create the first Super Admin, then delete or disable `public/install.php`.

## 7. Production
Set:
`APP_ENV=production`
`APP_DEBUG=false`

## 8. PWA
The service worker requires HTTPS in production (localhost is also allowed during development).

## 9. Payment webhooks
Configure provider webhooks only after provider credentials are installed. Verify signatures server-side before changing payment status.

## 10. Final checklist
- HTTPS active
- debug disabled
- installer removed
- strong DB password
- strong APP_KEY/CSRF_KEY
- private storage inaccessible
- admin account secured
- payment webhook signatures verified
- backups configured
- legal/KYC procedures reviewed
