Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / Platform

Reference

Settings reference

Every field of the Settings class in config/settings.py with its type, default, CLUSTER_ERP_ environment variable, reading code, and meaning.

This page lists every field of Settings in src/cluster_erp/config/settings.py, the validation rules that run when settings load, and the derived properties. It is a lookup table for developers and operators. Which variables a Linux node sets, and how, is in the configuration reference.

Scope and source

  • Defined in: src/cluster_erp/config/settings.py (Settings)
  • Count: 183 fields, counted as the annotated class attributes between the class Settings line and the validator (src/cluster_erp/config/settings.py:64-738). The four annotated lines of the RegionAddress dataclass above it are not settings.

Settings is a Pydantic BaseSettings class. It reads environment variables with the prefix CLUSTER_ERP_, case-insensitively, and also reads a .env file in the working directory (src/cluster_erp/config/settings.py:64-70). The environment variable of a field is CLUSTER_ERP_ followed by the field name in upper case.

The columns are:

  • Default: the default in code. Values that are or could be secrets, host names, addresses, or paths on a node are shown as <value>, following the security disclosure policy of the documentation standard. Long lists say "see source".
  • Read in: the folders or modules whose code reads the field as settings.<name> or with getattr(settings, "<name>"), found with grep over src/cluster_erp. config means the field is read only inside settings.py itself, by a derived property. - means no reader was found by that method.
  • Meaning: one sentence from the comment above the field. "No description in code." means there is no comment.

Database connection

Setting Type Default Environment variable Read in Meaning Source
db_host str "localhost" CLUSTER_ERP_DB_HOST config Host of the default PostgreSQL server. src/cluster_erp/config/settings.py:72
db_port int 5432 CLUSTER_ERP_DB_PORT config Port of the default PostgreSQL server. src/cluster_erp/config/settings.py:73
db_name str "cluster_erp" CLUSTER_ERP_DB_NAME server Name of the default database. src/cluster_erp/config/settings.py:74
db_user str "cluster_erp" CLUSTER_ERP_DB_USER config Database role of the application. src/cluster_erp/config/settings.py:75
db_password str <value> CLUSTER_ERP_DB_PASSWORD config Password of the database role. src/cluster_erp/config/settings.py:76
sql_echo bool False CLUSTER_ERP_SQL_ECHO core Logs every SQL statement when on. src/cluster_erp/config/settings.py:181
db_pool_size int 20 CLUSTER_ERP_DB_POOL_SIZE core, server Pool size of the default engine. src/cluster_erp/config/settings.py:243
db_pool_max_overflow int 10 CLUSTER_ERP_DB_POOL_MAX_OVERFLOW core, server Extra connections the default pool may open. src/cluster_erp/config/settings.py:244
db_pool_timeout_seconds int 10 CLUSTER_ERP_DB_POOL_TIMEOUT_SECONDS core Seconds a request waits for a pooled connection. src/cluster_erp/config/settings.py:248

Multi-tenancy, regions, and residency

These fields configure the multi-tenant mode and data residency, documented at mechanism level in multi-tenancy and data residency check.

Setting Type Default Environment variable Read in Meaning Source
multi_tenant bool False CLUSTER_ERP_MULTI_TENANT core, server Turns on one database per tenant with a control-plane database. src/cluster_erp/config/settings.py:82
control_db_name str "cluster_control" CLUSTER_ERP_CONTROL_DB_NAME core, server Name of the control-plane database. src/cluster_erp/config/settings.py:83
tenant_db_prefix str "cluster_t_" CLUSTER_ERP_TENANT_DB_PREFIX core Prefix of tenant database names. src/cluster_erp/config/settings.py:84
regions str "tr" CLUSTER_ERP_REGIONS server Comma list of region codes; the first is the default. src/cluster_erp/config/settings.py:93
region_db_urls str <value> CLUSTER_ERP_REGION_DB_URLS server JSON object naming the database server of each non-default region. src/cluster_erp/config/settings.py:94
node_country str "" CLUSTER_ERP_NODE_COUNTRY server ISO 3166-1 alpha-2 country this node serves; empty means no residency policy. src/cluster_erp/config/settings.py:111
country_nodes str "" CLUSTER_ERP_COUNTRY_NODES server JSON object mapping countries to their node base URLs. src/cluster_erp/config/settings.py:114
console_origins str "" CLUSTER_ERP_CONSOLE_ORIGINS server Comma list of https origins allowed to read the fleet endpoint from a browser. src/cluster_erp/config/settings.py:122
vendor_admin_username str <value> CLUSTER_ERP_VENDOR_ADMIN_USERNAME server First operator account created at boot when none exists. src/cluster_erp/config/settings.py:126
vendor_admin_password str <value> CLUSTER_ERP_VENDOR_ADMIN_PASSWORD server Password of that first operator account. src/cluster_erp/config/settings.py:127
vendor_require_totp bool True CLUSTER_ERP_VENDOR_REQUIRE_TOTP server Requires a second factor for every operator sign-in. src/cluster_erp/config/settings.py:131
vendor_allowed_ips str <value> CLUSTER_ERP_VENDOR_ALLOWED_IPS server Addresses allowed to reach the operator console API. src/cluster_erp/config/settings.py:134
tenant_pool_size int 5 CLUSTER_ERP_TENANT_POOL_SIZE core Pool size of each tenant engine. src/cluster_erp/config/settings.py:249
tenant_pool_max_overflow int 5 CLUSTER_ERP_TENANT_POOL_MAX_OVERFLOW core Extra connections of each tenant pool. src/cluster_erp/config/settings.py:250
tenant_max_engines int 32 CLUSTER_ERP_TENANT_MAX_ENGINES core Maximum number of cached tenant engines. src/cluster_erp/config/settings.py:251

