# ── App ────────────────────────────────────────────
APP_NAME=nexgen
APP_ENV=development
APP_PORT=3000
APP_URL=http://localhost:3000
OPEN_API=true
LOG_LEVEL=info
# Frontend origin (only needed when frontend is on a different domain than API)
# Leave empty if frontend is served from the same APP_URL or FRONTEND=false
FRONTEND_URL=
# Allowed CORS origins. Use * for any, or comma-separated for specific origins
CORS_ORIGIN=*

# ── Database ───────────────────────────────────────
# Supported: mysql://, postgres://, sqlite: prefix
DATABASE_URL=mysql://root:@localhost:3306/nexgen

# ── Storage (File Uploads) ─────────────────────────
STORAGE_DRIVER=local
STORAGE_DISK=public
STORAGE_BUCKET=
STORAGE_REGION=us-east-1
STORAGE_ENDPOINT=
STORAGE_ACCESS_KEY_ID=
STORAGE_SECRET_ACCESS_KEY=
STORAGE_FORCE_PATH_STYLE=false
STORAGE_SIGNED_URL_TTL_SECONDS=900

# ── JWT Auth ───────────────────────────────────────
JWT_ACCESS_SECRET=change-me-access
JWT_REFRESH_SECRET=change-me-refresh
JWT_ACCESS_EXPIRY=900
JWT_REFRESH_EXPIRY=2592000
JWT_REFRESH_REMEMBER_EXPIRY=604800

# ── Session / Cookie ───────────────────────────────
COOKIE_NAME=nexgen
COOKIE_SECRET=change-me-cookie
SESSION_COOKIE=nexgen_session
SESSION_TTL_SECONDS=7200
CACHE_TTL_SECONDS=3600

# ── Redis ──────────────────────────────────────────
# Enables/disables cache, session, queue, events, BullBoard (all Redis-backed services)
REDIS=false
REDIS_URL=redis://127.0.0.1:6379
REDIS_PREFIX=nexgen
# Comma-separated emails allowed to open /bullmq (empty = no email restriction)
BULLMQ_UI_ALLOWED_EMAILS=

# ── Feature Toggles ────────────────────────────────
# Enable/disable frontend build and serving. Set false for API-only mode
FRONTEND=true
# Enable/disable Socket.IO realtime server
SOCKET=true

# ── Auth ───────────────────────────────────────────
AUTH_REQUIRE_EMAIL_VERIFICATION=false

# ── Mail ───────────────────────────────────────────
# When true, mail errors won't crash the request. Useful in dev without SMTP
MAIL_FAIL_SILENT=true
MAIL_HOST=127.0.0.1
MAIL_PORT=1089
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM_ADDRESS=no-reply@example.com
