# ---------------------------------------------------------------------------
# Copy this file to ".env" and adjust values before running docker compose.
#   cp .env.example .env
# ---------------------------------------------------------------------------

# --- PostgreSQL -------------------------------------------------------------
POSTGRES_USER=ctt
POSTGRES_PASSWORD=ctt_password
POSTGRES_DB=ctt

# --- Backend / Security -----------------------------------------------------
# Generate a strong secret, e.g.:  python -c "import secrets; print(secrets.token_hex(32))"
JWT_SECRET=change-me-in-production
JWT_ALGORITHM=HS256
# 43200 minutes = 30 days. Long-lived token keeps users logged in (persistent session).
ACCESS_TOKEN_EXPIRE_MINUTES=43200

# --- First-run admin --------------------------------------------------------
# No admin is pre-seeded. On first launch the login screen prompts you to create
# the administrator account. The setup endpoint locks itself once that account
# exists.

# --- Scraper ----------------------------------------------------------------
SCRAPER_ENABLED=true
# Fallback cadence used ONLY when no schedule slots are configured (minutes).
SCRAPER_INTERVAL_MINUTES=360
# Timezone in which schedule day/time slots are interpreted.
SCHEDULE_TIMEZONE=Europe/London

# --- CORS -------------------------------------------------------------------
CORS_ORIGINS=http://localhost:8080,http://localhost:5173

# --- AI bolt-on (optional) --------------------------------------------------
# Provide an Anthropic API key to allow the AI enhancement to be toggled on in
# Settings. Leave blank to keep Bid Sentinel fully deterministic/offline.
# Low-cost model by default (Claude Haiku 4.5: $1 / $5 per 1M tokens).
ANTHROPIC_API_KEY=
AI_MODEL=claude-haiku-4-5

# --- Outgoing email (optional) ----------------------------------------------
# Provide SMTP details to enable "Email me this" on reports (sent only to the
# logged-in user's own address). Leave SMTP_HOST blank to hide email features.
# Port 587 = STARTTLS (SMTP_STARTTLS=true); port 465 = implicit TLS.
SMTP_HOST=
SMTP_PORT=587
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM=Bid Sentinel <no-reply@yourdomain.com>
SMTP_STARTTLS=true

# --- Frontend ---------------------------------------------------------------
# Same-origin path; nginx reverse-proxies /api -> backend. Leave as /api unless
# you run the Vite dev server separately (then use http://localhost:8000).
VITE_API_BASE_URL=/api
