APP_NAME=WhatsMine
APP_ENV=production
APP_KEY=base64:2hkalBLFedjRy9Qzp8vK8k4A6UV//7e06UUL8pHARMU=
APP_DEBUG=true
APP_URL=http://localhost:8000

# Demo mode: run the app as a public, read-only showcase.
# When true, all create/update/delete operations (web + admin + /api/v1) are
# blocked and every contact's PII (name, phone, email, address) is masked
# before it reaches the browser.
APP_DEMO_MODE=false

# Installed flag: false on a fresh deploy so the web setup wizard at /install
# runs. The installer writes APP_INSTALLED=true once setup completes, which
# permanently locks the wizard. Already-installed apps can set this to true.
APP_INSTALLED=false

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

# Optional: path to a CA bundle for outbound HTTPS (Meta API / Guzzle).
# Leave blank to use the system/PHP default CA store. Set only if your host
# needs an explicit bundle, e.g. /etc/ssl/certs/cacert.pem
HTTP_CLIENT_CA_PATH=

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=error

# Database: use mysql for production; sqlite for local when preferred
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=whatsmine
DB_USERNAME=root
DB_PASSWORD=

SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
SESSION_SAME_SITE=lax

# Realtime broadcasting. Set to "reverb" (self-hosted, see Reverb block below)
# or "pusher" to enable live updates; "log" keeps realtime off.
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local

# Queue: use "redis" when Redis is available; "database" otherwise
QUEUE_CONNECTION=database

# Cache: use "redis" when Redis is available; "database" otherwise
CACHE_STORE=database
# CACHE_PREFIX=

# Inertia: set to true when using SSR server
INERTIA_SSR_ENABLED=false

MEMCACHED_HOST=127.0.0.1

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

# Mail. Use a real SMTP provider in production (host/username/password from
# your provider's dashboard). "log" writes mail to the log instead of sending.
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"

# Optional S3-compatible storage (leave blank to use local disk)
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}"

# ---------------------------------------------------------------------------
# Initial seed accounts
# ---------------------------------------------------------------------------
# Credentials created the first time you seed the database. CHANGE THESE before
# running in production — they are the super-admin and demo client logins.
# When APP_DEMO_MODE=true, the login screen shows one-click cards for these two
# accounts, so set the _PASSWORD values to known strings (e.g. 12345678) for the
# buttons to sign in. Left blank, a random password is generated on seed.
ADMIN_SEED_NAME="Super Admin"
ADMIN_SEED_EMAIL=admin@example.com
ADMIN_SEED_PASSWORD=
CLIENT_SEED_EMAIL=client@example.com
CLIENT_SEED_PASSWORD=
# Optional: pre-connect a WhatsApp Business Account when seeding the demo client.
# Leave blank — connect WhatsApp from the app UI instead.
CLIENT_SEED_WHATSAPP_SYSTEM_USER_TOKEN=
CLIENT_SEED_WABA_ID=

# ---------------------------------------------------------------------------
# AI (bring your own provider key)
# ---------------------------------------------------------------------------
AI_PROVIDER=openai
AI_OPENAI_ENABLED=true
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o-mini
OPENAI_MAX_TOKENS=4096
AI_CREDITS_PER_GENERATION=10

# Optional: Qdrant vector store for AI knowledge base / RAG
QDRANT_URL=
QDRANT_API_KEY=

# ---------------------------------------------------------------------------
# Billing gateways (set BILLING_*_ENABLED=true and credentials to enable).
# Publishable/secret keys for Stripe etc. are configured in the admin panel
# under Payment Gateways; the values below are server-side secrets only.
# ---------------------------------------------------------------------------
BILLING_STRIPE_ENABLED=false
STRIPE_SECRET=
STRIPE_WEBHOOK_SECRET=
STRIPE_SUCCESS_URL="${APP_URL}/app/pricing?checkout=success"
STRIPE_CANCEL_URL="${APP_URL}/app/pricing?checkout=canceled"

