QC RECOGNITION — SERVER UPLOAD PACKAGE
======================================
Target: subdomain  https://qc.dev.wtllp.co.in/   (document root = the "qc" folder)

This zip contains ONLY the parts that run on the server. The phone app is built
on your PC and is NOT here.

WHAT'S INSIDE
-------------
  admin/        PHP admin panel (CodeIgniter 4)  -> its CONTENTS go into "qc"
  ml-service/   Python recognition service (FastAPI + FAISS + torch)
  deploy/       systemd unit (qc-ml.service) + full guide (DEPLOY_CPANEL.md)

Already configured for you (PRODUCTION):
  - admin/.env         CI_ENVIRONMENT=production, baseURL=https://qc.dev.wtllp.co.in/
  - admin/.htaccess     rewrites the subdomain root into public/ (RewriteBase /)
  - admin/public/.htaccess   RewriteBase /
  - admin/.env + ml-service/.env share the SAME ML token (already matched)
  - .venv, caches, tests, build junk removed; admin/vendor/ IS included.

WHERE IT GOES ON THE SERVER
---------------------------
The subdomain qc.dev.wtllp.co.in has its Document Root set to the "qc" folder.
Put the CONTENTS of this package's admin/ folder directly inside "qc" so that:

  qc/.htaccess          (from admin/.htaccess)
  qc/public/            (from admin/public/)  <- CI front controller
  qc/app/  qc/vendor/  qc/writable/  qc/.env   ...etc

  Result: https://qc.dev.wtllp.co.in/  ->  qc/public/  (clean URL, no /public)

Put the ml-service folder anywhere private, e.g.:
  /home/<cpaneluser>/qc-ml     (NOT under the web root)

BEFORE IT WORKS — EDITS
-----------------------
1) qc/.env  (was admin/.env)
     database.default.database / username / password  -> your cPanel MySQL DB
     (baseURL is already correct — leave it)
2) qc-ml/.env  (was ml-service/.env)
     DATA_DIR  -> /home/<cpaneluser>/qc-ml/data   (absolute path)
3) Token already matches in both files — nothing to change.
4) Follow deploy/DEPLOY_CPANEL.md: install libs + python venv + systemd (ML),
     then run `php spark migrate` for the admin DB, chmod -R 775 qc/writable,
     and run AutoSSL for the subdomain.

DO NOT open port 8001 in the firewall — the ML service is localhost-only.

TIP: if you'd rather skip the rewrite, you can instead point the subdomain's
Document Root straight at qc/public and delete qc/.htaccess — same clean URL.
