# Environment Configuration Template for KPI Analysis Application
# Copy this file to .env and update the values with your actual configuration

# Application Settings
DEBUG=true
SECRET_KEY=your-super-secret-key-change-this-in-production

# Nextcloud Configuration
NEXTCLOUD_BASE_URL=https://nc.mapan.co.id
NEXTCLOUD_OAUTH_CLIENT_ID=your-nextcloud-oauth-client-id
NEXTCLOUD_OAUTH_CLIENT_SECRET=your-nextcloud-oauth-client-secret
NEXTCLOUD_REDIRECT_URI=http://localhost:8000/auth/nextcloud/callback
NEXTCLOUD_KPI_FOLDER=/KPI_Files
NEXTCLOUD_USERNAME=your-nextcloud-username

# OpenAI Configuration
OPENAI_API_KEY=your-openai-api-key
OPENAI_MODEL=gpt-4
OPENAI_MAX_TOKENS=2000
OPENAI_TEMPERATURE=0.7

# LDAP/Active Directory Configuration
LDAP_SERVER=ldap.your-company.com
LDAP_PORT=389
LDAP_USE_SSL=true
LDAP_BASE_DN=DC=your-company,DC=com
LDAP_BIND_DN=CN=service-account,OU=Service Accounts,DC=your-company,DC=com
LDAP_BIND_PASSWORD=your-ldap-password

# LDAP Group Configuration (Required for access control)
LDAP_GROUP_BASE_DN=DC=your-company,DC=com
LDAP_KPI_GROUP_DN=CN=KPI_Users,OU=Groups,DC=your-company,DC=com
LDAP_KPI_GROUP_NAME=KPI_Users
LDAP_GROUP_MEMBER_ATTRIBUTE=member
LDAP_USER_MEMBER_ATTRIBUTE=memberOf

# Fallback Authentication (for testing/development when LDAP not available)
ENABLE_FALLBACK_AUTH=false
FALLBACK_ADMIN_USERNAME=admin
FALLBACK_ADMIN_PASSWORD=super
FALLBACK_ADMIN_ROLE=admin
FALLBACK_ADMIN_EMAIL=admin@kpi-system.local

# Database Settings
DATABASE_URL=sqlite:///./data/kpi_analysis.db

# Email Configuration (Optional)
SMTP_SERVER=smtp.your-company.com
SMTP_PORT=587
SMTP_USERNAME=your-email@your-company.com
SMTP_PASSWORD=your-email-password
EMAIL_FROM=KPI Analysis System <kpi@your-company.com>

# Logging
LOG_LEVEL=INFO