Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
138 lines (127 loc) · 6.5 KB
/
Copy path.env.example
File metadata and controls
138 lines (127 loc) · 6.5 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
# StellarPOS backend configuration. Copy to .env and edit.
# Every variable is documented in docs/ENVIRONMENT.md.
# Empty values count as unset. Blank lines and # comments are ignored.
# --- Server ------------------------------------------------------------------
# development | production | test. Production enables stricter checks.
NODE_ENV=development
# HTTP and Socket.IO port. Default: 3000.
PORT=3000
# Origin of the point-of-sale web app, allowed by CORS and Socket.IO.
# Default: http://localhost:5173
CLIENT_URL=http://localhost:5173
# error | warn | info | debug. Default: debug (info when NODE_ENV=production).
LOG_LEVEL=info
# --- Auth --------------------------------------------------------------------
# REQUIRED. Signs login tokens. Use at least 32 random characters, for example
# the output of: openssl rand -hex 32. Production refuses shorter values.
JWT_SECRET=
# Token lifetime, for example 12h, 1d or 3600. Default: 12h.
JWT_EXPIRES_IN=12h
# --- Database ----------------------------------------------------------------
# Path to the embedded SQLite file. Use :memory: for a throwaway run.
# Default: ./data/stellarpos.db
DATABASE_PATH=./data/stellarpos.db
# Hours between automatic snapshots. 0 turns them off. Default: 0.
# npm run db:backup takes one on demand.
BACKUP_INTERVAL_HOURS=24
# Folder for snapshots. Default: ./data/backups
BACKUP_DIR=./data/backups
# Number of automatic snapshots to keep. Default: 14.
BACKUP_KEEP=14
# --- Email ------------------------------------------------------------------
# log prints receipts to the console. resend sends them via api.resend.com.
# Default: log.
EMAIL_PROVIDER=log
# Resend API key. REQUIRED when EMAIL_PROVIDER=resend. Leave empty for log.
EMAIL_API_KEY=
# Sender shown on receipts. Default: StellarPOS <receipts@example.com>
EMAIL_FROM=StellarPOS <receipts@example.com>
# --- Exchange rates ----------------------------------------------------------
# Optional FX API used for store-currency -> Stellar asset conversions.
# Leave empty to use STELLAR_ASSET_RATE below. Expected response:
# { "rates": { "USDC": 2.5 } } (also accepts { USDC: 2.5 } or { rate: 2.5 }).
EXCHANGE_RATE_API_URL=
# Optional API key appended as ?access_key=... Default: empty.
EXCHANGE_RATE_API_KEY=
# Redis cache lifetime for a fetched rate, in seconds. Default: 60. All
# conversions are served from this cache; a burst triggers at most one call.
EXCHANGE_RATE_CACHE_TTL_SECONDS=60
# --- Merchant verification & outbox -----------------------------------------
# Hours before an onboarding verification link expires. Default: 24 (was 15 min).
VERIFICATION_TOKEN_TTL_HOURS=24
# Seconds between /verification/resend calls. Default: 60.
VERIFICATION_RESEND_COOLDOWN_SECONDS=60
# Transactional outbox poll interval / retry budget (defaults below).
OUTBOX_POLL_INTERVAL_MS=1000
OUTBOX_MAX_ATTEMPTS=5
OUTBOX_STALE_LOCK_SECONDS=60
# --- Store -------------------------------------------------------------------
# Store name on receipts and in GET /api/v1/store. Default: StellarPOS Store
STORE_NAME=StellarPOS Demo Store
# ISO 4217 currency code for prices and receipts. Default: USD
STORE_CURRENCY=USD
# Sales tax in basis points, 0 to 10000 (750 = 7.5%). Default: 0
TAX_RATE_BPS=0
# Transaction processing fee in basis points, 0 to 10000 (250 = 2.5%). Default: 0
# Fees are computed with integer stroop/cent arithmetic, never JS floats.
FEE_RATE_BPS=0
# --- Stellar -----------------------------------------------------------------
# testnet or mainnet. Default: testnet
STELLAR_NETWORK=testnet
# Horizon API to read from. Keep it on the same network as STELLAR_NETWORK.
# Default: https://horizon-testnet.stellar.org (mainnet: https://horizon.stellar.org)
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
# Network passphrase. Default: derived from STELLAR_NETWORK. Start-up stops if it
# does not match STELLAR_NETWORK.
# STELLAR_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
# Public key (starts with G) that receives customer payments. Empty disables
# Stellar checkout. Never put a secret key (starts with S) here: the backend
# only watches this account and never signs for it.
STELLAR_MERCHANT_PUBLIC_KEY=
# Asset customers pay in, for example USDC. Default: XLM
STELLAR_ASSET_CODE=USDC
# Issuer public key of the asset. Leave empty for native XLM.
STELLAR_ASSET_ISSUER=GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
# Store-currency units per 1 unit of the asset. Use 1 for USDC priced in USD.
# Fallback when EXCHANGE_RATE_API_URL is empty or the provider is unavailable.
# Default: 1
STELLAR_ASSET_RATE=1
# Minutes before an unpaid QR checkout expires and its stock is released.
# Default: 15
STELLAR_PAYMENT_TTL_MINUTES=15
# Poll Horizon for incoming payments and settle matching checkouts.
# Default: true (false when NODE_ENV=test)
STELLAR_WATCHER_ENABLED=true
# Milliseconds between watcher polls. Default: 5000
STELLAR_WATCHER_INTERVAL_MS=5000
# Optional. Contract IDs from the contracts repo's deployments/<network>.json.
# Default: empty. Exposed in GET /api/v1/store.
STELLAR_PAYMENT_PROCESSOR_ID=
STELLAR_MERCHANT_REGISTRY_ID=
# CDN URL for static documentation and image assets (#160).
# When set, GET /docs/* and /static/* redirect to this origin instead of being
# served by Node.js, reducing CPU load on the API server.
# Example: https://cdn.yourdomain.com
CDN_URL=
# Redis connection URL for session / distributed cache store (#159).
# Required in production when running multiple API instances; a shared Redis
# store survives restarts and works across nodes. Leave empty in development.
# Example: redis://user:password@redis-host:6379
REDIS_URL=
# --- Operations --------------------------------------------------------------
# GET /health and /healthz: longest wait for each dependency probe (database,
# Horizon) before it is reported as down. Default: 1000
HEALTH_CHECK_TIMEOUT_MS=1000
# Optional. When set, GET /metrics requires "Authorization: Bearer <token>".
# Empty leaves /metrics open, which suits a private network. Default: empty
METRICS_TOKEN=
# SIGTERM: milliseconds in-flight requests get to finish, and the same budget
# for flushing the job queue, before the process exits. Default: 10000
SHUTDOWN_TIMEOUT_MS=10000
# --- Webhooks ----------------------------------------------------------------
# Shared secret used to verify inbound webhook signatures (HMAC-SHA256). Use at
# least 32 random characters, for example: openssl rand -hex 32.
# Required once a webhook route is mounted. Default: empty.
WEBHOOK_SECRET=
# Accepted clock skew for webhook timestamps, in seconds. Default: 300.
WEBHOOK_TOLERANCE_SECONDS=