BILLING_PAYPAL_ENABLED=false
PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=
PAYPAL_SANDBOX=true
PAYPAL_WEBHOOK_ID=
PAYPAL_SUCCESS_URL="${APP_URL}/app/pricing?checkout=success"
PAYPAL_CANCEL_URL="${APP_URL}/app/pricing?checkout=canceled"

BILLING_PADDLE_ENABLED=false
PADDLE_API_KEY=
PADDLE_ENVIRONMENT=sandbox
PADDLE_WEBHOOK_SECRET=
PADDLE_SUCCESS_URL="${APP_URL}/app/pricing?checkout=success"
PADDLE_CANCEL_URL="${APP_URL}/app/pricing?checkout=canceled"

# Razorpay (India) — native Subscriptions API. Webhook: ${APP_URL}/webhooks/razorpay
BILLING_RAZORPAY_ENABLED=false
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=
RAZORPAY_WEBHOOK_SECRET=

# Cashfree (India) — native Subscriptions API (JS SDK). Webhook: ${APP_URL}/webhooks/cashfree
# Webhooks are verified with CASHFREE_CLIENT_SECRET (no separate webhook secret).
BILLING_CASHFREE_ENABLED=false
CASHFREE_CLIENT_ID=
CASHFREE_CLIENT_SECRET=
CASHFREE_SANDBOX=true
CASHFREE_RETURN_URL="${APP_URL}/app/billing?checkout=success"

# Tap (MENA/GCC) — hosted first charge + merchant-initiated saved-card renewals.
# Renewals run via the billing:charge-recurring scheduler. Webhook: ${APP_URL}/webhooks/tap
# Webhooks are verified with TAP_SECRET_KEY (no separate webhook secret).
BILLING_TAP_ENABLED=false
TAP_SECRET_KEY=
TAP_SUCCESS_URL="${APP_URL}/app/billing?checkout=success"
TAP_CANCEL_URL="${APP_URL}/app/pricing?checkout=canceled"

# ---------------------------------------------------------------------------
# Realtime — Option A: Pusher (hosted). Set BROADCAST_CONNECTION=pusher above.
# ---------------------------------------------------------------------------
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

# ---------------------------------------------------------------------------
# Realtime — Option B: Laravel Reverb (self-hosted WebSocket server, bundled).
# Set BROADCAST_CONNECTION=reverb above and run `php artisan reverb:start`.
# The frontend connects via the Pusher protocol, so point VITE_PUSHER_APP_KEY
# at REVERB_APP_KEY when using Reverb.
# ---------------------------------------------------------------------------
REVERB_APP_ID=
REVERB_APP_KEY=
REVERB_APP_SECRET=
REVERB_HOST=localhost
REVERB_PORT=8080
REVERB_SCHEME=http

# ---------------------------------------------------------------------------
# Web push notifications (VAPID). Generate with: php artisan webpush:vapid
# ---------------------------------------------------------------------------
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=
VITE_VAPID_PUBLIC_KEY="${VAPID_PUBLIC_KEY}"

# Optional: OneSignal push notifications
ONESIGNAL_APP_ID=
ONESIGNAL_REST_API_KEY=

# ---------------------------------------------------------------------------
# Social login (optional — Laravel Socialite). Configure the providers you use.
# ---------------------------------------------------------------------------
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI="${APP_URL}/auth/google/callback"
MICROSOFT_CLIENT_ID=
MICROSOFT_CLIENT_SECRET=
MICROSOFT_REDIRECT_URI="${APP_URL}/auth/microsoft/callback"

# ---------------------------------------------------------------------------
# SMS gateways — optional webhook secrets for DLR delivery status callbacks.
# Credentials are stored per-workspace in the database (Settings → SMS Gateways).
# ---------------------------------------------------------------------------
# Fast2SMS (India) — set this if you configure a DLR callback URL in the Fast2SMS dashboard.
# DLR URL: ${APP_URL}/webhooks/sms/fast2sms
FAST2SMS_WEBHOOK_SECRET=

# ---------------------------------------------------------------------------
# Error monitoring (optional — Sentry). Leave blank to disable.
# ---------------------------------------------------------------------------
SENTRY_LARAVEL_DSN=
SENTRY_TRACES_SAMPLE_RATE=0.0
