Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
157 lines (114 loc) · 8.61 KB
/
Copy path.env.example
File metadata and controls
157 lines (114 loc) · 8.61 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Copy this file to .env.local before running the app:
# cp .env.example .env.local
#
# Server-only secrets must NEVER use the NEXT_PUBLIC_ prefix.
# In particular:
# - PAYCREST_API_KEY must stay server-side
# - BASE_PRIVATE_KEY must stay server-side
# ── Paycrest ──────────────────────────────────────────────────────────────────
# Paycrest secret API key used by server routes to create quotes and payout orders.
# Get it from the Paycrest dashboard or API credentials page.
PAYCREST_API_KEY=your_paycrest_api_key_here
# Paycrest webhook signing secret used to verify incoming webhook events.
# Generate or copy this from the Paycrest webhook settings page.
PAYCREST_WEBHOOK_SECRET=your_paycrest_webhook_secret_here
# ── Base chain ────────────────────────────────────────────────────────────────
# Private key for the Base wallet that signs payout transactions.
# Get this from the dedicated wallet/account you control for this app.
# NEVER expose this in the browser or prefix it with NEXT_PUBLIC_.
BASE_PRIVATE_KEY=0xyour_base_private_key_here
# Public Base wallet address where unused or returned funds should be sent.
# Use the public address that corresponds to your payout wallet or treasury wallet.
BASE_RETURN_ADDRESS=0xyour_base_return_address_here
# Base mainnet RPC endpoint used by the server for on-chain payout execution.
# Use your RPC provider URL from Base, Alchemy, Infura, QuickNode, or another provider.
BASE_RPC_URL=https://mainnet.base.org
# ── Stellar ───────────────────────────────────────────────────────────────────
# Soroban RPC endpoint used by the server for Stellar transaction building and submission.
# Get this from your preferred Stellar RPC provider, or use a public mainnet endpoint.
STELLAR_SOROBAN_RPC_URL=https://soroban-rpc.mainnet.stellar.gateway.fm
# Horizon API endpoint used by the server for Stellar account and trustline lookups.
# Use the public Horizon mainnet endpoint or your managed Horizon provider URL.
STELLAR_HORIZON_URL=https://horizon.stellar.org
# ── Public (browser-safe) vars ────────────────────────────────────────────────
# Public Soroban RPC endpoint exposed to the browser for client-side Stellar interactions.
# This can match STELLAR_SOROBAN_RPC_URL if that endpoint is safe to expose publicly.
NEXT_PUBLIC_STELLAR_SOROBAN_RPC_URL=https://soroban-rpc.mainnet.stellar.gateway.fm
# Public Base return address shown to the browser when the client needs the destination address.
# This is safe to expose because it is a wallet address, not a private key.
NEXT_PUBLIC_BASE_RETURN_ADDRESS=0xyour_base_return_address_here
# Stellar issuer account for native Stellar USDC used to filter the correct Horizon trustline.
# Get the current mainnet issuer from official Circle or Stellar asset documentation.
NEXT_PUBLIC_STELLAR_USDC_ISSUER=your_stellar_usdc_issuer_here
# CDN URL for serving static assets. Leave empty to serve from the same origin.
# Example: https://cdn.example.com or https://d123456.cloudfront.net
# Used by: src/lib/image-optimization.ts
NEXT_PUBLIC_CDN_URL=
# ── Database ──────────────────────────────────────────────────────────────────
# PostgreSQL connection string used by the server to connect to the database.
# Format: postgresql://user:password@host:port/dbname
# Example: postgresql://postgres:secret@localhost:5432/stellar_spend
DATABASE_URL=postgresql://user:password@localhost:5432/dbname
# ── Sentry ────────────────────────────────────────────────────────────────────
# Sentry DSN for error monitoring. Get it from your Sentry project settings.
# The NEXT_PUBLIC_ variant is used by the browser SDK; the plain variant by the server SDK.
SENTRY_DSN=your_sentry_dsn_here
NEXT_PUBLIC_SENTRY_DSN=your_sentry_dsn_here
# ── CORS ──────────────────────────────────────────────────────────────────────
# Comma-separated list of origins allowed to call the API from a browser.
# In production, set this to your actual frontend origin(s), e.g.:
# ALLOWED_ORIGINS=https://your-app.vercel.app,https://www.your-domain.com
# When left empty, localhost:3000/3001/3002 are allowed (development default).
ALLOWED_ORIGINS=
# ── Idempotency ───────────────────────────────────────────────────────────────
# How long completed idempotency records are kept, in milliseconds.
# Retries with the same Idempotency-Key during this window replay the saved result.
IDEMPOTENCY_TTL_MS=86400000
# How long an in-flight idempotent request stays locked before another retry may take over.
IDEMPOTENCY_LOCK_TTL_MS=300000
# ── Notifications ─────────────────────────────────────────────────────────────
# HTTP endpoint that accepts outbound email notification payloads.
# Payload shape: { from, to, subject, text }
EMAIL_NOTIFICATION_ENDPOINT=
# Optional bearer token for the email notification endpoint.
EMAIL_NOTIFICATION_AUTH_TOKEN=
# Sender email address for outbound transaction notifications.
EMAIL_NOTIFICATION_FROM=noreply@stellar-spend.local
# Set to "true" to enable SMS notifications when an SMS endpoint is configured.
SMS_NOTIFICATION_ENABLED=false
# HTTP endpoint that accepts outbound SMS notification payloads.
# Payload shape: { to, message }
SMS_NOTIFICATION_ENDPOINT=
# Optional bearer token for the SMS notification endpoint.
SMS_NOTIFICATION_AUTH_TOKEN=
# ── API key management ────────────────────────────────────────────────────────
# Bearer token required to manage programmatic API keys via /api/api-keys.
# This is only used for admin operations like create, rotate, revoke, and usage inspection.
API_KEY_ADMIN_TOKEN=
# ── Cron jobs ─────────────────────────────────────────────────────────────────
# Secret value sent in the `x-cron-secret` / `Authorization: Bearer` header
# by cron invokers (Vercel Cron, ECS scheduled task, etc.) to authenticate
# scheduled job endpoints.
CRON_SECRET=your_cron_secret_here
# ── Logging ───────────────────────────────────────────────────────────────────
# Minimum log level emitted at runtime: debug | info | warn | error
# Default: debug in development, info in production.
# Used by: src/lib/logger.ts
LOG_LEVEL=info
# ── Audit log integrity ───────────────────────────────────────────────────────
# HMAC signing key used to compute per-record integrity hashes on audit logs.
# Changing this key invalidates all previously computed hashes.
# Used by: src/lib/audit-logging.ts
AUDIT_LOG_INTEGRITY_KEY=change-me-in-production
# ── CloudWatch Logs (production observability) ────────────────────────────────
# CloudWatch Logs group name targeted by the /api/logs/search admin endpoint.
# Defaults to /ecs/stellar-spend-{ENVIRONMENT} when not set.
# Used by: src/app/api/logs/search/route.ts
CW_LOG_GROUP=/ecs/stellar-spend-production
# Deployment environment name (e.g. production, staging, preview).
# Used to build the default CW_LOG_GROUP when CW_LOG_GROUP is not set explicitly.
ENVIRONMENT=production
# AWS region where CloudWatch Logs are stored.
# Required only when running /api/logs/search in a non-ECS environment.
# Used by: src/app/api/logs/search/route.ts
AWS_REGION=us-east-1