# Release Checklist — AARJAY GDP Portal

Use this before handing a ZIP to production/cPanel.

## 1. Syntax and schema

```bash
cd mvc
find app -name '*.php' -print0 | xargs -0 -n1 php -l
mysql -u root -e "DROP DATABASE IF EXISTS pharma_release_test; CREATE DATABASE pharma_release_test;"
mysql -u root pharma_release_test < install.sql
```

## 2. Installer check

Run the installer against a disposable database, not production:

1. Remove any existing `install.lock` in the disposable test copy.
2. Visit `/install.php`.
3. Complete DB step with disposable DB credentials.
4. Confirm `app/config.php` is written.
5. Confirm `install.lock` is created.
6. Confirm login works with seeded admin.

## 3. Required manual route smoke test

Login as admin, then open every sidebar module list page. At minimum verify:

- Dashboard
- Suppliers, Customers, Products
- Sales Orders, Dispatch, Purchase Requests, Goods Receiving
- Batch / Stock and Recall Trace
- Deviations, CAPA, Change Control, SOPs
- Document Control, Forms & Templates, Risk Assessments, Complaints
- Recalls, Falsified Medicines, Defective Stock, Audits, GDP Gap Analysis
- Training Matrix, SOP Read & Sign, Training Records
- Premises & Equipment, Premises Checks, Cleaning, Pest Control, Fire & Safety
- Accounts & Tax, Payment Tracker, VAT Report, Credit Notes, Contact Directory
- Advanced Tools, QR Labels, AI Report Writer, Cold-chain Imports, System Health

## 4. Security / production settings

- Change default admin password immediately.
- Set production `app.url`.
- Ensure real DB credentials are not committed into a public repo.
- Ensure `.htaccess` blocks `app/`, `logs/`, `.sql`, `.md`, `.log` files.
- Keep `install.lock` after install, or remove `install.php` and `install.sql` from production.
- Confirm upload folders are writable only as required.

## 5. Known environment requirement

- PHP 8.0+
- PDO MySQL
- mbstring
- json
- sessions
- Apache mod_rewrite or equivalent routing
- Optional: ZipArchive for multi-file accountant ZIP export

## 6. Handover note

The sandbox used to build v11.x did not include PHP/MySQL CLI, so the final syntax/schema/live regression must be run in the deployment or staging environment.
