# Hostinger Deployment

1. Create a PostgreSQL database and user in Hostinger.
2. Upload the project outside `public_html`, then point the domain document root to `public`.
3. Copy `.env.example` to `.env` and fill database, mail, queue, OCR and SMS credentials.
4. Run:

```bash
composer install --no-dev --optimize-autoloader
npm ci
npm run build
php artisan key:generate --force
php artisan migrate --force --seed
php artisan storage:link
php artisan config:cache
php artisan route:cache
php artisan view:cache
```

5. Configure a cron entry:

```bash
* * * * * php /home/USER/path-to-project/artisan schedule:run >> /dev/null 2>&1
```

6. Run a queue worker through Hostinger process manager when available:

```bash
php artisan queue:work --tries=3 --timeout=120
```

Security checklist:

- Keep `APP_DEBUG=false`.
- Use HTTPS and SMTP credentials.
- Store uploads on the private local disk or S3-compatible storage.
- Rotate `OCR_API_KEY` and `SMS_API_KEY` regularly.
- Grant Super Admin only to trusted users.
