FaceZio Final Consolidated Release v5
=====================================
Release date: 2026-09-10

BASE
- Built from facezio-secured-full-install-v4.
- Includes the security/shared-hosting/installer fixes already consolidated in v4.

ADDITIONAL CONSOLIDATED CHANGES
- WhatsApp explicit opt-in / consent hotfix v4.
- Standard Campaign recipient consent enforcement.
- Separate marketing consent enforcement for MARKETING templates.
- STOP/UNSUBSCRIBE/CANCEL/END/QUIT opt-out handling.
- START/SUBSCRIBE restores general WhatsApp consent only.
- Public tenant opt-in form and consent evidence fields.
- Campaign job re-checks consent immediately before sending.
- CSV campaign consent warning.
- Initiate Chat modal visibility/backdrop UI hotfix.
- Distribution safety: no live .env, no runtime log/cache/session/view files.
- Fresh-install bootstrap creates a temporary .env only when one does not exist,
  using a unique random APP_KEY. Existing installations keep their .env untouched.

IMPORTANT
- No database export, access token, tenant data, campaign data, uploaded media,
  or live credentials are intentionally included.
- WhatsApp/Meta account configuration, payment methods, WABA/phone registration,
  templates, messaging limits, and external credentials are account-side data and
  are not bundled in source code.
- Meta messaging-limit upgrades are controlled by Meta; this code does not bypass
  or guarantee messaging-tier changes.

FRESH INSTALL
1. Upload this ZIP contents to the domain document root (normally public_html).
2. Extract the files.
3. Visit the domain. If _app/.env does not exist, index.php creates a temporary
   bootstrap .env with a unique APP_KEY and the installer can open.
4. Complete /install normally with the new site's own database/admin details.
5. Configure the cron command shown by the installer.
6. Configure the site's own Meta/WABA/webhook/payment settings after installation.

EXISTING SITE UPGRADE
1. BACK UP files + database first.
2. Extract/overwrite this release into the existing document root.
3. This archive intentionally has NO _app/.env, so the existing database/app
   credentials are not overwritten.
4. Run outstanding migrations ONCE using the site's working PHP binary, e.g.:
     cd /home/ACCOUNT/public_html/_app
     /opt/alt/php85/usr/bin/php artisan migrate --force
   Replace ACCOUNT/PHP path with the actual cPanel values.
5. Clear FaceZio cache once and hard-refresh the browser.
6. Do NOT run /install on an already-installed live site.

PUBLIC OPT-IN EXAMPLE
- /whatsapp-opt-in/{tenant-subdomain}
- Example: /whatsapp-opt-in/saveunllc?source=facebook_ad

TESTED BEFORE PACKAGING
- Archive overlay built cleanly from v4 + opt-in v4 + chat modal hotfix v1.
- Modified PHP files pass PHP syntax checks.
- Fresh-install bootstrap behavior tested: it creates .env only when missing and
  does not overwrite an existing .env.
- Runtime logs/caches removed before distribution.
