forked from Junirezz/YieldVault-RWA
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
120 lines (96 loc) · 4.35 KB
/
Copy path.env.example
File metadata and controls
120 lines (96 loc) · 4.35 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
# Backend Server Configuration
# Copy this to .env and customize for your environment
# Server Configuration
PORT=3000
NODE_ENV=development
# Rate Limiting Configuration
# Global rate limiter: 100 requests per 15 minutes (900000 ms)
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
# API endpoint rate limiter: 30 requests per minute (60000 ms)
API_RATE_LIMIT_WINDOW_MS=60000
API_RATE_LIMIT_MAX_REQUESTS=30
# ── Payload Size Limits ───────────────────────────────────────────────────────
# Route-tier-specific caps enforced by the payloadLimit middleware.
# Express size notation applies: "4kb", "16kb", "32kb", "1mb" etc.
# Omit a variable (or leave it blank) to use the compiled-in default.
#
# Tier Default Routes
# global 1mb All routes (last-resort baseline)
# auth 4kb /api/v1/auth/* (credentials/tokens only)
# admin 16kb /admin/* (structured config payloads)
# writes 32kb POST /api/v1/vault/deposits|withdrawals|deposits/v2|strategy
#PAYLOAD_LIMIT_GLOBAL=1mb
#PAYLOAD_LIMIT_AUTH=4kb
#PAYLOAD_LIMIT_ADMIN=16kb
#PAYLOAD_LIMIT_WRITES=32kb
# ── Wallet signed-action nonces ───────────────────────────────────────────────
# WALLET_NONCE_TTL_SECONDS=300
# WALLET_NONCE_MAX_ACTIVE_PER_WALLET=10
# WALLET_NONCE_ENFORCEMENT=strict # strict | off (default: strict in production)
# WALLET_SIGNATURE_MODE=stellar # stellar | hmac (default: stellar in production)
# WALLET_ACTION_HMAC_SECRET= # HMAC secret when WALLET_SIGNATURE_MODE=hmac
# ── Admin API Key RBAC ────────────────────────────────────────────────────────
# Roles (least → most privileged): viewer, operator, admin, super-admin
# Assign when registering keys via POST /admin/api-keys/register { "role": "..." }
# viewer – read-only admin endpoints
# operator – maintenance, cache, allowlist, webhooks (non-secret), jobs, exports
# admin – full admin except impersonation / global idempotency flush
# super-admin – all privileged operations
# Stellar RPC Configuration
STELLAR_RPC_URL=https://soroban-testnet.stellar.org
STELLAR_NETWORK=testnet
STELLAR_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
# Vault Configuration
VAULT_CONTRACT_ID=
# Optional: Database Configuration
DATABASE_URL=
DATABASE_REPLICA_URL=
DATABASE_POOL_SIZE=10
PRISMA_POOL_MAX=10
PRISMA_POOL_TIMEOUT_MS=10000
PRISMA_QUERY_TIMEOUT_MS=5000
# Admin audit log persistence mode: memory | prisma | hybrid
ADMIN_AUDIT_LOG_STORAGE=hybrid
# Webhook verification
WEBHOOK_VERIFICATION_TIMEOUT_MS=5000
WEBHOOK_CHALLENGE_TTL_SECONDS=900
WEBHOOK_ALLOW_UNVERIFIED=false
# Prisma runtime connection settings
PRISMA_POOL_SIZE=10
PRISMA_POOL_TIMEOUT_SEC=10
PRISMA_QUERY_TIMEOUT_MS=5000
PRISMA_TX_MAX_WAIT_MS=5000
PRISMA_TX_TIMEOUT_MS=10000
# Optional: Cache Configuration (for future use)
# REDIS_URL=redis://localhost:6379
# CACHE_TTL=300
# CORS Configuration
# Comma-separated list of allowed origins. Supports strings or regex like /https?:\/\/.*\.yieldvault\.finance/
CORS_ALLOWED_ORIGINS=http://localhost:3000,https://app.yieldvault.finance
# Email Notification Configuration
EMAIL_PROVIDER=resend
EMAIL_API_KEY=
EMAIL_FROM_ADDRESS=notifications@yieldvault.finance
# Latency SLO Monitoring Configuration
# SLO thresholds in milliseconds
SLO_READ_THRESHOLD_MS=200
SLO_WRITE_THRESHOLD_MS=500
# Evaluation window for P95 calculation (5 minutes = 300000 ms)
SLO_EVALUATION_WINDOW_MS=300000
# Alert cooldown period to prevent spam (15 minutes = 900000 ms)
SLO_ALERT_COOLDOWN_MS=900000
# SLO check interval (1 minute = 60000 ms)
SLO_CHECK_INTERVAL_MS=60000
# Alert Integration Configuration
# Set to 'slack', 'pagerduty', or 'both'
ALERT_TYPE=slack
# Slack Webhook URL (required if ALERT_TYPE includes 'slack')
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
# PagerDuty Integration Key (required if ALERT_TYPE includes 'pagerduty')
PAGERDUTY_INTEGRATION_KEY=
# Event Polling Configuration
# Poll interval for checking new events (10 seconds = 10000 ms)
EVENT_POLL_INTERVAL_MS=10000
# Batch size for event replay (number of ledgers per batch)
EVENT_REPLAY_BATCH_SIZE=100