HSAI Admin - cPanel Upload Guide
================================

Build command: npm run deploy
Live URL example: https://aenterprise.biz/HSAIV2A/login/

UPLOAD STEPS (cPanel File Manager)
----------------------------------
1. Open cPanel > File Manager.
2. Go to public_html.
3. Click Settings (top right) and enable "Show Hidden Files".
4. Upload the HSAIV2A folder into public_html.
   - Your site will be at: https://your-domain.com/HSAIV2A/login/
   - Must include: _next, login, dashboard, .htaccess, index.html
   - Upload the _next folder completely (do not skip it).
5. If replacing an old version, delete the old HSAIV2A folder first.
6. Open: https://your-domain.com/HSAIV2A/login/

LOCAL DEV
---------
npm run dev
Open: http://localhost:4007/login/

LIVE SITE (aenterprise.biz)
---------------------------
URL: https://aenterprise.biz/HSAIV2A/login/
Upload the HSAIV2A folder into public_html.

ROOT DEPLOY (optional)
----------------------
Only if the app must live at https://your-domain.com/ (not in a subfolder):

  npm run deploy:root

Then upload ALL contents of HSAIV2A into public_html (not the folder itself).

CHECKLIST
---------
[ ] HSAIV2A folder uploaded to public_html
[ ] _next folder uploaded
[ ] .htaccess uploaded (hidden file)
[ ] login folder uploaded
[ ] index.html uploaded

TROUBLESHOOTING
---------------
Unstyled / scrambled page:
  - Re-run npm run deploy and re-upload the full HSAIV2A folder.
  - In DevTools > Network, CSS should load from /HSAIV2A/_next/static/...

Blank page:
  - Open /HSAIV2A/login/ directly.

500 Internal Server Error:
  - Rename .htaccess to .htaccess.bak and try again.
  - Re-run npm run deploy and upload the new .htaccess.

Firebase / login not working:
  - App needs internet access to Firebase RTDB.
  - Check browser console for errors.
