<?php
// ═══════════════════════════════════════════════════════════════════════════
//   Pacific Logistics — PRODUCTION config for pacificlogistics.rookasystems.com
//   Copy this file to  config/config.php  after upload, then edit the four
//   TODO blocks below. Everything else is safe as-is.
// ═══════════════════════════════════════════════════════════════════════════

// ── App identity ───────────────────────────────────────────────────────────
define("APP_ENV",  "prod");     // "prod" hides stack traces and secures cookies
define("DEBUG",    false);      // false in prod
define("DEFAULT_CONTROLLER", "Dashboard");
define("DEFAULT_LAYOUT", "layout_main");
define("DEFAULT_ADMIN_LAYOUT", "layout_main");
define("SITE_TITLE",      "Pacific Logistics");
define("COMPANY_NAME",    "Pacific Group Company Limited");
define("COMPANY_TAGLINE", "Fleet · Operations · Accounting");
define("BRAND_COLOR",  "#2626F5");
define("BRAND_ACCENT", "#F5F7FB");
define("DEFAULT_CURRENCY", "TZS");
define("DEFAULT_VAT_RATE", 18);
define("DEFAULT_TENANT_ID", 1);

// ── (1) ROOT URL — where the app lives on the domain ──────────────────────
// The subdomain pacificlogistics.rookasystems.com serves this app AT ITS ROOT,
// so PROOT is just "/". Trailing slash is required.
define("PROOT", '/');

// ── (2) DATABASE — cPanel → MySQL Databases ────────────────────────────────
// Namecheap cPanel prefixes DB name and user with your account, e.g. "rooka_".
// Create the DB, create a user, add user to DB (all privileges), then fill in:
// TODO: replace the three values below with your cPanel credentials.
define("DB_NAME",     'rooka_pacific');       // e.g. rooka_pacificlogistics
define("DB_USER",     'rooka_pacific_user');  // e.g. rooka_paclog
define("DB_PASSWORD", 'CHANGE-ME-STRONG-PASSWORD');
define("DB_HOST",     'localhost');           // Namecheap uses localhost

// ── (3) SECURITY TOKENS — rotate for production ────────────────────────────
// Any random 40+ char string. Generate one at https://passwordsgenerator.net/
// TODO: replace both.
define("GPS_INGEST_TOKEN", "CHANGE-ME-40-random-chars-for-gps-webhook");
define("CRON_TOKEN",       "CHANGE-ME-40-random-chars-for-cron-worker");

// ── (4) EMAIL — cPanel → Email Accounts ────────────────────────────────────
// Create a mailbox like no-reply@rookasystems.com, then paste its credentials.
// TODO: fill in SMTP_USER and SMTP_PASS. Leave SMTP_HOST as "mail.<yourdomain>"
// unless cPanel tells you otherwise.
define("MAIL_FROM",      "no-reply@rookasystems.com");
define("MAIL_FROM_NAME", "Pacific Logistics");
define("SMTP_HOST",      "mail.rookasystems.com");
define("SMTP_PORT",      587);
define("SMTP_USER",      "no-reply@rookasystems.com");
define("SMTP_PASS",      "CHANGE-ME-MAILBOX-PASSWORD");
define("SMTP_SECURE",    "tls");

// ── SMS gateway (optional; leave blank to disable outbound SMS) ────────────
define("BEEM_API_KEY",     "");
define("BEEM_SECRET_KEY",  "");
define("BEEM_SENDER_ID",   "PACIFIC");

// ── Nothing below normally needs to change ─────────────────────────────────
define("LOGGED_TIME_OUT", 1800);
define("UPLOAD_PATH", ROOT . DS . 'uploads' . DS);
define("UPLOAD_URL",  PROOT . 'uploads/');
define("MAX_UPLOAD_SIZE", 8 * 1024 * 1024);
define("ATTACH_PATH", ROOT . DS . 'attachments' . DS);
define("ATTACH_URL",  PROOT . 'attachments/');
define("ROWS_PER_PAGE", 20);
define("CSRF_TOKEN_KEY", "pacific_csrf");
define("SESSION_NAME",   "pacific_sess");
