# Final Release Checklist

Run these on the production server after uploading the release. Do not run the cache-build steps on a local machine and then upload the generated cache files.

## Required Commands

Run these in this order from the production app root:

```bash
rm -f bootstrap/cache/config.php bootstrap/cache/routes-v7.php bootstrap/cache/packages.php bootstrap/cache/services.php
mkdir -p storage/logs storage/framework/cache storage/framework/sessions storage/framework/views bootstrap/cache
chmod -R 775 storage bootstrap/cache
php artisan migrate --force
php artisan optimize:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache
```

## Deployment Packaging Checks

- Do not deploy local `bootstrap/cache/*.php` files.
- Do not deploy local `storage/framework/views/*`.
- Do not deploy local `storage/logs/*`.
- Build the zip with `scripts/release.sh` so compiled local cache artifacts are excluded.

## Environment Checks

- `APP_ENV=production`
- `APP_DEBUG=false`
- `APP_URL=https://portal.culgroup.ie`
- Database username, password, host, and database name are current.
- Mail host, username, password, from address, and from name are current.
- Zoho client ID, client secret, refresh token, redirect URI, and organisation ID are current.
- Queue, cache, and session drivers match the hosting setup.
- `storage` and `bootstrap/cache` are writable by the web user.
- `bootstrap/cache/config.php` does not contain a local machine path.

## Smoke Tests

- Sign in with email 2FA.
- Open the sidebar `2FA off` page and confirm it does not 500.
- Create a customer portal support ticket.
- Create a replacement tag request and confirm the flat €4 invoice is created.
- Create, send, revise, and accept an estimate.
- Create deposit invoice and contract from an accepted estimate.
- Create and open an invoice, estimate, and credit note.
- Open customer index and customer show pages.
- Open dashboard, Today Command, support, billing, training, tag replacements, warranties, and assets.
- Test one mobile layout on Samsung/Android width and one iPad/tablet width.
- Send a test email from Admin and confirm email templates/signatures render correctly.
- Check Zoho sync logs after invoice create/mark-paid.
- Check `storage/logs/laravel.log` after testing and fix any new production errors.

## Final Sign-Off

- Turn demo mode off.
- Turn demo banner off.
- Mark smoke test passed in Admin.
- Export a backup before first live use.
