# Environment Configuration Template
# Copy this file to .env and update the values
#
# ⚠️ IMPORTANT: This is the SINGLE SOURCE OF TRUTH for all database settings.
# All database configuration should be done here ONLY. Other config files
# automatically read from these environment variables.

# Server Configuration
PORT=5000
NODE_ENV=development

# Database Configuration
# ⚠️ Configure database settings here ONLY. All other files read from these values.
# ⚠️ IMPORTANT: Use 127.0.0.1 instead of localhost to avoid IPv6 connection issues
# On cloud servers, use 127.0.0.1 for local MySQL or the actual MySQL server IP
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=clinic_pro_db

# Database Connection Pool Settings (Optional - defaults shown)
DB_CONNECTION_LIMIT=50
DB_QUEUE_LIMIT=0
DB_MAX_IDLE=10
DB_IDLE_TIMEOUT=300000
DB_ENABLE_KEEP_ALIVE=true
DB_KEEP_ALIVE_INITIAL_DELAY=10000
DB_CONNECT_TIMEOUT=30000
DB_WAIT_FOR_CONNECTIONS=true
DB_MULTIPLE_STATEMENTS=false

# Sequelize Pool Settings (Optional - defaults shown)
DB_POOL_MAX=50
DB_POOL_MIN=0
DB_POOL_ACQUIRE=30000
DB_POOL_IDLE=10000

# Database Character Set & Timezone (Optional - defaults shown)
DB_CHARSET=utf8mb4
DB_COLLATE=utf8mb4_unicode_ci
DB_TIMEZONE=+00:00

# Database Logging (Optional)
DB_LOGGING=false

# Unix Socket Path (Optional - for local MySQL connections)
# DB_SOCKET=/var/run/mysqld/mysqld.sock

# Note: After changing database settings, run this to update config.json (for Sequelize CLI):
# node migrations/generate-config.js

# JWT Secret
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
JWT_EXPIRE=7d

# CORS Settings
CORS_ORIGIN=http://localhost:3000

# Upload Settings
MAX_FILE_SIZE=10485760
UPLOAD_PATH=./uploads

# Email Configuration (Optional)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_app_password

# App Settings
APP_NAME=Clinic Pro V3
APP_URL=http://localhost:5000