Server process

Setting Type Default Environment variable Read in Meaning Source
server_host str <value> CLUSTER_ERP_SERVER_HOST server Bind address of the development server; the default is the wildcard address. src/cluster_erp/config/settings.py:136
server_port int 8000 CLUSTER_ERP_SERVER_PORT server Port of the development server. src/cluster_erp/config/settings.py:137
server_workers int 1 CLUSTER_ERP_SERVER_WORKERS core, server Number of worker processes; clamped to 1 on Windows. src/cluster_erp/config/settings.py:149
trust_proxy_headers bool False CLUSTER_ERP_TRUST_PROXY_HEADERS server Lets uvicorn interpret forwarded headers from trusted proxies. src/cluster_erp/config/settings.py:158
trusted_proxy_ips str <value> CLUSTER_ERP_TRUSTED_PROXY_IPS server Proxies allowed to set forwarded headers; the default is the loopback address. src/cluster_erp/config/settings.py:162
server_access_log bool False CLUSTER_ERP_SERVER_ACCESS_LOG server Turns on uvicorn's own access log. src/cluster_erp/config/settings.py:167
server_keep_alive_seconds int 5 CLUSTER_ERP_SERVER_KEEP_ALIVE_SECONDS server Seconds an idle keep-alive connection stays open. src/cluster_erp/config/settings.py:175
debug bool False CLUSTER_ERP_DEBUG server Debug mode: reload, API docs pages, verbose logs. src/cluster_erp/config/settings.py:176
max_request_body_bytes int 26_214_400 CLUSTER_ERP_MAX_REQUEST_BODY_BYTES server Largest accepted request body; larger bodies get HTTP 413. src/cluster_erp/config/settings.py:345
enabled_modules list[str] see source CLUSTER_ERP_ENABLED_MODULES server Modules to load, in order; the default lists all 28. src/cluster_erp/config/settings.py:535
readiness_timeout_seconds float 2.0 CLUSTER_ERP_READINESS_TIMEOUT_SECONDS server Deadline of each check of GET /ready. src/cluster_erp/config/settings.py:647

Authentication, sessions, and licensing

These fields are read by the auth and app_store modules, documented in authentication and sessions and app store, licensing, and entitlements.

Setting Type Default Environment variable Read in Meaning Source
secret_key str <value> CLUSTER_ERP_SECRET_KEY auth, core, mail, server Signing secret; must be set, at least 32 characters, and not weak outside debug mode. src/cluster_erp/config/settings.py:186
bootstrap_admin_username str <value> CLUSTER_ERP_BOOTSTRAP_ADMIN_USERNAME server User name of the first administrator of a fresh install. src/cluster_erp/config/settings.py:195
bootstrap_admin_email str <value> CLUSTER_ERP_BOOTSTRAP_ADMIN_EMAIL server E-mail of the first administrator. src/cluster_erp/config/settings.py:196
bootstrap_admin_password str <value> CLUSTER_ERP_BOOTSTRAP_ADMIN_PASSWORD server Password of the first administrator; generated when empty. src/cluster_erp/config/settings.py:197
bootstrap_admin_password_hash str <value> CLUSTER_ERP_BOOTSTRAP_ADMIN_PASSWORD_HASH server Pre-hashed password used by tenant provisioning. src/cluster_erp/config/settings.py:201
bootstrap_password_file str <value> CLUSTER_ERP_BOOTSTRAP_PASSWORD_FILE server File that receives a generated first password. src/cluster_erp/config/settings.py:205
bootstrap_admin_exclusive bool False CLUSTER_ERP_BOOTSTRAP_ADMIN_EXCLUSIVE server Deactivates seeded default accounts during self-service provisioning. src/cluster_erp/config/settings.py:258
jwt_access_expire_minutes int 30 CLUSTER_ERP_JWT_ACCESS_EXPIRE_MINUTES auth Lifetime of an access token. src/cluster_erp/config/settings.py:307
jwt_refresh_expire_days int 7 CLUSTER_ERP_JWT_REFRESH_EXPIRE_DAYS auth Lifetime of a refresh token with "remember me". src/cluster_erp/config/settings.py:308
jwt_session_hours int 12 CLUSTER_ERP_JWT_SESSION_HOURS auth Lifetime of a refresh chain without "remember me". src/cluster_erp/config/settings.py:312
login_rate_limit_per_minute int 10 CLUSTER_ERP_LOGIN_RATE_LIMIT_PER_MINUTE auth Sign-in attempts per client per minute before HTTP 429. src/cluster_erp/config/settings.py:316
auth_cache_seconds float 5.0 CLUSTER_ERP_AUTH_CACHE_SECONDS auth, server Seconds a request may reuse cached permissions and policies. src/cluster_erp/config/settings.py:320
password_min_length int 8 CLUSTER_ERP_PASSWORD_MIN_LENGTH Omitted under the security disclosure policy. Minimum password length setting. src/cluster_erp/config/settings.py:327
jwt_refresh_reuse_grace_seconds int 15 CLUSTER_ERP_JWT_REFRESH_REUSE_GRACE_SECONDS auth Seconds a rotated refresh token stays accepted. src/cluster_erp/config/settings.py:332
abac_strict_permission_codes str "" CLUSTER_ERP_ABAC_STRICT_PERMISSION_CODES auth Permission codes that require a satisfied attribute policy. src/cluster_erp/config/settings.py:339
license_public_key str <value> CLUSTER_ERP_LICENSE_PUBLIC_KEY app_store, server Public key that license files must be signed with; empty disables licensing. src/cluster_erp/config/settings.py:569

