# WebDazzle Trial Provisioner — Quick Start

This package is **fully pre-configured** for your hosting:
- cPanel user: `webdrlxb`
- Server IP: `209.74.74.27`
- Database: `webdrlxb_provisioner` (must exist before install)
- Two product templates included: **NexaStore** + **Arabic CRM**

---

## Three steps to deploy

### 1. Make sure the DB exists in cPanel
- cPanel → MySQL Databases
- Database `webdrlxb_provisioner` exists (empty)
- User `webdrlxb_provisioner` exists with password `webdrlxb_provisioner`
- User added to database with **ALL PRIVILEGES**

### 2. Upload + extract this zip
- File Manager → `public_html/provision/` (clear it if anything is there)
- Upload `trial-provisioner-final.zip`
- Right-click → **Extract**
- Make sure files sit directly in `provision/` (not nested in a subfolder)
- Delete the .zip after extraction

### 3. Run the installer
- Open `https://provision.web-dazzle.com/install.php`
- Step 1 → Install Schema
- Step 2 → Create your admin (pick username + password)
- Step 3 → Test cPanel API
- **Delete `install.php`** after success

That's it. Both products are pre-registered. Templates are already in `/templates/`.

---

## Other things already done for you
- Wildcard DNS `*.trial.web-dazzle.com → 209.74.74.27` (already added)
- Trial root domain set to `trial.web-dazzle.com`
- All bug fixes applied (config-replacement, dotted subdomains, DB prefix auto-add, missing tables in NexaStore)
- 14-day default trial duration
- Egyptian Arabic email templates
- Cron at `/cron/expire_trials.php` for daily expiry (set this up later in cPanel Cron Jobs once daily)

## Login
- Admin: `https://provision.web-dazzle.com/admin/login.php`
- Public signup: `https://provision.web-dazzle.com/public/index.php`

## Test a trial
1. Admin → New Trial → pick NexaStore or Arabic CRM
2. Fill business name + contact email
3. Provision
4. Open the resulting trial URL — should load NexaStore or CRM directly

## Adding more products later
1. Package the project as a zip with `install.sql` at the root
2. Replace its config with placeholders (`{{DB_HOST}}`, `{{DB_NAME}}`, `{{DB_USER}}`, `{{DB_PASS}}`, `{{SITE_URL}}`)
3. Replace admin/settings rows in `install.sql` with `{{ADMIN_*}}` and `{{BUSINESS_NAME_*}}` placeholders
4. Upload zip to `/templates/`
5. Admin → Products → Add Product → fill in slug, paths, names

## Security note
The DB password (`webdrlxb_provisioner`) is identical to the username. Change it in cPanel → MySQL Databases → Change Password, then update line 20 of `includes/config.php`.
