#--------------------------------------------------------------------------
# SimpliFi - environment template
#--------------------------------------------------------------------------
# Copy to .env and run `php artisan key:generate`.
# Production (cPanel): APP_ENV=production, APP_DEBUG=false, MySQL/MariaDB,
# TENANCY_MODE=subdomain with a wildcard DNS record + wildcard subdomain.

# --- Application -----------------------------------------------------------
APP_NAME=SimpliFi
APP_ENV=production
APP_KEY=base64:VSVHSaFOaghk7NK4+P5HVqXhdvXvYdcnJ2qPzlF6Nrs=
APP_DEBUG=false
# Central URL. In subdomain mode tenants live on https://{slug}.<host of APP_URL>.
APP_URL=http://localhost

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database

# PHP_CLI_SERVER_WORKERS=4

BCRYPT_ROUNDS=12

# --- Tenancy ---------------------------------------------------------------
# subdomain = henapp.simplifi.example (production) | path = simplifi.example/henapp (local dev, no DNS)
TENANCY_MODE=path
# Central host; defaults to the host of APP_URL. e.g. simplifi.henapp.org
SIMPLIFI_BASE_DOMAIN=

# --- SMS (smsfactory.henapp.org = Zenoph Notify, vendored SDK) ---------------
# zenoph = real sends (production) | log = write messages to the log (local/tests).
# API keys are set in the app: Super Admin > Settings > SMS (platform) or tenant Settings > SMS.
SMS_DRIVER=zenoph

# --- Demo data -------------------------------------------------------------
# Password for the seeded super admin (admin@simplifi.test) and demo users (local/testing only).
DEMO_PASSWORD=

# --- Logging ---------------------------------------------------------------
# Production (the installer writes this): LOG_CHANNEL=daily + LOG_DAILY_DAYS=14, so one
# ever-growing laravel.log can never fill a shared account's disk quota.
LOG_CHANNEL=daily
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=error

# --- Reverse proxy ----------------------------------------------------------
# Behind Cloudflare / a load balancer set TRUSTED_PROXIES=* (or a comma-separated list of
# proxy IPs) so X-Forwarded-For is honoured: per-IP rate limits and recorded IPs then see the
# visitor, not the proxy. Leave empty when clients connect directly (otherwise they could spoof it).
TRUSTED_PROXIES=

# --- Database ----------------------------------------------------------------
# Local development: SQLite (database/database.sqlite)
DB_CONNECTION=mysql
# Production (cPanel MySQL 8 / MariaDB 10.6):
# DB_CONNECTION=mysql
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=cpaneluser_simplifi
# DB_USERNAME=cpaneluser_simplifi
# DB_PASSWORD=
# DB_CHARSET=utf8mb4
# DB_COLLATION=utf8mb4_unicode_ci

# --- Sessions, cache, queue (database drivers: no Redis on shared hosting) --
SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
# Leave null: sessions are per host (each tenant subdomain has its own session).
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
# The scheduler (cron: php artisan schedule:run every minute) drains this queue.
QUEUE_CONNECTION=sync

CACHE_STORE=file
# CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

# --- Mail ------------------------------------------------------------------
# Production: MAIL_MAILER=smtp with the cPanel mailbox (port 465 + MAIL_SCHEME=smtps, or 587).
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="no-reply@simplifi.test"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"

# --- Modules (all optional; defaults in config/simplifi.php) ----------------
# Routers / devices (M1 MikroTik, M2 vendors). Public URL routers call back to (default APP_URL).
# MIKROTIK_CALLBACK_URL=
# MIKROTIK_SERVER_IP=
# MIKROTIK_POOL_SIZE=5
# MIKROTIK_SYNC_RATE_LIMIT=240
# MIKROTIK_VERIFY_TLS=false
# DEVICES_OFFLINE_AFTER=120
# DEVICES_HTTP_TIMEOUT=15
# RADIUS (FreeRADIUS on a VPS / on-site box reading this database; see docs/RADIUS.md)
# RADIUS_SERVER_HOST=
# RADIUS_TIMEZONE=Africa/Accra
# Payments (M3; gateway keys are entered in the app, not here — see docs/PAYMENTS.md)
# PAYMENTS_HTTP_TIMEOUT=15
# PAYMENTS_PENDING_TIMEOUT=120
# PPPoE billing (M4b)
# PPPOE_INVOICE_DAYS_BEFORE=5
# PPPOE_GRACE_HOURS=0
SIMPLIFI_INSTALLER=true