Signup and public endpoints

The signup fields apply only in multi-tenant mode, where the signup routes are mounted (src/cluster_erp/server/app.py:1440-1450). See signup.

Setting Type Default Environment variable Read in Meaning Source
signup_payment_provider str "offline" CLUSTER_ERP_SIGNUP_PAYMENT_PROVIDER server Payment port of self-service signup. src/cluster_erp/config/settings.py:263
signup_trial_days int 30 CLUSTER_ERP_SIGNUP_TRIAL_DAYS server Trial window of a new signup. src/cluster_erp/config/settings.py:264
signup_enabled bool True CLUSTER_ERP_SIGNUP_ENABLED server Opens or closes self-service signup on a multi-tenant node. src/cluster_erp/config/settings.py:271
signup_rate_limit_per_hour int 5 CLUSTER_ERP_SIGNUP_RATE_LIMIT_PER_HOUR server Signup requests per client address per hour. src/cluster_erp/config/settings.py:272
signup_verify_email bool True CLUSTER_ERP_SIGNUP_VERIFY_EMAIL server Requires domain verification by e-mail before provisioning. src/cluster_erp/config/settings.py:277
signup_verify_ttl_hours int 48 CLUSTER_ERP_SIGNUP_VERIFY_TTL_HOURS server Lifetime of a verification link. src/cluster_erp/config/settings.py:279
signup_mail_transport str "spool" CLUSTER_ERP_SIGNUP_MAIL_TRANSPORT server Transport of verification mail: smtp or spool. src/cluster_erp/config/settings.py:283
signup_mail_spool_dir str <value> CLUSTER_ERP_SIGNUP_MAIL_SPOOL_DIR server Folder of spooled verification mails. src/cluster_erp/config/settings.py:284
signup_smtp_host str <value> CLUSTER_ERP_SIGNUP_SMTP_HOST server SMTP host for verification mail. src/cluster_erp/config/settings.py:285
signup_smtp_port int 587 CLUSTER_ERP_SIGNUP_SMTP_PORT server SMTP port for verification mail. src/cluster_erp/config/settings.py:286
signup_smtp_user str <value> CLUSTER_ERP_SIGNUP_SMTP_USER server SMTP user for verification mail. src/cluster_erp/config/settings.py:287
signup_smtp_password str <value> CLUSTER_ERP_SIGNUP_SMTP_PASSWORD server SMTP password for verification mail. src/cluster_erp/config/settings.py:288
signup_mail_from str <value> CLUSTER_ERP_SIGNUP_MAIL_FROM server Sender of verification mail. src/cluster_erp/config/settings.py:289
public_base_url str <value> CLUSTER_ERP_PUBLIC_BASE_URL server Absolute base URL used in verification links; empty means relative links. src/cluster_erp/config/settings.py:292
security_contact str <value> CLUSTER_ERP_SECURITY_CONTACT server Contact of /.well-known/security.txt; empty answers 404. src/cluster_erp/config/settings.py:296
security_policy_url str <value> CLUSTER_ERP_SECURITY_POLICY_URL server Policy URL in security.txt. src/cluster_erp/config/settings.py:297
security_expires_days int 180 CLUSTER_ERP_SECURITY_EXPIRES_DAYS server Days until the Expires field of security.txt. src/cluster_erp/config/settings.py:298
signup_notice_dir str <value> CLUSTER_ERP_SIGNUP_NOTICE_DIR server Folder of the privacy notice shown before signup. src/cluster_erp/config/settings.py:305
signup_notice_version str "" CLUSTER_ERP_SIGNUP_NOTICE_VERSION server Version recorded with every notice acceptance. src/cluster_erp/config/settings.py:306

File storage and backups

