-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy path.env.example
More file actions
140 lines (121 loc) · 4.47 KB
/
Copy path.env.example
File metadata and controls
140 lines (121 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Application Configuration
NODE_ENV=development
PORT=3000
# Request Body Size Limits (in MB)
BODY_LIMIT_JSON=10
BODY_LIMIT_URLENCODED=10
# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_secure_db_password
DB_NAME=nexafx_db
DB_SSL=false
# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_must_be_at_least_32_characters_long_for_security
JWT_EXPIRY=3600
# Refresh Token Configuration
REFRESH_TOKEN_SECRET=your_super_secret_refresh_token_key_must_be_at_least_32_characters_long
REFRESH_TOKEN_EXPIRY=604800
# OTP Configuration
OTP_SECRET=your_super_secret_otp_key_must_be_at_least_32_characters_long
OTP_EXPIRY=300
# Wallet Encryption Configuration (required — exactly 64 lowercase hex chars)
# Generate with: openssl rand -hex 32
# Wallet Encryption Configuration (exactly 64 lowercase hex chars, generated via `openssl rand -hex 32`)
WALLET_ENCRYPTION_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
# External Service Credentials
EXTERNAL_API_KEY=your_external_api_key
EXTERNAL_API_URL=https://api.example.com
EXTERNAL_API_TIMEOUT=30000
# Mail Configuration
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USER=your_email@example.com
MAIL_PASSWORD=your_mail_password
MAIL_FROM=noreply@example.com
MAIL_SECURE=false
# Redis Configuration (optional)
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
# Rate Limiting Configuration
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX_REQUESTS=100
# Idempotency Configuration
IDEMPOTENCY_TTL_HOURS=24
IDEMPOTENCY_CLEANUP_CRON=0 0 * * *
# Blockchain Configuration
# RPC endpoint for blockchain interaction (Ethereum mainnet, testnet, or custom node)
BLOCKCHAIN_RPC_URL=http://localhost:8545
# Number of confirmations required for transaction finalization
BLOCKCHAIN_REQUIRED_CONFIRMATIONS=12
# Payment Provider Configuration
# API endpoint for the payment provider (e.g., Stripe, PayPal, Square)
PROVIDER_API_URL=https://api.payment-provider.com
# API key for authentication with the payment provider
PROVIDER_API_KEY=your_provider_api_key_here
# Timeout in milliseconds for provider API calls
PROVIDER_API_TIMEOUT=30000
# ============================================
# Push Notification Configuration
# ============================================
# FCM Server key for Android push notifications
FCM_SERVER_KEY=your_fcm_server_key_here
# APNs configuration for Apple push notifications
APNS_KEY_ID=ABC123DEF
APNS_TEAM_ID=DEF456GHI
APNS_BUNDLE_ID=com.example.app
# APNS private key (PEM) - newlines may need escaping in some environments
APNS_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
# ============================================
# Referral Program
# ============================================
# Reward amount given to referrer (numeric)
REFERRAL_REWARD_AMOUNT=10
# Maximum number of times a single referrer can receive rewards
REFERRAL_MAX_REFERRALS=100
# Enable or disable referral program (true|false)
REFERRAL_PROGRAM_ACTIVE=true
# ============================================
# AML Monitoring Tuning
# ============================================
# Structuring threshold (currency units)
AML_STRUCTURING_THRESHOLD=10000
# Hours window to consider for structuring detection
AML_STRUCTURING_WINDOW_HOURS=24
# Minimum count of transactions to flag structuring
AML_STRUCTURING_MIN_COUNT=3
# Smurfing window in hours
AML_SMURFING_WINDOW_HOURS=1
# Minimum distinct wallets for smurfing detection
AML_SMURFING_MIN_WALLETS=3
# Allowed percent variance for smurfing amounts
AML_SMURFING_VARIANCE_PCT=5
# Velocity detection window hours
AML_VELOCITY_WINDOW_HOURS=1
# Velocity detection max transaction count
AML_VELOCITY_MAX_COUNT=10
# Risk score weight (integer)
AML_RISK_SCORE_WEIGHT=30
# ============================================
# FX / Exchange Rates
# ============================================
# Minutes window to allow FX reversal
FX_REVERSAL_WINDOW_MINUTES=5
# API keys for exchange rate providers (optional)
OPEN_EXCHANGE_RATES_API_KEY=
EXCHANGE_RATE_HOST_API_KEY=
# --- Connection Pool ---
# Max connections in pool (default 10 is too low for production NestJS apps)
DB_POOL_MAX=20
# Min idle connections kept alive
DB_POOL_MIN=2
# Close idle connections after this many ms (10 minutes)
DB_POOL_IDLE_TIMEOUT_MS=600000
# Fail fast if a connection cannot be acquired within this window (30 seconds)
DB_POOL_ACQUIRE_TIMEOUT_MS=30000
# --- JWT Secret Rotation ---
JWT_SECRET=change-me-to-a-long-random-string
# Set this to the OLD JWT_SECRET during rotation; remove after all old tokens expire
JWT_SECRET_PREVIOUS=