forked from TrusTrove/TrusTrove-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
247 lines (214 loc) · 8.31 KB
/
Copy path.env.example
File metadata and controls
247 lines (214 loc) · 8.31 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# TrusTrove Environment Variables
#
# This root file is the single source of truth for local, Testnet, and Mainnet
# configuration across the frontend app, Go indexer/API, and TypeScript SDK.
# Copy it before local development:
#
# cp .env.example .env.local
#
# For a web-only setup, the app-specific frontend template is
# apps/web/.env.example. It contains the NEXT_PUBLIC_* subset used by the
# Next.js app and the TypeScript SDK. For the full local stack, keep the root
# file as the shared source of truth for both the web app and the indexer.
#
# Required means the app or indexer should not run without the value.
#
# ── Variable naming conventions ──────────────────────────────────────────────
# NEXT_PUBLIC_* — Read by the Next.js frontend and TypeScript SDK. These are
# bundled into the browser at build time by Next.js.
# Set on Vercel (or in .env.local for local dev).
#
# Plain names — Read only by the Go indexer (server-side process). These
# are never exposed to the browser. Set on Render (or in
# .env.local for local dev).
#
# For local monorepo development, .env.local must contain BOTH sets so that
# `apps/web` and `indexer/` each have the variables they need.
# Migration note: if you have an existing .env.local, add the plain-named
# backend variables listed in the "Go indexer / backend" section below.
# ── Frontend / SDK (Next.js NEXT_PUBLIC_*) ───────────────────────────────────
# These are read by apps/web and packages/sdk. Set on Vercel.
# NEXT_PUBLIC_STELLAR_NETWORK
# Layer: frontend, SDK
# Type: string enum: testnet | mainnet | futurenet
# Required: yes
# Default: testnet
NEXT_PUBLIC_STELLAR_NETWORK=testnet
# NEXT_PUBLIC_HORIZON_URL
# Layer: frontend, SDK
# Type: URL string
# Required: yes
# Default: https://horizon-testnet.stellar.org
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org
# NEXT_PUBLIC_SOROBAN_RPC_URL
# Layer: frontend, SDK
# Type: URL string
# Required: yes
# Default: https://soroban-testnet.stellar.org
NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# NEXT_PUBLIC_NETWORK_PASSPHRASE
# Layer: frontend, SDK
# Type: string
# Required: yes
# Default: Test SDF Network ; September 2015
NEXT_PUBLIC_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
# ── Soroban contract IDs (frontend / SDK) ────────────────────────────────────
# NEXT_PUBLIC_REGISTRY_CONTRACT_ID
# Layer: frontend, SDK
# Type: Stellar contract ID string
# Required: yes
NEXT_PUBLIC_REGISTRY_CONTRACT_ID=CABGWVIZFF62FG67ZGFEP67NEEY4WYTMFURDMFTKKNRDAFPKPOJDTN4C
# NEXT_PUBLIC_INVOICE_CONTRACT_ID
# Layer: frontend, SDK
# Type: Stellar contract ID string
# Required: yes
NEXT_PUBLIC_INVOICE_CONTRACT_ID=CA4O3MR7LWHRSUDBNU6FY6UDFFYBN7TGBZXBDZB4OYYXFYXIFJ6RJF6B
# NEXT_PUBLIC_POOL_CONTRACT_ID
# Layer: frontend, SDK
# Type: Stellar contract ID string
# Required: yes
NEXT_PUBLIC_POOL_CONTRACT_ID=CAKEWH7SJCXGV2MH2WZYIX3QDPTSSBQFXYVYBOWAGLNBBZMPLE2US6CS
# NEXT_PUBLIC_ESCROW_CONTRACT_ID
# Layer: frontend, SDK
# Type: Stellar contract ID string
# Required: yes
NEXT_PUBLIC_ESCROW_CONTRACT_ID=CAJWGUKDTTC3SKN4RAAY72J4DVIIYSCFHX6GIMNTT22ABMISJK4GBCEH
# ── Asset configuration (frontend / SDK) ─────────────────────────────────────
# NEXT_PUBLIC_USDC_ISSUER
# Layer: frontend, SDK
# Type: Stellar public key string
# Required: yes
NEXT_PUBLIC_USDC_ISSUER=GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
# NEXT_PUBLIC_USDC_ASSET_CODE
# Layer: frontend, SDK
# Type: string
# Required: yes
NEXT_PUBLIC_USDC_ASSET_CODE=USDC
# ── Go indexer / backend (plain names, no NEXT_PUBLIC_ prefix) ───────────────
# These are read only by the Go indexer server process. They share the same
# values as their NEXT_PUBLIC_* counterparts above but use a backend-appropriate
# naming convention. Set on Render (or in .env.local for local monorepo dev).
# STELLAR_NETWORK
# Layer: backend/indexer
# Type: string enum: testnet | mainnet | futurenet
# Required: yes
STELLAR_NETWORK=testnet
# HORIZON_URL
# Layer: backend/indexer
# Type: URL string
# Required: yes
HORIZON_URL=https://horizon-testnet.stellar.org
# SOROBAN_RPC_URL
# Layer: backend/indexer
# Type: URL string
# Required: yes
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# NETWORK_PASSPHRASE
# Layer: backend/indexer
# Type: string
# Required: yes
NETWORK_PASSPHRASE=Test SDF Network ; September 2015
# REGISTRY_CONTRACT_ID
# Layer: backend/indexer
# Type: Stellar contract ID string
# Required: yes
REGISTRY_CONTRACT_ID=CABGWVIZFF62FG67ZGFEP67NEEY4WYTMFURDMFTKKNRDAFPKPOJDTN4C
# INVOICE_CONTRACT_ID
# Layer: backend/indexer
# Type: Stellar contract ID string
# Required: yes
INVOICE_CONTRACT_ID=CA4O3MR7LWHRSUDBNU6FY6UDFFYBN7TGBZXBDZB4OYYXFYXIFJ6RJF6B
# POOL_CONTRACT_ID
# Layer: backend/indexer
# Type: Stellar contract ID string
# Required: yes
POOL_CONTRACT_ID=CAKEWH7SJCXGV2MH2WZYIX3QDPTSSBQFXYVYBOWAGLNBBZMPLE2US6CS
# ESCROW_CONTRACT_ID
# Layer: backend/indexer
# Type: Stellar contract ID string
# Required: yes
ESCROW_CONTRACT_ID=CAJWGUKDTTC3SKN4RAAY72J4DVIIYSCFHX6GIMNTT22ABMISJK4GBCEH
# AGENT_REGISTRY_CONTRACT
# Layer: backend/indexer
# Type: Stellar contract ID string
# Required: no (until Underwrite's agent-registry contract is deployed)
# Default: none
# Source: deployed from the separate underwrite-contract repo. Points the
# Invoice contract at Underwrite's agent-registry for submit_attestation's
# cross-contract get_agent lookup.
AGENT_REGISTRY_CONTRACT=
# USDC_ISSUER
# Layer: backend/indexer
# Type: Stellar public key string
# Required: yes
USDC_ISSUER=GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
# USDC_ASSET_CODE
# Layer: backend/indexer
# Type: string
# Required: yes
USDC_ASSET_CODE=USDC
# ── Indexer / Go API ─────────────────────────────────────────────────────────
# DATABASE_URL
# Layer: indexer/backend
# Type: PostgreSQL connection URL
# Required: yes
# Default: none
# Source: local Docker Compose, Neon, Render PostgreSQL, or other Postgres
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/trusttrove?sslmode=disable
# DATABASE_URL_UNPOOLED
# Layer: indexer/backend
# Type: PostgreSQL connection URL
# Required: no
# Default: none
# Source: Neon direct connection, migration tooling, or admin tasks
DATABASE_URL_UNPOOLED=
# API_PORT
# Layer: indexer/backend
# Type: integer port
# Required: no
# Default: 8080, or platform-provided PORT on Render
# Source: local .env, Render PORT fallback
API_PORT=8080
# PORT
# Layer: indexer/backend deployment
# Type: integer port
# Required: no
# Default: unused unless API_PORT is empty
# Source: Render or other PaaS runtime
PORT=
# INDEXER_POLL_INTERVAL_MS
# Layer: indexer/backend
# Type: integer milliseconds
# Required: no
# Default: 5000
# Source: local .env or deployment env
INDEXER_POLL_INTERVAL_MS=5000
# JWT_SECRET
# Layer: indexer/backend
# Type: string secret
# Required: yes
# Default: none
# Source: generated secret in local/deployment secret manager
JWT_SECRET=change_me_before_production
# JWT_EXPIRY_HOURS
# Layer: indexer/backend
# Type: integer hours
# Required: no
# Default: 24
# Source: local .env or deployment env
JWT_EXPIRY_HOURS=24
# ALLOWED_ORIGINS
# Layer: indexer/backend
# Type: comma-separated URLs
# Required: no
# Default: http://localhost:3000
# Source: Render or local .env
ALLOWED_ORIGINS=https://trustrove.vercel.app,http://localhost:3000
# ── Frontend-only deployment settings ────────────────────────────────────────
# NEXT_PUBLIC_API_BASE_URL
# Layer: frontend
# Type: URL string
# Required: no
# Default: http://localhost:8080 if the frontend API helper is left unconfigured
# Source: Vercel env or local .env.local
NEXT_PUBLIC_API_BASE_URL=http://localhost:8080