Setting Type Default Environment variable Read in Meaning Source
backup_db_user str <value> CLUSTER_ERP_BACKUP_DB_USER server Database role of the backup runner. src/cluster_erp/config/settings.py:216
backup_db_password str <value> CLUSTER_ERP_BACKUP_DB_PASSWORD server Password of the backup role. src/cluster_erp/config/settings.py:217
backup_db_password_file str <value> CLUSTER_ERP_BACKUP_DB_PASSWORD_FILE server File holding the backup role's password. src/cluster_erp/config/settings.py:222
console_backup_enabled bool True CLUSTER_ERP_CONSOLE_BACKUP_ENABLED server Allows on-demand backups from the operator console. src/cluster_erp/config/settings.py:225
backup_dir str <value> CLUSTER_ERP_BACKUP_DIR core, server Folder of database dumps. src/cluster_erp/config/settings.py:226
backup_keep int 14 CLUSTER_ERP_BACKUP_KEEP server Newest dumps kept per database. src/cluster_erp/config/settings.py:227
backup_keep_days int 0 CLUSTER_ERP_BACKUP_KEEP_DAYS server Age guard for pruning dumps; 0 is off. src/cluster_erp/config/settings.py:233
pg_bin_dir str <value> CLUSTER_ERP_PG_BIN_DIR server Folder of pg_dump and pg_restore. src/cluster_erp/config/settings.py:234
storage_backend str "local" CLUSTER_ERP_STORAGE_BACKEND server File storage: local or s3. src/cluster_erp/config/settings.py:347
storage_path str <value> CLUSTER_ERP_STORAGE_PATH server Folder of the local storage backend. src/cluster_erp/config/settings.py:348
s3_bucket str <value> CLUSTER_ERP_S3_BUCKET server S3 bucket; required when storage_backend is s3. src/cluster_erp/config/settings.py:349
s3_region str <value> CLUSTER_ERP_S3_REGION server S3 region. src/cluster_erp/config/settings.py:350
s3_access_key str <value> CLUSTER_ERP_S3_ACCESS_KEY server S3 access key. src/cluster_erp/config/settings.py:351
s3_secret_key str <value> CLUSTER_ERP_S3_SECRET_KEY server S3 secret key. src/cluster_erp/config/settings.py:352
s3_endpoint_url str <value> CLUSTER_ERP_S3_ENDPOINT_URL server S3 endpoint for S3-compatible stores. src/cluster_erp/config/settings.py:353
s3_prefix str <value> CLUSTER_ERP_S3_PREFIX server Key prefix inside the bucket. src/cluster_erp/config/settings.py:354
storage_encryption_key str <value> CLUSTER_ERP_STORAGE_ENCRYPTION_KEY server Key for encryption at rest of stored files; 64 hex characters; required in multi-tenant mode. src/cluster_erp/config/settings.py:359
control_encryption_key str <value> CLUSTER_ERP_CONTROL_ENCRYPTION_KEY core Seals control-plane secrets that must be read back. src/cluster_erp/config/settings.py:362
attachment_allowed_extensions list[str] see source CLUSTER_ERP_ATTACHMENT_ALLOWED_EXTENSIONS core, server File extensions the generic uploader accepts. src/cluster_erp/config/settings.py:368
backup_encryption_key str <value> CLUSTER_ERP_BACKUP_ENCRYPTION_KEY core, server Key for encrypted dumps; required in multi-tenant mode. src/cluster_erp/config/settings.py:377
wal_archive_dir str <value> CLUSTER_ERP_WAL_ARCHIVE_DIR server Folder of the optional WAL archive. src/cluster_erp/config/settings.py:392
cold_storage_dir str <value> CLUSTER_ERP_COLD_STORAGE_DIR server Folder of the optional cold CSV export. src/cluster_erp/config/settings.py:393

Mail

Setting Type Default Environment variable Read in Meaning Source
mail_relay_none bool False CLUSTER_ERP_MAIL_RELAY_NONE server Declares that the node sends no system mail. src/cluster_erp/config/settings.py:384
mail_relay_country str "" CLUSTER_ERP_MAIL_RELAY_COUNTRY server Country of the system mail relay. src/cluster_erp/config/settings.py:388
smtp_host str <value> CLUSTER_ERP_SMTP_HOST core, server SMTP host of the system mailbox; empty means not configured. src/cluster_erp/config/settings.py:394
smtp_port int 587 CLUSTER_ERP_SMTP_PORT core SMTP port of the system mailbox. src/cluster_erp/config/settings.py:395
smtp_user str <value> CLUSTER_ERP_SMTP_USER core SMTP user of the system mailbox. src/cluster_erp/config/settings.py:396
smtp_password str <value> CLUSTER_ERP_SMTP_PASSWORD core SMTP password of the system mailbox. src/cluster_erp/config/settings.py:397
smtp_use_tls bool True CLUSTER_ERP_SMTP_USE_TLS core Uses STARTTLS for the system mailbox. src/cluster_erp/config/settings.py:398
smtp_from_email str <value> CLUSTER_ERP_SMTP_FROM_EMAIL core Sender address; required when smtp_host is set. src/cluster_erp/config/settings.py:399
smtp_from_name str "Cluster ERP" CLUSTER_ERP_SMTP_FROM_NAME core Sender display name. src/cluster_erp/config/settings.py:400
mail_encryption_key str <value> CLUSTER_ERP_MAIL_ENCRYPTION_KEY mail Key that seals stored mail account secrets; required in multi-tenant mode. src/cluster_erp/config/settings.py:408
mail_attachment_max_bytes int 10 * 1024 * 1024 CLUSTER_ERP_MAIL_ATTACHMENT_MAX_BYTES mail Largest attachment the mail composer accepts. src/cluster_erp/config/settings.py:412
mail_sync_limit int 30 CLUSTER_ERP_MAIL_SYNC_LIMIT mail Recent inbox messages pulled per sync. src/cluster_erp/config/settings.py:414

