Skip to content

Configuration

1. Environment Variables

Source: packages/core/src/common/environments.ts + packages/pricing/src/common/keys.ts.

Core

NameTypeDefaultRequiredScopeDescription
APP_ENV_PORTnumber3000runtimeHTTP listen port (external 31070 in dev)
APP_ENV_HOSTstring0.0.0.0runtimeBind host
APP_ENV_BASE_PATHstring/v1/api/pricingruntimeRoute prefix
APP_ENV_NODE_IDnumber7runtimeSnowflake worker ID
APP_ENV_LOG_LEVELinfo|debug|warn|errorinforuntimeLogger level

Database

NameTypeDefaultRequiredDescription
APP_ENV_DB_URLstringPostgreSQL connection URL (pricing schema)

Redis / Kafka

NameTypeDefaultRequiredDescription
APP_ENV_REDIS_HOST / APP_ENV_REDIS_PORTstring / number— / 6379Authorization permission cache only
APP_ENV_KAFKA_BROKERSstringComma-separated brokers; binding throws if empty
APP_ENV_KAFKA_CLIENT_IDstringPRICING_PRODUCER / PRICING_CONSUMERProducer/consumer client id
APP_ENV_KAFKA_GROUP_IDstringPRICING_CONSUMER_GROUPCDC consumer group
APP_ENV_KAFKA_SASL_ENABLEstring ('true')unsetEnables SASL block below
APP_ENV_KAFKA_SASL_MECHANISM / _USERNAME / _PASSWORDstringNASASL credentials (only when enabled)

Service-specific

NameTypeDefaultRequiredDescription
APP_ENV_DEFAULT_TAX_RATEstringDeclared in PricingEnvironmentKeys but unused — no calculator reads it

Sale (the caller) needs APP_ENV_PRICING_SERVICE_BASE_URL + APP_ENV_BASIC_AUTH_USERNAME/PASSWORD to reach pricing. Those live in sale's config, not pricing's.

2. Feature Flags

None. There are no runtime feature flags. The v1/v2 split is a code-level routing distinction (/simulation vs /simulation-v2), not a flag.

3. Seeded Data

Migration processes in src/migrations/processes/alwaysRun: true, idempotent, run on bootstrap (migrate mode).

FileSeedsIdempotentNotes
pricing-0001-seed-permissions.tsPricingPermissions (per-controller resource permissions)Upserts by code (create or update)
pricing-0002-seed-role-permissions.tsGrants ALL pricing permissions to OWNER, EMPLOYEE, CASHIERLenient baseline — per-role tightening happens later via merchant policy-definition API

The CDC worker also "seeds" FareSets/Fares at runtime, but that is data ingestion (see API Events), not a migration.

4. Configuration Storage (Configuration table)

Not used. Pricing holds no per-merchant encrypted credentials or runtime config rows.

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.