# Deploying PDFSlip to cPanel (Setup Node.js App)

## 1. Upload & Extract
1. Open **cPanel -> File Manager** and navigate to your target directory (e.g. `/home/username/pdfslip-app`).
2. Upload `pdfslip-cpanel.zip` and click **Extract**.

## 2. Configure Setup Node.js App
1. Open **cPanel -> Setup Node.js App** and click **Create Application**.
2. **Node.js version**: Select Node 20.x or newer.
3. **Application mode**: `Production`.
4. **Application root**: Path where you extracted the ZIP (e.g. `pdfslip-app`).
5. **Application URL**: `https://pdfslip.com`.
6. **Application startup file**: `app.cjs`.
7. Add Environment Variables:
   - `APP_URL`: `https://pdfslip.com`
   - `ADMIN_PATH`: `/adminbyaman`
   - `ADMIN_USERNAME`: your chosen username
   - `ADMIN_PASSWORD`: your strong admin password
   - `ADMIN_SESSION_SECRET`: a random 64-character hex string
8. Click **Create**, then click **Run NPM Install**, then **Restart**.

## 3. Verify Live Endpoints
- Public homepage: `/` (plus all 15 localized prefixes: `/de`, `/es`, `/fr`, `/hi`, `/ja`, `/ar`, `/zh`, `/zh-Hant`, `/ko`, `/pt`, `/id`, `/it`, `/ru`, `/tr`)
- XML Sitemap Index: `/sitemap.xml`
- Robots rules: `/robots.txt`
- Hidden Admin Panel: `/adminbyaman` (protected by HMAC session cookie + Bearer token)

## 4. Persistent Data Folders
- `data/studio-db.json` — Site config, blogs, SEO overrides, ads, logs, and ratings
- `data/assets/` — Uploaded logos, favicons, OG images, and Media Library files
- `data/sitemaps/` — Auto-regenerated XML sitemap index and 15 per-locale sitemaps