Business defaults

Setting Type Default Environment variable Read in Meaning Source
allow_project_to_project_stock_transfer bool False CLUSTER_ERP_ALLOW_PROJECT_TO_PROJECT_STOCK_TRANSFER inventory Allows direct stock ownership transfer between projects. src/cluster_erp/config/settings.py:184
list_count_cap int 10_000 CLUSTER_ERP_LIST_COUNT_CAP core, server Lists count matching rows up to this cap; 0 means exact counts. src/cluster_erp/config/settings.py:324
rfq_portal_token_days int 30 CLUSTER_ERP_RFQ_PORTAL_TOKEN_DAYS procurement Lifetime of supplier-portal invitation links. src/cluster_erp/config/settings.py:364
tcmb_url str <value> CLUSTER_ERP_TCMB_URL currencies Source of daily exchange rates; the default is the public daily XML of the Central Bank of the Republic of Türkiye. src/cluster_erp/config/settings.py:416
tcmb_sync_on_startup bool False CLUSTER_ERP_TCMB_SYNC_ON_STARTUP - Exchange-rate sync at start-up. src/cluster_erp/config/settings.py:417
tcmb_timeout_seconds int 15 CLUSTER_ERP_TCMB_TIMEOUT_SECONDS currencies Timeout of the exchange-rate fetch. src/cluster_erp/config/settings.py:418
nesting_low_utilization_threshold int 60 CLUSTER_ERP_NESTING_LOW_UTILIZATION_THRESHOLD nesting Utilisation percentage below which nesting raises a low-utilisation alert. src/cluster_erp/config/settings.py:420
default_currency str "USD" CLUSTER_ERP_DEFAULT_CURRENCY procurement Default currency code. src/cluster_erp/config/settings.py:622
pr_approval_threshold_amount int 50000 CLUSTER_ERP_PR_APPROVAL_THRESHOLD_AMOUNT - Purchase request approval threshold amount. src/cluster_erp/config/settings.py:623
pr_approval_threshold_currency str "TRY" CLUSTER_ERP_PR_APPROVAL_THRESHOLD_CURRENCY - Currency of that threshold. src/cluster_erp/config/settings.py:624

Analytics

