#### BULLMQ ADMIN DASHBOARD ####

# HTTP Basic Auth credentials for /apps/queues.
# The username defaults to "chartbrew" and a random password is generated on first startup when these are empty.
CB_BULLMQ_USERNAME=
CB_BULLMQ_PASSWORD=

########################################

#### DATASET INTELLIGENCE ####

CB_DATASET_INTELLIGENCE_ENABLED=true
CB_DATASET_INTELLIGENCE_AUTO_PROFILE=true
CB_DATASET_INTELLIGENCE_PROFILE_TTL_HOURS=168
CB_DATASET_INTELLIGENCE_MAX_SAMPLE_ROWS=200
CB_DATASET_INTELLIGENCE_MAX_FIELDS=200
CB_DATASET_INTELLIGENCE_LLM_ENRICHMENT=false
CB_DATASET_INTELLIGENCE_BACKFILL_BATCH_SIZE=25

########################################

#### WORKSPACE OBSERVATIONS ####

CB_OBSERVATIONS_ENABLED=true
CB_OBSERVATIONS_AUTO_MONITOR_CHARTS=false
CB_OBSERVATIONS_MINIMUM_SAMPLES=7
CB_OBSERVATIONS_MAXIMUM_MONITORS=100
# Covers two completed years plus the open year for daily charts.
CB_OBSERVATIONS_MAX_SNAPSHOTS_PER_REFRESH=1200
CB_OBSERVATIONS_DEDUPLICATION_COOLDOWN_DAYS=7
CB_OBSERVATIONS_PUBLISH_SCORE=0.75
CB_OBSERVATIONS_MINIMUM_RELATIVE_CHANGE=0.1
CB_OBSERVATIONS_MINIMUM_PERCENTAGE_POINT_CHANGE=1
CB_OBSERVATIONS_SCORING_VERSION=deterministic-v1
# LLM auditing is shadow-only and disabled by default.
CB_OBSERVATIONS_LLM_AUDIT_MODE=off
CB_OBSERVATIONS_LLM_AUDIT_MODEL=gpt-5.4-nano
CB_OBSERVATIONS_LLM_AUDIT_SAMPLE_RATE=0.05
CB_OBSERVATIONS_LLM_AUDIT_DAILY_LIMIT=20
CB_OBSERVATIONS_LLM_AUDIT_DAILY_TOKEN_LIMIT=20000
CB_AI_EPHEMERAL_SESSION_TTL_HOURS=24

########################################

#### DATA RETENTION ####

# Set a category to 0 to disable its cleanup.
CB_UPDATE_AUDIT_RETENTION_DAYS=30
CB_UPDATE_AUDIT_FAILED_RETENTION_DAYS=90
CB_METRIC_SNAPSHOT_RETENTION_DAYS=90
CB_METRIC_EVALUATION_RETENTION_DAYS=730
CB_METRIC_ROLLUP_RETENTION_DAYS=730
CB_OBSERVATION_RESOLVED_RETENTION_DAYS=365
CB_OBSERVATION_AUDIT_RETENTION_DAYS=90
CB_DATA_RETENTION_BATCH_SIZE=1000
CB_DATA_RETENTION_MAX_RUNTIME_SECONDS=300

########################################

#### APPLICATION VARIABLES ####

### Database connection parameters
CB_DB_NAME=chartbrew
CB_DB_USERNAME=
CB_DB_PASSWORD=
CB_DB_HOST=localhost
CB_DB_PORT=3306
CB_DB_CERT=
CB_DB_SSL=
CB_DB_SSL_KEY=
CB_DB_SSL_CERT=

# set to 'mysql' or 'postgres'
CB_DB_DIALECT=mysql

# Redis connection parameters
CB_REDIS_HOST=localhost
CB_REDIS_PORT=6379
CB_REDIS_PASSWORD=
# Optional runtime-cache specific Redis overrides. If unset, runtime cache falls back to CB_REDIS_*.
# CB_RUNTIME_REDIS_HOST=
# CB_RUNTIME_REDIS_PORT=
# CB_RUNTIME_REDIS_PASSWORD=
# CB_RUNTIME_REDIS_DB=
# CB_RUNTIME_REDIS_CA=
# CB_RUNTIME_REDIS_CLUSTER_NODES=
# CB_RUNTIME_CACHE_DEBUG=false
# Maximum durable PreparedData snapshot size. Oversized snapshots are not truncated.
CB_PREPARED_SNAPSHOT_MAX_BYTES=5242880

### Legacy secret used to decrypt existing data. Keep it private and stable.
CB_SECRET=
# Temporary migration switch for share tokens signed with CB_SECRET. Leave disabled on new installs.
CB_ALLOW_LEGACY_SHARE_TOKENS=0
## The new secret key used for encrypting data
CB_ENCRYPTION_KEY=

### The API host string used on the server app
# Set this to 0.0.0.0 when using docker AND proxying it through apache or nginx
CB_API_HOST=localhost
CB_API_PORT=4019

### Used in the client app

# The address where the front-end app sits and port
VITE_APP_CLIENT_HOST=http://localhost:4018
VITE_APP_CLIENT_PORT=4018

# The address where the backend API sits
VITE_APP_API_HOST=http://localhost:4019

# Email connection parameters for sending team signup invites and forgot password emails
CB_MAIL_HOST=smtp.gmail.com
CB_MAIL_USER=
CB_MAIL_PASS=
CB_MAIL_PORT=465
CB_MAIL_SECURE=true
# The admin email from which all the emails are delivered
CB_ADMIN_MAIL=hello@example.com

# Restrict users from having their own team
# 0 - users will have their own team
# 1 - users can only be part of teams they are invited to
CB_RESTRICT_TEAMS=0

# Restrict users from creating their own accounts unless invited
# 0 - users can create their own accounts
# 1 - users can only create accounts with invite links
CB_RESTRICT_SIGNUP=0

# Google cloud client ID information (To enable Google integrations)
CB_GOOGLE_CLIENT_ID=
CB_GOOGLE_CLIENT_SECRET=

# OpenAI API key
CB_OPENAI_API_KEY=
CB_OPENAI_MODEL=gpt-5.4-mini

## Slack integration
# The client ID of the Slack app is used in both server and client apps
VITE_APP_SLACK_CLIENT_ID=
CB_SLACK_CLIENT_SECRET=
CB_SLACK_SIGNING_SECRET=

# Private network flag
CB_ALLOW_PRIVATE_NETWORK_CALLS=false

########################################
