forked from Gildado/PayD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
165 lines (144 loc) · 8.47 KB
/
.env.example
File metadata and controls
165 lines (144 loc) · 8.47 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
# =============================================================================
# PayD Root Environment Configuration
# =============================================================================
# Copy this file to `.env` at the repository root before starting local dev:
# cp .env.example .env
#
# IMPORTANT NOTES:
# - Variables prefixed with `PUBLIC_` or `VITE_` are exposed to the frontend
# and visible in browser JavaScript. DO NOT put secrets in these variables.
# - Keep secrets (API keys, tokens) in backend/.env.example instead
# - This file is for blockchain network config and frontend API routing only
# - For backend secrets, see: backend/.env.example
# - Do NOT commit real .env files to version control (add to .gitignore)
# =============================================================================
# Stellar CLI & Scaffold Configuration (REQUIRED - build + local stellar network)
# =============================================================================
# Stellar Scaffold Environment Profile
# Specifies which SDK environment profile to use for Stellar CLI operations
# Profiles determine: network, RPC endpoints, contract addresses, signer keys
# Values: development (local sandbox)
# staging (testnet or internal staging network)
# production (mainnet)
# testing (isolated test environment, resets often)
# Default: development
# The SDK reads corresponding config from .stellar/ directory
# Check: ls .stellar/keys/{profile}/ to see available keys/accounts
STELLAR_SCAFFOLD_ENV=development
# XDG Config Home (Stellar SDK Configuration Directory)
# Base directory where Stellar CLI stores configuration, keys, and metadata
# For local dev: use relative path e.g., ".config" → creates ./.config in project root
# For CI/CD or per-user: use absolute path e.g., "/home/user/.stellar"
# Recommendation: Use relative path for local dev to keep configs in project
# The SDK creates subdirectories: keys/{profile}/, contracts/, networks/
# Important: Add this directory to .gitignore to prevent key leaks
XDG_CONFIG_HOME=".config"
# =============================================================================
# Frontend Stellar Blockchain Network Configuration (REQUIRED - reads/writes)
# =============================================================================
# Stellar Network Selection (Frontend Target)
# Which Stellar network the frontend UI connects to
# Values: LOCAL (local developer sandbox)
# TESTNET (SDF Stellar testnet, free, resets monthly)
# MAINNET (production Stellar mainnet, real XLM)
# Must match the network that VITE_STELLAR_RPC_URL and VITE_STELLAR_HORIZON_URL connect to
# Mismatches: Would cause transaction failures or rejected signed transactions
# Default: LOCAL (recommended for local dev with docker-compose up)
# PUBLIC prefix: Visible in browser frontend (JavaScript). Not a secret.
PUBLIC_STELLAR_NETWORK="LOCAL"
# Stellar Network Passphrase (Frontend)
# Cryptographic string that identifies the specific Stellar network
# Every transaction signed includes this passphrase; mismatches = invalid tx
# Must match the actual network being used (see PUBLIC_STELLAR_NETWORK)
# Current networks:
# LOCAL: "Standalone Network ; February 2017" (Stellar dev docker sandbox)
# TESTNET: "Test SDF Network ; September 2015" (SDF public testnet)
# MAINNET: "Public Global Stellar Network ; September 2015" (SDF mainnet)
# Important: This is included in transaction signatures; changing it invalidates old signatures
# PUBLIC prefix: Visible in browser. Not a secret (it's in every transaction anyway).
PUBLIC_STELLAR_NETWORK_PASSPHRASE="Standalone Network ; February 2017"
# Stellar RPC Endpoint (Soroban Read/Write operations)
# JSON-RPC endpoint for smart contract reads and transaction submissions
# Used by: Frontend for contract deployments, function calls, state reads
# Must be compatible with PUBLIC_STELLAR_NETWORK selection
# LOCAL: http://localhost:8000/rpc (requires: docker-compose up to run Stellar sandbox)
# TESTNET: Use a Soroban RPC provider (e.g., https://soroban-testnet-rpc.stellar.org)
# MAINNET: Use a Soroban RPC provider (e.g., https://soroban-mainnet-rpc.stellar.org)
# Format: Must include /rpc path for RPC calls
# PUBLIC prefix: Exposed to frontend JavaScript (localhost is fine for dev)
PUBLIC_STELLAR_RPC_URL="http://localhost:8000/rpc"
# Stellar Horizon Endpoint (Transaction history and metadata)
# REST API endpoint for reading ledger data, accounts, transactions
# Used by: Frontend for account balance checks, transaction history, fee estimation
# Must be compatible with PUBLIC_STELLAR_NETWORK selection
# LOCAL: http://localhost:8000 (Stellar dev sandbox with Horizon on same port)
# TESTNET: https://horizon-testnet.stellar.org (SDF public API, rate-limited)
# MAINNET: https://horizon.stellar.org (SDF public API, rate-limited)
# Format: Just the host:port, no path suffix
# PUBLIC prefix: Exposed to frontend JavaScript (localhost is fine for dev)
PUBLIC_STELLAR_HORIZON_URL="http://localhost:8000"
# =============================================================================
# Frontend API & Backend Routing (REQUIRED - requests to backend server)
# =============================================================================
# Primary Backend API Origin
# The base URL where frontend makes all API requests (auth, users, payroll, etc.)
# Must exactly match backend's CORS_ORIGIN setting or requests will be blocked
# Format: http(s)://hostname:port (no trailing slash!)
# LOCAL: http://localhost:3000 (backend dev server)
# STAGING: https://api-staging.payd.io
# PRODUCTION: https://api.payd.io
# Important: MUST include protocol (http:// or https://) and port if not default
# VITE_ prefix: Exposed to frontend JavaScript at build time
VITE_API_URL="http://localhost:3000"
# Fallback/Secondary Backend API Origin
# Alternative API endpoint for specific modules (if needs differ from main)
# Usually kept aligned with VITE_API_URL unless intentionally split
# Format: Same as VITE_API_URL
# Most modules use VITE_API_URL; only special cases use this fallback
# Leave aligned with VITE_API_URL unless you have a specific reason to differ
# Examples of split: analytics API on different domain, legacy endpoint
# VITE_ prefix: Exposed to frontend JavaScript at build time
VITE_API_BASE_URL="http://localhost:3000"
# Backend auth endpoint origin used by login callbacks.
VITE_BACKEND_URL="http://localhost:4000"
# -----------------------------------------------------------------------------
# Frontend observability + links (optional)
# -----------------------------------------------------------------------------
# Sentry DSN for frontend error reporting. Leave empty in local/dev.
VITE_SENTRY_DSN=""
# Explorer URL prefix used to open transaction links in notifications.
# The tx hash is appended automatically by the app.
VITE_STELLAR_EXPLORER_TX_URL="https://stellar.expert/explorer/testnet/tx"
# -----------------------------------------------------------------------------
# Optional contract and app tuning variables
# -----------------------------------------------------------------------------
# Set these only when you deploy custom contracts/method names.
# VITE_BULK_PAYMENT_CONTRACT_ID=""
# VITE_REVENUE_SPLIT_CONTRACT_ID=""
# VITE_CROSS_ASSET_PAYMENT_CONTRACT_ID=""
# VITE_BULK_PAYMENT_GET_BATCH_METHOD="get_batch"
# VITE_BULK_PAYMENT_GET_PAYMENT_METHOD="get_payment"
# VITE_BULK_PAYMENT_RETRY_METHOD="retry_failed_batch"
# VITE_REVENUE_SPLIT_READ_METHODS="get_participants,get_total_shares"
# VITE_REVENUE_SPLIT_UPDATE_METHODS="add_participant,remove_participant,update_shares"
# Display name shown on the employer dashboard top bar (optional).
# VITE_ORG_DISPLAY_NAME="Acme Payroll"
# VITE_ORG_PUBLIC_KEY=""
# VITE_SOROBAN_READ_SOURCE=""
# VITE_PREFERRED_STABLECOIN="USDC"
# VITE_USDC_ISSUER=""
# VITE_EURC_ISSUER=""
# VITE_ORGUSD_ISSUER=""
# -----------------------------------------------------------------------------
# Network profile quick swaps (uncomment one profile when needed)
# -----------------------------------------------------------------------------
# TESTNET profile:
# PUBLIC_STELLAR_NETWORK="TESTNET"
# PUBLIC_STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
# PUBLIC_STELLAR_RPC_URL="https://soroban-testnet.stellar.org"
# PUBLIC_STELLAR_HORIZON_URL="https://horizon-testnet.stellar.org"
# MAINNET profile:
# PUBLIC_STELLAR_NETWORK="MAINNET"
# PUBLIC_STELLAR_NETWORK_PASSPHRASE="Public Global Stellar Network ; September 2015"
# PUBLIC_STELLAR_RPC_URL="https://mainnet.sorobanrpc.com"
# PUBLIC_STELLAR_HORIZON_URL="https://horizon.stellar.org"