Setting Type Default Environment variable Read in Meaning Source
analytics_quantile_type int 1 CLUSTER_ERP_ANALYTICS_QUANTILE_TYPE analytics Quantile definition used everywhere: 1 (no interpolation) or 7 (linear). src/cluster_erp/config/settings.py:439
analytics_trimmed_mean_pct Decimal Decimal("10") CLUSTER_ERP_ANALYTICS_TRIMMED_MEAN_PCT analytics Percentage cut from each tail for the trimmed mean. src/cluster_erp/config/settings.py:442
analytics_mad_sigma_constant Decimal Decimal("1.4826") CLUSTER_ERP_ANALYTICS_MAD_SIGMA_CONSTANT analytics MAD to sigma consistency constant. src/cluster_erp/config/settings.py:446
analytics_min_n_for_zscore int 11 CLUSTER_ERP_ANALYTICS_MIN_N_FOR_ZSCORE analytics Minimum observations for a z-score screen. src/cluster_erp/config/settings.py:451
analytics_min_iqr_for_fence Decimal Decimal("0") CLUSTER_ERP_ANALYTICS_MIN_IQR_FOR_FENCE analytics Minimum interquartile range for an IQR fence. src/cluster_erp/config/settings.py:454
analytics_abc_cutoff_a_pct Decimal Decimal("80") CLUSTER_ERP_ANALYTICS_ABC_CUTOFF_A_PCT analytics Cumulative value share that ends class A. src/cluster_erp/config/settings.py:460
analytics_abc_cutoff_b_pct Decimal Decimal("95") CLUSTER_ERP_ANALYTICS_ABC_CUTOFF_B_PCT analytics Cumulative value share that ends class B. src/cluster_erp/config/settings.py:461
analytics_abc_hysteresis_pct Decimal Decimal("2") CLUSTER_ERP_ANALYTICS_ABC_HYSTERESIS_PCT analytics Margin an item must cross before it changes ABC class. src/cluster_erp/config/settings.py:468
analytics_abc_min_periods int 3 CLUSTER_ERP_ANALYTICS_ABC_MIN_PERIODS analytics Minimum periods with demand before ABC classification. src/cluster_erp/config/settings.py:473
analytics_sbc_adi_threshold Decimal Decimal("1.32") CLUSTER_ERP_ANALYTICS_SBC_ADI_THRESHOLD analytics ADI threshold of SBC demand classification. src/cluster_erp/config/settings.py:478
analytics_sbc_cv2_threshold Decimal Decimal("0.49") CLUSTER_ERP_ANALYTICS_SBC_CV2_THRESHOLD analytics CV squared threshold of SBC demand classification. src/cluster_erp/config/settings.py:479
analytics_sbc_min_occurrences int 3 CLUSTER_ERP_ANALYTICS_SBC_MIN_OCCURRENCES analytics Minimum non-zero demand occurrences for SBC. src/cluster_erp/config/settings.py:481
analytics_profile_exact_max_rows int 200_000 CLUSTER_ERP_ANALYTICS_PROFILE_EXACT_MAX_ROWS analytics Row count above which a profile uses a sample. src/cluster_erp/config/settings.py:487
analytics_profile_sample_rows int 50_000 CLUSTER_ERP_ANALYTICS_PROFILE_SAMPLE_ROWS analytics Sample size of a sampled profile. src/cluster_erp/config/settings.py:488
analytics_profile_top_values int 10 CLUSTER_ERP_ANALYTICS_PROFILE_TOP_VALUES analytics Most frequent values returned per column profile. src/cluster_erp/config/settings.py:490
analytics_profile_sentinels list[str] see source CLUSTER_ERP_ANALYTICS_PROFILE_SENTINELS analytics Values treated as hidden missing values. src/cluster_erp/config/settings.py:495
analytics_inference_max_rows int 100_000 CLUSTER_ERP_ANALYTICS_INFERENCE_MAX_ROWS analytics Largest sample a hypothesis test may pull. src/cluster_erp/config/settings.py:524
analytics_summary_refresh_seconds int 60 CLUSTER_ERP_ANALYTICS_SUMMARY_REFRESH_SECONDS server Interval of the summary-cell refresh; 0 turns it off. src/cluster_erp/config/settings.py:530
analytics_summary_rebuild_minutes int 60 CLUSTER_ERP_ANALYTICS_SUMMARY_REBUILD_MINUTES analytics Interval of a full summary-cell rebuild. src/cluster_erp/config/settings.py:533

MRP and DDMRP

