Configuration
1. Environment Variables
Source:
@nx/coreenvironment keys + this package'scommon/. Signal uses the standardVerifierApplicationkeys plus WebSocket-, Redis-, and Kafka-specific ones below.
Application & Identity
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
APP_ENV_APPLICATION_NAME | string | — | ✓ | Service identifier |
APP_ENV_SERVER_PORT | number | 3000 | HTTP listen port (dev 31090) | |
APP_ENV_SERVER_BASE_PATH | string | /v1/api | Route prefix (effective base /v1/api/signal) | |
APP_ENV_IDENTITY_SERVICE_BASE_URL | string | — | ✓ | Identity base URL for JWKS verification |
APP_ENV_JWKS_REST_PATH | string | /jw-certs | JWKS endpoint path | |
APP_ENV_SNOWFLAKE_WORKER_ID | number | 9 | Snowflake worker ID |
Database (core datasource)
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
APP_ENV_POSTGRES_* | — | — | ✓ | Standard core Postgres keys (notification persistence + authz) |
WebSocket — ECDH
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
APP_ENV_WEBSOCKET_ECDH_INFO | string | — | ✓ | HKDF info string; must match the client-side value |
WebSocket — Redis (pub/sub bus)
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
APP_ENV_WEBSOCKET_REDIS_MODE | single | cluster | single | Connection mode | |
APP_ENV_WEBSOCKET_REDIS_HOST | string | localhost | Host (single mode) | |
APP_ENV_WEBSOCKET_REDIS_PORT | number | 6379 | Port (single mode) | |
APP_ENV_WEBSOCKET_REDIS_DB | number | 0 | DB index (single mode) | |
APP_ENV_WEBSOCKET_REDIS_PASSWORD | string | — | Password | |
APP_ENV_WEBSOCKET_REDIS_MAX_RETRY | number | 5 | Max retry (single mode) | |
APP_ENV_WEBSOCKET_REDIS_CLUSTER_NODES | string | — | cluster | Comma-separated host:port pairs (required in cluster mode) |
This is the only Redis Signal uses — there is no separate cache/queue Redis. All publishers (Signal + emitter services) must point at the same instance/cluster.
Kafka — activity-notification consumer
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
APP_ENV_KAFKA_BROKERS | string | — | ✓ | Comma-separated brokers; empty/unset → fail-fast at boot |
APP_ENV_KAFKA_CLIENT_ID | string | SVC-00090-SIGNAL_NOTIF_CONSUMER | Consumer client id | |
APP_ENV_KAFKA_GROUP_ID | string | SVC-00090-SIGNAL_NOTIF_CONSUMER_GROUP | Consumer group id | |
APP_ENV_KAFKA_SASL_ENABLE | boolean | false | Enable SASL | |
APP_ENV_KAFKA_SASL_MECHANISM | string | — | if SASL | e.g. SCRAM-SHA-512 |
APP_ENV_KAFKA_SASL_USERNAME | string | — | if SASL | — |
APP_ENV_KAFKA_SASL_PASSWORD | string | — | if SASL | — |
2. Feature Flags
None. Behavior is governed entirely by the env vars above (mode switches: Redis single/cluster, Kafka SASL on/off).
3. Seeded Data
Migration processes in
src/migrations/processes/—alwaysRun: true, idempotent.
| File | Seeds | Idempotent | Notes |
|---|---|---|---|
signal-0001-seed-permissions.ts | WebSocketClient.* permissions (6) | ✓ | Upserts each SignalPermissions entry by code |
signal-0002-seed-role-permissions.ts | Role→permission grants | ✓ | Grants all signal permissions to OWNER, EMPLOYEE, CASHIER via PolicyDefinition; skips already-granted |
Signal has no schema migrations — it owns no tables. These migrations only seed authorization data into
@nx/coretables.
4. Configuration Storage (Configuration table)
Not used. Signal holds no per-merchant runtime configuration.