# PyCharter Configuration
#
# Copy this file to pycharter.cfg and update with your values.
# Config keys use the same names as environment variables (e.g. PYCHARTER_DATABASE_URL).
# Environment variables override values in this file.
#
# Config file search order: current directory, ~/.pycharter/, then project root
# (directory containing alembic.ini).

# =============================================================================
# [database]
# =============================================================================
# Database connection for API, worker, migrations, wiki, and metadata store.
# Required for: pycharter api, pycharter db init, pycharter db seed, etc.

[database]
PYCHARTER_DATABASE_URL = postgresql://user:password@localhost:5432/pycharter

# =============================================================================
# [variables]
# =============================================================================
# Custom variables for ${VAR} substitution in YAML/JSON config files
# (extract.yaml, load.yaml, transform configs, ETL pipelines).
#
# Resolution order: 1) context dict  2) environment variables  3) [variables]
#   4) [etl] section.
#
# In your configs you can use:
#   apikey: ${FMP_API_KEY}                    # simple substitution
#   timeout: ${REQUEST_TIMEOUT:-30}           # with default if unset
#   apikey: ${FMP_API_KEY:?API key required} # required (fails if missing)

[variables]
# FMP_API_KEY = your_api_key_here
# API_HOST = api.example.com
# REQUEST_TIMEOUT = 30

# =============================================================================
# [etl]
# =============================================================================
# ETL-specific defaults. Same ${VAR} resolution as [variables], but checked
# after [variables]. Use for shared ETL defaults (timeouts, batch sizes, etc.).

[etl]
# default_timeout = 30
# default_batch_size = 1000

# =============================================================================
# [auth]
# =============================================================================
# API authentication. For dev/single-user: set initial credentials + JWT secret.
# For production: use an auth service (PYCHARTER_AUTH_SERVICE_URL) or disable
# auth (PYCHARTER_AUTH_DISABLED=1).
#
# Keys must match exactly (env-style names). Short names like "initial_username"
# are not read by the code.

[auth]
# Disable auth (all routes open; useful for local dev).
# PYCHARTER_AUTH_DISABLED = 1

# Dev / single-user: credentials for POST /auth/login.
PYCHARTER_AUTH_INITIAL_USERNAME = admin
PYCHARTER_AUTH_INITIAL_PASSWORD = changeme

# JWT signing secret (required when using initial credentials or issuing tokens).
PYCHARTER_AUTH_JWT_SECRET = your-secret-change-in-production

# Production: external auth service (optional).
# PYCHARTER_AUTH_SERVICE_URL = https://auth.example.com
# PYCHARTER_AUTH_SERVICE_INTROSPECT_PATH = /oauth/introspect

# =============================================================================
# [ui]
# =============================================================================
# Global UI color theme and app name (when UI is served by pycharter ui or API).

[ui]
# light, dark, system, or named palettes: ocean, forest, sunset, high-contrast, sepia, violet, cathay.
# PYCHARTER_UI_THEME = light
# Website / app name shown in the UI (default: PyCharter).
# PYCHARTER_UI_APP_NAME = PyCharter