Setting Type Default Environment variable Read in Meaning Source
mrp_default_planning_horizon_days int 90 CLUSTER_ERP_MRP_DEFAULT_PLANNING_HORIZON_DAYS procurement No description in code. src/cluster_erp/config/settings.py:571
mrp_safety_stock_method str "fixed" CLUSTER_ERP_MRP_SAFETY_STOCK_METHOD procurement No description in code. src/cluster_erp/config/settings.py:572
mrp_lot_sizing_default str "lot_for_lot" CLUSTER_ERP_MRP_LOT_SIZING_DEFAULT procurement No description in code. src/cluster_erp/config/settings.py:573
mrp_reschedule_threshold_days int 3 CLUSTER_ERP_MRP_RESCHEDULE_THRESHOLD_DAYS procurement No description in code. src/cluster_erp/config/settings.py:574
mrp_max_bom_depth int 20 CLUSTER_ERP_MRP_MAX_BOM_DEPTH procurement No description in code. src/cluster_erp/config/settings.py:575
mrp_excess_receipt_tolerance_pct Decimal Decimal("10") CLUSTER_ERP_MRP_EXCESS_RECEIPT_TOLERANCE_PCT procurement Percentage above planned need at which a receipt raises a decrease exception. src/cluster_erp/config/settings.py:582
mrp_opening_period_days int 21 CLUSTER_ERP_MRP_OPENING_PERIOD_DAYS procurement Window in which a planned order may be converted to a production order. src/cluster_erp/config/settings.py:591
mrp_damping_delay_days int 3 CLUSTER_ERP_MRP_DAMPING_DELAY_DAYS procurement Lateness tolerated before an action message. src/cluster_erp/config/settings.py:592
mrp_damping_advance_days int 3 CLUSTER_ERP_MRP_DAMPING_ADVANCE_DAYS procurement Earliness tolerated before an action message. src/cluster_erp/config/settings.py:593
mrp_consumption_backward_days int 30 CLUSTER_ERP_MRP_CONSUMPTION_BACKWARD_DAYS procurement Backward consumption window in working days. src/cluster_erp/config/settings.py:594
mrp_consumption_forward_days int 15 CLUSTER_ERP_MRP_CONSUMPTION_FORWARD_DAYS procurement Forward consumption window in working days. src/cluster_erp/config/settings.py:595
mrp_default_cut_kerf_mm Decimal Decimal("3") CLUSTER_ERP_MRP_DEFAULT_CUT_KERF_MM bom, procurement, production Default cut allowance in millimetres for stock conversion. src/cluster_erp/config/settings.py:596
mrp_sheet_part_gap_mm Decimal Decimal("5") CLUSTER_ERP_MRP_SHEET_PART_GAP_MM bom, procurement, production Gap between parts on a sheet in millimetres. src/cluster_erp/config/settings.py:597
mrp_sheet_edge_margin_mm Decimal Decimal("10") CLUSTER_ERP_MRP_SHEET_EDGE_MARGIN_MM bom, procurement, production Edge margin of a sheet in millimetres. src/cluster_erp/config/settings.py:598
mrp_abc_a_lot_sizing str "lot_for_lot" CLUSTER_ERP_MRP_ABC_A_LOT_SIZING procurement No description in code. src/cluster_erp/config/settings.py:599
mrp_abc_b_lot_sizing str "period_order" CLUSTER_ERP_MRP_ABC_B_LOT_SIZING procurement No description in code. src/cluster_erp/config/settings.py:600
mrp_abc_c_lot_sizing str "fixed_order" CLUSTER_ERP_MRP_ABC_C_LOT_SIZING procurement No description in code. src/cluster_erp/config/settings.py:601
mrp_period_order_days int 7 CLUSTER_ERP_MRP_PERIOD_ORDER_DAYS procurement No description in code. src/cluster_erp/config/settings.py:602
mrp_eoq_ordering_cost str "250.00" CLUSTER_ERP_MRP_EOQ_ORDERING_COST procurement No description in code. src/cluster_erp/config/settings.py:603
mrp_eoq_holding_cost_rate str "0.25" CLUSTER_ERP_MRP_EOQ_HOLDING_COST_RATE procurement No description in code. src/cluster_erp/config/settings.py:604
mrp_bucket_days int 7 CLUSTER_ERP_MRP_BUCKET_DAYS procurement No description in code. src/cluster_erp/config/settings.py:605
mrp_flush_chunk int 500 CLUSTER_ERP_MRP_FLUSH_CHUNK procurement No description in code. src/cluster_erp/config/settings.py:606
mrp_background_timeout_seconds int 600 CLUSTER_ERP_MRP_BACKGROUND_TIMEOUT_SECONDS procurement No description in code. src/cluster_erp/config/settings.py:607
mrp_xyz_x_cov Decimal Decimal("0.5") CLUSTER_ERP_MRP_XYZ_X_COV procurement Coefficient of variation below which an item is class X. src/cluster_erp/config/settings.py:609
mrp_xyz_y_cov Decimal Decimal("1.0") CLUSTER_ERP_MRP_XYZ_Y_COV procurement Coefficient of variation below which an item is class Y. src/cluster_erp/config/settings.py:610
mrp_xyz_default_horizon_days int 180 CLUSTER_ERP_MRP_XYZ_DEFAULT_HORIZON_DAYS procurement No description in code. src/cluster_erp/config/settings.py:611
mrp_leadtime_tolerance_days int 2 CLUSTER_ERP_MRP_LEADTIME_TOLERANCE_DAYS procurement Tolerance of the actual lead-time suggestion. src/cluster_erp/config/settings.py:613
mrp_leadtime_max_samples int 12 CLUSTER_ERP_MRP_LEADTIME_MAX_SAMPLES procurement Sample size of the actual lead-time suggestion. src/cluster_erp/config/settings.py:614
ddmrp_adu_horizon_days int 90 CLUSTER_ERP_DDMRP_ADU_HORIZON_DAYS procurement DDMRP average daily usage horizon. src/cluster_erp/config/settings.py:617
ddmrp_spike_threshold_pct Decimal Decimal("50") CLUSTER_ERP_DDMRP_SPIKE_THRESHOLD_PCT procurement DDMRP spike threshold as a percentage of red. src/cluster_erp/config/settings.py:618
ddmrp_default_lt_factor Decimal Decimal("0.5") CLUSTER_ERP_DDMRP_DEFAULT_LT_FACTOR procurement Default buffer lead-time factor. src/cluster_erp/config/settings.py:619
ddmrp_default_variability_factor Decimal Decimal("0.5") CLUSTER_ERP_DDMRP_DEFAULT_VARIABILITY_FACTOR procurement Default buffer variability factor. src/cluster_erp/config/settings.py:620
ddmrp_default_order_cycle_days int 7 CLUSTER_ERP_DDMRP_DEFAULT_ORDER_CYCLE_DAYS procurement Default buffer order cycle. src/cluster_erp/config/settings.py:621

Logs, retention, and privacy

