# cPanel Deployment

Domain: `adam-app.com`

Recommended production split:

- Marketing website: `adam-app.com`
- Hotel system app: `app.adam-app.com`

## Option A: cPanel Has Setup Python App

1. Open cPanel.
2. Open **Setup Python App** or **Python Selector**.
3. Create a new Python app.
4. Recommended Python version: 3.10+.
5. Application root: upload/extract this project folder there.
6. Application startup file: `passenger_wsgi.py`.
7. Application entry point: `application`.
8. Install requirements from `requirements.txt`.
9. Restart the Python app.

Main URLs after setup:

- Admin: `/hotel/default/admin`
- Guest: `/hotel/default/guest?room=101`
- Staff: `/hotel/default/staff`
- Subscriptions owner dashboard: `/subscriptions`
- Staff maintenance/report page: `/hotel/default/report`
- Promo page: `/promo.html`

## Option B: cPanel Does Not Have Python App

This project cannot run as a normal static-only cPanel website because it needs:

- `server.py` / Python backend
- SQLite database writes
- PMS API endpoints
- order saving endpoints

Use one of these instead:

- VPS
- Render/Railway/Fly.io style Python hosting
- Convert backend to PHP/MySQL for classic cPanel

## Important Security Notes

- Do not expose `hotel.db` for direct web download.
- Do not put OPERA credentials in JavaScript.
- Use cPanel environment variables for:
  - `OPERA_BASE_URL`
  - `OPERA_CLIENT_ID`
  - `OPERA_CLIENT_SECRET`
  - `OPERA_APP_KEY`
  - `OPERA_ENTERPRISE_ID`
  - `OPERA_PROPERTY_ID`
- Change all admin/staff/room passwords before selling or delivering to a hotel.

## Oracle PMS

Oracle OPERA Cloud is currently a safe placeholder connector. Real OHIP calls require official Oracle documentation, API permissions, app key, property ID, enterprise ID, client ID, and client secret.
