# =============================================================================
# BlackRed Raffle - Environment Configuration Example
#
# Copy this file to .env and fill in real values.
# NEVER commit .env to source control. NEVER ship .env in deployments.
# Permissions on production: chmod 600 .env
# =============================================================================

# -----------------------------------------------------------------------------
# Application
# -----------------------------------------------------------------------------
APP_ENV=development
APP_DEBUG=true
APP_NAME="BlackRed Raffle"
APP_URL=https://blackredentghana.com
APP_TIMEZONE=UTC

# If the app is mounted under a subdirectory (e.g. URL is
# https://host.com/blackred/public/api/health), set APP_BASE_PATH to the
# subdirectory prefix. Leave empty when the app is at the document root.
# Example values:
#   APP_BASE_PATH=                   (app at https://host.com/api/health)
#   APP_BASE_PATH=/blackred/public   (app at https://host.com/blackred/public/api/health)
APP_BASE_PATH=

# A 32-byte random string. Used for cookie signing and CSRF tokens.
# Generate one with: php -r "echo bin2hex(random_bytes(32)) . PHP_EOL;"
APP_SECRET=

# -----------------------------------------------------------------------------
# Database (MariaDB / MySQL)
# -----------------------------------------------------------------------------
DB_HOST=localhost
DB_PORT=3306
DB_NAME=amoamvfc_blackRedTSQL
DB_USER=
DB_PASS=
DB_CHARSET=utf8mb4

# -----------------------------------------------------------------------------
# Logging
# -----------------------------------------------------------------------------
# Levels: debug | info | notice | warning | error | critical | alert | emergency
LOG_LEVEL=info
LOG_PATH=logs/app.log
AUDIT_LOG_PATH=logs/audit.log

# -----------------------------------------------------------------------------
# Sessions
# -----------------------------------------------------------------------------
# In minutes. Sliding expiry.
SESSION_LIFETIME=30
SESSION_COOKIE_NAME=BR_SESSION
SESSION_COOKIE_SECURE=true
SESSION_COOKIE_HTTPONLY=true
SESSION_COOKIE_SAMESITE=Strict

# -----------------------------------------------------------------------------
# Security
# -----------------------------------------------------------------------------
# Argon2id parameters (PHP password_hash defaults are good enough; tweak if needed)
PASSWORD_MEMORY_COST=65536
PASSWORD_TIME_COST=4
PASSWORD_THREADS=1

# Rate limiting (per IP+endpoint)
RATE_LIMIT_LOGIN_PER_MIN=5
RATE_LIMIT_SIGNUP_PER_MIN=3
RATE_LIMIT_SIGNUP_LOOKUP_PER_MIN=5
RATE_LIMIT_DEPOSIT_PER_MIN=10
RATE_LIMIT_WITHDRAWAL_PER_MIN=10
RATE_LIMIT_GENERAL_PER_MIN=60

# -----------------------------------------------------------------------------
# AppsNMobile (ANM) Orchard - MoMo Aggregator
# -----------------------------------------------------------------------------
ANM_BASE_URL=https://orchard-api.anmgw.com
ANM_CLIENT_KEY=
ANM_SECRET_KEY=
ANM_SERVICE_ID=
ANM_CALLBACK_URL=https://blackredentghana.com/api/callbacks/momo
ANM_CALLBACK_SHARED_SECRET=
ANM_REQUEST_TIMEOUT_SECONDS=30

# -----------------------------------------------------------------------------
# Hubtel SMS
# -----------------------------------------------------------------------------
HUBTEL_SMS_BASE_URL=https://smsc.hubtel.com/v1/messages/send
HUBTEL_SMS_CLIENT_ID=
HUBTEL_SMS_CLIENT_SECRET=
HUBTEL_SMS_SENDER_ID=BlackRed
HUBTEL_REQUEST_TIMEOUT_SECONDS=15

# -----------------------------------------------------------------------------
# Game / AML overrides (mostly read from systemConfig table; these are fallbacks)
# -----------------------------------------------------------------------------
DEPOSIT_MIN_PESEWAS=200
DEPOSIT_MAX_PESEWAS=500000
WITHDRAWAL_MIN_PESEWAS=200
PLAY_BALANCE_PERCENT_MAX=50
GAME_MIN_STAKE_PESEWAS=200