Setting Type Default Environment variable Read in Meaning Source
activity_log_enabled bool True CLUSTER_ERP_ACTIVITY_LOG_ENABLED server Turns the request activity log on or off. src/cluster_erp/config/settings.py:628
activity_log_skip_paths list[str] see source CLUSTER_ERP_ACTIVITY_LOG_SKIP_PATHS server Paths that are not logged. src/cluster_erp/config/settings.py:630
activity_log_retention_days int 90 CLUSTER_ERP_ACTIVITY_LOG_RETENTION_DAYS server Days activity-log rows are kept. src/cluster_erp/config/settings.py:640
error_log_retention_days int 365 CLUSTER_ERP_ERROR_LOG_RETENTION_DAYS server Days error-log rows are kept. src/cluster_erp/config/settings.py:641
log_purge_batch_rows int 10_000 CLUSTER_ERP_LOG_PURGE_BATCH_ROWS server Rows deleted per statement by the log purge. src/cluster_erp/config/settings.py:644
log_sanitize_keys list[str] see source CLUSTER_ERP_LOG_SANITIZE_KEYS server Body keys whose values are masked in log summaries. src/cluster_erp/config/settings.py:653
log_sanitize_path_keys dict[str, list[str]] see source CLUSTER_ERP_LOG_SANITIZE_PATH_KEYS server Body keys masked only on matching paths. src/cluster_erp/config/settings.py:695
log_body_max_bytes int 2048 CLUSTER_ERP_LOG_BODY_MAX_BYTES server Maximum size of a stored body summary. src/cluster_erp/config/settings.py:700
log_redact_path_tokens bool True CLUSTER_ERP_LOG_REDACT_PATH_TOKENS server Replaces token-like path segments with *** in the log. src/cluster_erp/config/settings.py:704
log_username_cache_seconds int 300 CLUSTER_ERP_LOG_USERNAME_CACHE_SECONDS server Seconds a resolved user name is reused by the log. src/cluster_erp/config/settings.py:707
change_history_redact_columns list[str] [] CLUSTER_ERP_CHANGE_HISTORY_REDACT_COLUMNS core, server Extra columns whose values the change history redacts. src/cluster_erp/config/settings.py:711
control_signup_retention_days int 30 CLUSTER_ERP_CONTROL_SIGNUP_RETENTION_DAYS server Days an unfinished signup is kept on the control plane. src/cluster_erp/config/settings.py:718
control_rate_limit_retention_hours int 24 CLUSTER_ERP_CONTROL_RATE_LIMIT_RETENTION_HOURS server Hours rate-limit rows are kept. src/cluster_erp/config/settings.py:721
control_actions_retention_years int 10 CLUSTER_ERP_CONTROL_ACTIONS_RETENTION_YEARS server Years operator action records are kept. src/cluster_erp/config/settings.py:724
signup_mail_spool_retention_days int 7 CLUSTER_ERP_SIGNUP_MAIL_SPOOL_RETENTION_DAYS server Days spooled verification mails are kept. src/cluster_erp/config/settings.py:727
privacy_response_days int 30 CLUSTER_ERP_PRIVACY_RESPONSE_DAYS privacy Days within which a data-subject request must be answered. src/cluster_erp/config/settings.py:733
privacy_anonymised_marker str "[anonymised]" CLUSTER_ERP_PRIVACY_ANONYMISED_MARKER privacy Value written over identifying fields on anonymisation. src/cluster_erp/config/settings.py:737

Derived properties and helpers

Member Returns Source
database_url The async URL postgresql+asyncpg://... of the default database src/cluster_erp/config/settings.py:838-843
database_url_sync The same URL with the plain postgresql:// scheme src/cluster_erp/config/settings.py:845-850
control_database_url The async URL of the control-plane database src/cluster_erp/config/settings.py:852-857
node_country_code node_country stripped and in upper case src/cluster_erp/config/settings.py:860-863
console_origin_list() The parsed console_origins; every origin must start with https:// src/cluster_erp/config/settings.py:865-875
country_node_map() The parsed country_nodes; two-letter keys and https:// addresses src/cluster_erp/config/settings.py:877-896
region_codes() and default_region The parsed regions; the first is the default src/cluster_erp/config/settings.py:899-905
region_address(region) and region_url(region, db_name, sync=False) The server and URL of a region's database src/cluster_erp/config/settings.py:915-944

Constraints and validation

The validator _validate_settings runs after the fields load (src/cluster_erp/config/settings.py:739-836). Loading fails with a ValueError when:

  • A region code is not 2 to 8 characters of lower-case letters, digits, or hyphens; region_db_urls names an unknown region; or a non-default region has no server (src/cluster_erp/config/settings.py:746-753).
  • node_country is set and is not a two-letter code, or country_nodes does not list this node's own country (src/cluster_erp/config/settings.py:754-765).
  • multi_tenant and debug are both on (src/cluster_erp/config/settings.py:766-770).
  • secret_key keeps its shipped default outside debug mode, is shorter than 32 characters, or is weak outside debug mode. In debug mode a default key is replaced by a generated one and a weak key only logs a warning (src/cluster_erp/config/settings.py:771-804).
  • In multi-tenant mode, storage_encryption_key, backup_encryption_key, or mail_encryption_key is empty (src/cluster_erp/config/settings.py:805-821).
  • storage_encryption_key or backup_encryption_key is set but is not 32 bytes of hex (src/cluster_erp/config/settings.py:822-827).
  • storage_backend is s3 and s3_bucket is empty (src/cluster_erp/config/settings.py:828-831).
  • smtp_host is set and smtp_from_email is empty (src/cluster_erp/config/settings.py:832-835).

Terms introduced

Term Code identifier Definition Turkish term Source
settings Settings The Pydantic class that loads configuration from CLUSTER_ERP_ environment variables and .env. ayarlar src/cluster_erp/config/settings.py:64

Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13