Configuration
1. Environment Variables
Source:
packages/core/src/common/environments.ts+packages/pricing/src/common/keys.ts.
Core
| Name | Type | Default | Required | Scope | Description |
|---|---|---|---|---|---|
APP_ENV_PORT | number | 3000 | runtime | HTTP listen port (external 31070 in dev) | |
APP_ENV_HOST | string | 0.0.0.0 | runtime | Bind host | |
APP_ENV_BASE_PATH | string | /v1/api/pricing | runtime | Route prefix | |
APP_ENV_NODE_ID | number | 7 | ✓ | runtime | Snowflake worker ID |
APP_ENV_LOG_LEVEL | info|debug|warn|error | info | runtime | Logger level |
Database
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
APP_ENV_DB_URL | string | — | ✓ | PostgreSQL connection URL (pricing schema) |
Redis / Kafka
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
APP_ENV_REDIS_HOST / APP_ENV_REDIS_PORT | string / number | — / 6379 | ✓ | Authorization permission cache only |
APP_ENV_KAFKA_BROKERS | string | — | ✓ | Comma-separated brokers; binding throws if empty |
APP_ENV_KAFKA_CLIENT_ID | string | PRICING_PRODUCER / PRICING_CONSUMER | Producer/consumer client id | |
APP_ENV_KAFKA_GROUP_ID | string | PRICING_CONSUMER_GROUP | CDC consumer group | |
APP_ENV_KAFKA_SASL_ENABLE | string ('true') | unset | Enables SASL block below | |
APP_ENV_KAFKA_SASL_MECHANISM / _USERNAME / _PASSWORD | string | NA | SASL credentials (only when enabled) |
Service-specific
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
APP_ENV_DEFAULT_TAX_RATE | string | — | Declared in PricingEnvironmentKeys but unused — no calculator reads it |
Sale (the caller) needs
APP_ENV_PRICING_SERVICE_BASE_URL+APP_ENV_BASIC_AUTH_USERNAME/PASSWORDto 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 (migratemode).
| File | Seeds | Idempotent | Notes |
|---|---|---|---|
pricing-0001-seed-permissions.ts | PricingPermissions (per-controller resource permissions) | ✓ | Upserts by code (create or update) |
pricing-0002-seed-role-permissions.ts | Grants ALL pricing permissions to OWNER, EMPLOYEE, CASHIER | ✓ | Lenient 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.