# v4-specific production checks

- [ ] New browser install works without setup-token.txt, but install.php is IP-restricted while running and deleted when done.
- [ ] New installation stores OpenAI, Stripe and SMTP secrets encrypted in SQL `app_secrets`, not `.env`.
- [ ] Existing v3 upgrade migrates encrypted credentials without losing APP_KEY; SQL and file backups are tested.
- [ ] Admin can rotate/clear secrets without disclosing saved secret strings in HTML or logs.
- [ ] Stripe webhook validates signatures using SQL-held signing secret, and only verified paid bundle orders get automatic expiring wget links.
- [ ] A changed/unpaid/AI-only order cannot download a bundle without an eligible paid snapshot.
- [ ] Direct link is valid without a login on a clean host, and returns 403 for unknown/expired/revoked/refunded/suspended links or after 25 downloads.
- [ ] Regenerating a link revokes its predecessor; bearer URL is encrypted at rest and not displayed to other users.
- [ ] Run wget on a test PBX, verify ZIP checksum/contents, run the generated installer dry run, and test FreePBX API with a staging server.

# PBX Launchpad v2.0 production checklist

## Before exposing the service publicly

- [ ] Deploy on PHP 8.2+ with MySQL / MariaDB, `pdo_mysql`, `curl`, `zip`, `mbstring`, `openssl`.
- [ ] Domain points to `public/`, never repository root. HTTPS valid. Browser installer access restricted to IP/hosting panel during first install; no setup token required.
- [ ] Browser install creates private `.env` with file permissions 0600 holding DB settings and APP_KEY only, `.installed.lock` exists, and installer is deleted afterward.
- [ ] Hosting file permissions hardened after setup, .env not exposed to HTTP. Installer deleted or access blocked.
- [ ] Test admin login, regular registration, user suspension, disabling registration, disabling demo, and changing installation package fee.
- [ ] Test new demo downloads without login, one-extension validation, basic CAPTCHA and 6/hr rate limiting.
- [ ] Test contact form as guest, CAPTCHA failure, honeypot trap, inbox storage and SMTP STARTTLS delivery. Configure SPF / DKIM / DMARC; use an authorized domain sender.
- [ ] Verify admins can delete contact messages and review failed-email delivery records.
- [ ] Test visual builder with Flowroute, Twilio, Telnyx, VoIP.ms and custom trunk plan, invalid mode/secret fields and save/load/ZIP.
- [ ] Test IVR drag-and-drop and move buttons on mobile, all links and form controls at narrow screen widths.
- [ ] Perform Stripe test payment, canceled payment, webhook signature failure, asynchronous payment, duplicate webhook, refund and dispute. Paid download access must be tied to webhook confirmation, not redirect.
- [ ] Confirm each generated ZIP has `TRUNK-SETUP-GUIDE.md`, `VISUAL-TRUNK-SETUP.html`, `TRUNK-CONFIG-PLAN.json`, PBX-side installer and setup guide.
- [ ] On staging FreePBX 16 and 17, confirm GraphQL scopes and signatures, dry-run, add new extension, voicemail email metadata, add ring group and reload. Check existing extensions and trunks stay untouched.
- [ ] Confirm all provider instructions against the customer's live portal account and current carrier documentation, particularly account-specific PoPs, transports, e911 and DID delivery.
- [ ] Put in place monitored backups, recovery tests, operational audit logs, provider health checks, admin MFA, password reset, email verification, a retention/deletion policy for messages and supported tax/legal/payment policies.

## Limitations in this release

- No automatic FreePBX SIP trunk creation/updates, IVR creation, audio upload, SMTP relay change or DID route change. Guided manual steps instead.
- Generated PBX-side installers still require root/admin privileges on the customer's **own PBX**, a proper backup and OAuth credentials. Website setup does not require a shell.
- Production integration tests need a real HTTPS PHP/MySQL host, a Stripe test account, an SMTP service and test FreePBX; static smoke tests are not substitutes.
- The graphical guide represents **illustrative dashboard mockups**. Provider dashboard menus or wording can change.
- Third-party carrier accounts, SIP numbers, service activation, emergency services and firewall config are not included.
