# Sajjad AI Gateway Environment Example
# Copy this file to .env before installation.
# If your hosting file manager hides dotfiles, use env.example, duplicate it, then rename the copy to .env.

APP_NAME="Sajjad AI Gateway"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://mojofa.ir

# Generate a strong random secret with at least 64 characters before production use.
# Example command: php -r "echo bin2hex(random_bytes(32));"
APP_KEY=3b329c57f3dd23638d6d1b4da70d703bc1b83b19560cd5de3bbdfa03e2e55d5e

# sqlite is recommended for simple hosting. Use mysql for larger production deployments.
DB_CONNECTION=sqlite
DB_DATABASE=storage/database.sqlite

# MySQL settings are used only when DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE_NAME=n8nwork_Ai
DB_USERNAME=n8nwork_Ai
DB_PASSWORD=H}h2e?awHosD42Ex

# Session/CORS
# Keep SESSION_SECURE=true on HTTPS production domains.
SESSION_SECURE=true
SESSION_SAMESITE=Lax
# Use comma-separated origins in production, for example: https://example.com,https://panel.example.com
CORS_ALLOWED_ORIGINS=https://your-domain.com
DEFAULT_LOCALE=fa

# Installer admin account. Change these before opening /install.
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=ChangeMe123!

# Provider credentials. Empty API keys keep the provider record, but requests will fail until keys are saved.
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_API_KEY=

AVALAI_BASE_URL=https://api.avalai.ir/v1
AVALAI_API_KEY=

GAPGPT_BASE_URL=https://api.gapgpt.app/v1
GAPGPT_API_KEY=

GHATGPT_BASE_URL=https://api.ghatgpt.com/v1
GHATGPT_API_KEY=aa-E4Sx1WKnFv67M1RduTJTqFWv5T6YY9eeREyqULxxgjnx8ZmP

# Runtime limits
WEB_RATE_LIMIT_PER_MINUTE=30
API_RATE_LIMIT_PER_MINUTE=120
PROVIDER_TIMEOUT_MS=45000

# ZarinPal payment gateway
# Sandbox docs use sandbox.zarinpal.com endpoints. Set false after getting real merchant code.
ZARINPAL_ENABLED=false
ZARINPAL_SANDBOX=true
ZARINPAL_MERCHANT_ID=00000000-0000-0000-0000-000000000000
ZARINPAL_CURRENCY=IRT

# Product defaults; these can also be changed from admin settings.
BRAND_COLOR=#020617
SAVE_PROMPT_HISTORY=true
