-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy path.env.example
More file actions
130 lines (97 loc) · 5.63 KB
/
Copy path.env.example
File metadata and controls
130 lines (97 loc) · 5.63 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
NODE_ENV=development
PORT=3000
MONGODB_URI=mongodb://localhost:27017/swiftchain
JWT_SECRET=your-super-secret-jwt-key-change-this
JWT_EXPIRES_IN=7d
BCRYPT_ROUNDS=10
LOG_LEVEL=debug
# Comma-separated list of allowed frontend origins. Use "*" to allow any origin (not recommended for production).
CORS_ORIGIN=http://localhost:3000,http://localhost:5173
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
# ─── Redis / ETA cache ──────────────────────────────────────────────────────────
# Redis connection URL for ETA result caching. Leave empty to disable caching.
REDIS_URL=redis://localhost:6379
# TTL (seconds) for cached ETA results. Default: 600 (10 minutes).
ETA_CACHE_TTL_SECONDS=600
# Geohash precision for cache keys (1–12). Default: 7 (~150 m buckets).
ETA_GEOHASH_PRECISION=7
# Google Maps Directions API key. When unset, Haversine fallback is used.
GOOGLE_MAPS_API_KEY=
# ─── Stellar / Soroban ─────────────────────────────────────────────────────────
# Soroban RPC endpoint.
# Testnet : https://soroban-testnet.stellar.org
# Mainnet : https://soroban-mainnet.stellar.org (or a custom Horizon/RPC node)
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# Network passphrase — must match SOROBAN_RPC_URL.
# Testnet : Test SDF Network ; September 2015
# Mainnet : Public Global Stellar Network ; September 2015
STELLAR_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
# Friendly alias used in logs/responses ("mainnet" | "testnet" | "futurenet")
STELLAR_NETWORK=testnet
# Request timeout (ms) for Soroban RPC calls. Default: 10000
SOROBAN_RPC_TIMEOUT_MS=10000
# ─── Evidence uploads ───────────────────────────────────────────────────────────
# Public base URL this API is reachable at — used to build local-storage file URLs.
APP_BASE_URL=http://localhost:3000
# Storage backend for uploaded evidence: "local" or "s3". Default: local
UPLOAD_STORAGE_DRIVER=local
# Directory (relative to project root) local-storage uploads are written to.
UPLOAD_LOCAL_DIR=uploads
# Maximum accepted evidence file size, in MB. Default: 10
UPLOAD_MAX_FILE_SIZE_MB=10
# Required when UPLOAD_STORAGE_DRIVER=s3.
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET=
# How long (seconds) a signed S3 evidence URL remains valid. Default: 3600
AWS_S3_SIGNED_URL_EXPIRES_SECONDS=3600
# ─── Escrow indexer ─────────────────────────────────────────────────────────────
# Deployed escrow Soroban contract ID (the "C..." address) whose events the
# escrow indexer subscribes to.
ESCROW_CONTRACT_ID=
# Event topic emitted by the escrow contract when funds are locked.
# Default: escrow_funded
ESCROW_FUNDED_EVENT_TOPIC=escrow_funded
# ─── Soroban RPC retry / bad-sequence handling ──────────────────────────────────
# Maximum attempts (including the first) for generic RPC calls (getAccount, etc.)
SOROBAN_RPC_MAX_RETRIES=3
# Base delay (ms) for exponential back-off between RPC retries.
SOROBAN_RPC_RETRY_BASE_MS=250
# Maximum delay (ms) cap for any single back-off interval.
SOROBAN_RPC_RETRY_MAX_MS=8000
# Maximum times to rebuild and resubmit a transaction after a tx_bad_seq error.
# Each attempt re-fetches the account sequence number before rebuilding.
STELLAR_BAD_SEQ_MAX_RETRIES=3
# ─── Redis / Distributed Locking ───────────────────────────────────────────────
# Redis connection URL for distributed locking (Redlock).
# REDIS_URL=redis://localhost:6379
# Lock TTL in milliseconds for escrow release operations. Default: 10000
REDIS_LOCK_TTL_MS=10000
# Maximum retry attempts for acquiring a distributed lock. Default: 3
REDIS_LOCK_RETRY_COUNT=3
# Delay between lock retry attempts in milliseconds. Default: 200
REDIS_LOCK_RETRY_DELAY_MS=200
# ─── Socket.io Location Updates ────────────────────────────────────────────────
# TTL (seconds) for location update deduplication keys in Redis. Default: 60
LOCATION_DEDUP_TTL_SECONDS=60
# Maximum age (milliseconds) for a location update to be considered valid. Default: 300000 (5 minutes)
LOCATION_MAX_AGE_MS=300000
# Maximum future timestamp tolerance (milliseconds) for location updates. Default: 30000 (30 seconds)
LOCATION_MAX_FUTURE_MS=30000
# Socket.io ping timeout in milliseconds. Default: 20000
SOCKET_PING_TIMEOUT_MS=20000
# Socket.io ping interval in milliseconds. Default: 25000
SOCKET_PING_INTERVAL_MS=25000
# Maximum consecutive missed pongs before disconnecting. Default: 2
SOCKET_MAX_MISSED_PONGS=2
# ─── Profile Picture Upload ────────────────────────────────────────────────────
# Maximum file size for profile pictures in MB. Default: 5
PROFILE_PICTURE_MAX_SIZE_MB=5
# Target width for resized profile pictures in pixels. Default: 500
PROFILE_PICTURE_WIDTH=500
# Target height for resized profile pictures in pixels. Default: 500
PROFILE_PICTURE_HEIGHT=500
# JPEG quality for compressed profile pictures (0-100). Default: 85
PROFILE_PICTURE_QUALITY=85