DREAMTERROR — cPanel Deployment Guide
======================================

OPTION A: Full-Stack cPanel Node.js App (Recommended)
----------------------------------------------------
Supports all features: IP country-wise auto-language (/api/geo-locale),
dynamic SEO/hreflang HTML tags, /sitemap.xml, /robots.txt, AI story
restructuring, voice transcription, and on-demand story translation.

1. Log in to cPanel -> File Manager -> create a folder (e.g., /home/YOUR_USER/dreamterror).
2. Upload "dreamterror-cpanel-ready.zip" into that folder and click Extract.
3. Open cPanel -> Setup Node.js App -> Create Application:
   - Node.js version: 18.x, 20.x, or 22.x (20.x recommended)
   - Application mode: Production
   - Application root: dreamterror (the folder where you extracted the zip)
   - Application URL: your domain (e.g., example.com)
   - Application startup file: app.js
4. Click "Create", then click "Run NPM Install" (installs only express + @google/genai).
5. (Optional for AI features) Add an Environment Variable in the Node.js App UI
   (or create a ".env" file in the folder):
   - GEMINI_API_KEY = your_gemini_api_key
6. Click "Restart" on your Node.js App.
7. IMPORTANT — Firebase Google Sign-In:
   Go to Firebase Console -> Authentication -> Settings -> Authorized domains
   and add your domain name so Google Sign-In works on your live domain.

OPTION B: Static-Only Upload to public_html (If cPanel has NO Node.js App)
--------------------------------------------------------------------------
1. Extract "dreamterror-cpanel-ready.zip" on your computer.
2. Upload ONLY the contents INSIDE the "dist/" folder (including ".htaccess")
   directly into cPanel -> public_html/.
   Note: Static hosting supports Firebase, World Map, Auth, and browser-locale
   language switching, while /api/* AI routes require Option A (Node.js).
