# cPanel deployment - exact values

This package is prepared for Namecheap cPanel **Setup Node.js App**. Do not use Docker or Caddy.

## Create the cPanel application

Use these values:

- Node.js version: **22.x** (choose the newest 22.x shown, such as 22.22)
- Application mode: **Production**
- Application root: **guide.marlothparkcentral.com**
- Application URL: **https://guide.marlothparkcentral.com**
- Application startup file: **app.js**

After the app is created, upload this ZIP into:

`/home/marljsei/guide.marlothparkcentral.com`

Extract the ZIP directly there. The files `app.js`, `package.json`, `src`, `public`, and `private` must be directly inside that folder, not inside another nested folder.

## Environment variables

Add these in the Node.js application screen before the final restart:

- `NODE_ENV` = `production`
- `BASE_URL` = `https://guide.marlothparkcentral.com`
- `TRUST_PROXY` = `true`
- `PAYPAL_ENV` = `sandbox` during testing, later `live`
- `PAYPAL_CLIENT_ID` = value from PayPal app
- `PAYPAL_CLIENT_SECRET` = value from PayPal app
- `PAYPAL_WEBHOOK_ID` = value from PayPal webhook
- `DOWNLOAD_TOKEN_MINUTES` = `30`
- `SUPPORT_EMAIL` = `contact@marlothparkcentral.com`
- `SUPPORT_WHATSAPP` = `+27 79 084 1496`
- `ADMIN_API_KEY` = a long random secret generated by the setup process
- `DB_PATH` = `/home/marljsei/guide.marlothparkcentral.com/data/orders.sqlite`

Do not set `PORT`; cPanel supplies it automatically.

## Install and start

1. Click **Run NPM Install**.
2. Restart the application.
3. Open `https://guide.marlothparkcentral.com/health`.
4. The page must return JSON with `"ok": true`.
5. Test a complete PayPal Sandbox payment before switching to Live.

## PayPal webhook URL

`https://guide.marlothparkcentral.com/api/paypal/webhook`

Subscribe to:

- `PAYMENT.CAPTURE.COMPLETED`
- `PAYMENT.CAPTURE.DENIED`
- `PAYMENT.CAPTURE.REFUNDED`
- `PAYMENT.CAPTURE.REVERSED`
