[dotenv@17.2.3] injecting env (150) from .env -- tip: 🔐 prevent committing .env to code: https://dotenvx.com/precommit
[dotenv@17.2.3] injecting env (0) from .env -- tip: 🗂️ backup and recover secrets: https://dotenvx.com/ops
[protected-image] IMAGE_ROOTS = [ 'C:\\Bordales Projects\\giftwrap - Copy\\protected\\images' ]
[protected-image] IMAGE_ROOT = /home/bordales/public_html/v1/protected/images
[protected-image] SKU fallback enabled
[Server] ✅ Real-Time Monitor: Initialized
[protected-image] Cache initialized with 9640 files
[Schema] PRICE_HAS_COST_MARKUP = true
✅ Database synced – tables are ready
[Server] Running on port 3000 in development mode
[Server] Health check: http://localhost:3000/healthz
[Server] Ready check: http://localhost:3000/readyz
[Server] ✅ WhatsApp Service: Loaded
[Server] ✅ AI Assistant: Loaded
[Server] ✅ Gate System: Loaded
{"t":"2026-03-01T22:19:51.346Z","event":"tenancy.host","rid":null,"raw":"localhost","norm":"localhost"}
{"t":"2026-03-01T22:19:51.381Z","event":"tenants.lookup.exact.ok","rid":null,"ms":34.5783,"sql":"SELECT id, name, domain, base_currency, timezone, recaptcha_secret, recaptcha_site_key, theme, email, phone, address, company_name FROM tenants WHERE LOWER(TRIM(TRAILING '-' FROM domain)) = ? LIMIT 1","params":["localhost"],"rows":0}
{"t":"2026-03-01T22:19:51.381Z","event":"tenancy.fallback","rid":null,"reason":"no_match","tried":"localhost"}
{"t":"2026-03-01T22:19:51.422Z","event":"tenants.lookup.default.ok","rid":null,"ms":40.9872,"sql":"SELECT id, name, domain, base_currency, timezone, recaptcha_secret, recaptcha_site_key, theme, email, phone, address, company_name FROM tenants WHERE id=1 LIMIT 1","params":[],"rows":1}
{"t":"2026-03-01T22:19:51.423Z","event":"tenancy.ok","rid":null,"ms":78,"hostRaw":"localhost:3000","hostNorm":"localhost","matched":true,"tenant":{"id":1,"domain":"giftwrap.co.za"},"hdrs":{"host":"localhost:3000","xfh":null,"xoh":null}}
[GATE DEBUG] Path: /journey/event Original URL: /api/journey/event
[GATE DEBUG] Session ID: tg1q8mBOlzsfyorw89otDg5Q12iAymXL
[GATE DEBUG] Session: Session {
  cookie: {
    path: '/',
    _expires: null,
    originalMaxAge: null,
    httpOnly: true,
    sameSite: 'lax',
    secure: false
  }
}
[GATE DEBUG] Authenticated: undefined
{"t":"2026-03-01T22:19:51.658Z","event":"tenancy.host","rid":null,"raw":"localhost","norm":"localhost"}
{"t":"2026-03-01T22:19:51.699Z","event":"tenants.lookup.exact.ok","rid":null,"ms":40.5127,"sql":"SELECT id, name, domain, base_currency, timezone, recaptcha_secret, recaptcha_site_key, theme, email, phone, address, company_name FROM tenants WHERE LOWER(TRIM(TRAILING '-' FROM domain)) = ? LIMIT 1","params":["localhost"],"rows":0}
{"t":"2026-03-01T22:19:51.699Z","event":"tenancy.fallback","rid":null,"reason":"no_match","tried":"localhost"}
{"t":"2026-03-01T22:19:51.739Z","event":"tenants.lookup.default.ok","rid":null,"ms":39.8092,"sql":"SELECT id, name, domain, base_currency, timezone, recaptcha_secret, recaptcha_site_key, theme, email, phone, address, company_name FROM tenants WHERE id=1 LIMIT 1","params":[],"rows":1}
{"t":"2026-03-01T22:19:51.740Z","event":"tenancy.ok","rid":null,"ms":81,"hostRaw":"localhost:3000","hostNorm":"localhost","matched":true,"tenant":{"id":1,"domain":"giftwrap.co.za"},"hdrs":{"host":"localhost:3000","xfh":null,"xoh":null}}
[GATE DEBUG] Path: /journey/event Original URL: /api/journey/event
[GATE DEBUG] Session ID: DIJeKSgOe5HViduEYy4js6f4BuNbIDS6
[GATE DEBUG] Session: Session {
  cookie: {
    path: '/',
    _expires: null,
    originalMaxAge: null,
    httpOnly: true,
    sameSite: 'lax',
    secure: false
  }
}
[GATE DEBUG] Authenticated: undefined
{"t":"2026-03-01T22:19:56.658Z","event":"tenancy.host","rid":null,"raw":"localhost","norm":"localhost"}
{"t":"2026-03-01T22:19:56.685Z","event":"tenants.lookup.exact.ok","rid":null,"ms":26.4699,"sql":"SELECT id, name, domain, base_currency, timezone, recaptcha_secret, recaptcha_site_key, theme, email, phone, address, company_name FROM tenants WHERE LOWER(TRIM(TRAILING '-' FROM domain)) = ? LIMIT 1","params":["localhost"],"rows":0}
{"t":"2026-03-01T22:19:56.685Z","event":"tenancy.fallback","rid":null,"reason":"no_match","tried":"localhost"}
{"t":"2026-03-01T22:19:56.720Z","event":"tenants.lookup.default.ok","rid":null,"ms":34.0371,"sql":"SELECT id, name, domain, base_currency, timezone, recaptcha_secret, recaptcha_site_key, theme, email, phone, address, company_name FROM tenants WHERE id=1 LIMIT 1","params":[],"rows":1}
{"t":"2026-03-01T22:19:56.721Z","event":"tenancy.ok","rid":null,"ms":62,"hostRaw":"localhost:3000","hostNorm":"localhost","matched":true,"tenant":{"id":1,"domain":"giftwrap.co.za"},"hdrs":{"host":"localhost:3000","xfh":null,"xoh":null}}
[GATE DEBUG] Path: /journey/event Original URL: /api/journey/event
[GATE DEBUG] Session ID: qAy0xKqkQHGjW4nFjeKwHakSsM036nvk
[GATE DEBUG] Session: Session {
  cookie: {
    path: '/',
    _expires: null,
    originalMaxAge: null,
    httpOnly: true,
    sameSite: 'lax',
    secure: false
  }
}
[GATE DEBUG] Authenticated: undefined
