Skip to content

Configuration

1. Biến môi trường

Nguồn: packages/core/src/common/environments.ts (EnvironmentKeys) + src/common/ của package này.

Core

TênKiểuMặc địnhBắt buộcPhạm viMô tả
APP_ENV_PORTnumber3000runtimePort HTTP lắng nghe (external 31110 ở dev)
APP_ENV_HOSTstring0.0.0.0runtimeHost bind
APP_ENV_BASE_PATHstring/v1/api/outreachruntimePrefix route
APP_ENV_NODE_IDnumber10runtimeSnowflake worker ID
APP_ENV_LOG_LEVELinfo|debug|warn|errorinforuntimeMức logger

Database

TênKiểuMặc địnhBắt buộcMô tả
APP_ENV_DB_URLstringURL kết nối PostgreSQL (DB nx_seller, schema outreach)
APP_ENV_DB_POOL_MAXnumber10Kích thước pool tối đa

WebSocket Redis

Tiêu thụ bởi ApplicationWebSocketComponent. Mode chọn single vs cluster; cluster yêu cầu ..._CLUSTER_NODES hoặc boot fail với WEBSOCKET_REDIS_CLUSTER_NODES_NOT_CONFIGURED.

TênKiểuMặc địnhBắt buộcMô tả
APP_ENV_WEBSOCKET_REDIS_MODEsingle|clustersingleTopology Redis của emitter
APP_ENV_WEBSOCKET_REDIS_IDENTIFIERstringoutreach-ws-redisTên kết nối single-mode
APP_ENV_WEBSOCKET_REDIS_HOSTstringlocalhostHost single-mode
APP_ENV_WEBSOCKET_REDIS_PORTnumber6379Port single-mode
APP_ENV_WEBSOCKET_REDIS_PASSWORDstringRedis password (cả hai mode)
APP_ENV_WEBSOCKET_REDIS_DBnumber0Chỉ số DB single-mode
APP_ENV_WEBSOCKET_REDIS_MAX_RETRYnumber5Max retry single-mode
APP_ENV_WEBSOCKET_REDIS_CLUSTER_IDENTIFIERstringoutreach-ws-redis-clusterTên kết nối cluster-mode
APP_ENV_WEBSOCKET_REDIS_CLUSTER_NODESstring✓ (chỉ cluster)Seed cluster host:port,host:port,...

Không có biến APP_ENV_KAFKA_* — Outreach không có Kafka.

2. Feature Flags

Không. Không có toggle feature runtime; hành vi cố định trong code.

3. Dữ liệu Seed

Các migration process trong src/migrations/processes/. Load bởi getMigrationProcesses trong migration-process.ts; cả hai chạy với alwaysRun: true (re-seed idempotent mỗi lần migrate).

FileSeedsIdempotentGhi chú
outreach-0001-seed-permissions.tsQuyền CRUD cho Inquiry + Subscriber (OutreachPermissions)Upsert theo code (create hoặc update)
outreach-0002-seed-role-permissions.tsCấp tất cả quyền outreach cho role OWNER, EMPLOYEE, CASHIERBaseline khoan dung; skip đã-cấp; siết sau qua merchant policy API

4. Lưu trữ Configuration (bảng Configuration)

Không dùng. Outreach không có dòng Configuration theo từng merchant — cả hai bảng là global và không có credential encrypted.

5. Trang liên quan

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