|
1 | | -# ----------------------------------------------------------------------------- |
2 | | -# PayD root environment template |
3 | | -# ----------------------------------------------------------------------------- |
| 1 | +# ============================================================================= |
| 2 | +# PayD Root Environment Configuration |
| 3 | +# ============================================================================= |
4 | 4 | # Copy this file to `.env` at the repository root before starting local dev: |
5 | 5 | # cp .env.example .env |
6 | 6 | # |
7 | | -# Notes: |
8 | | -# - Variables prefixed with `PUBLIC_` / `VITE_` are exposed to the frontend. |
9 | | -# - Keep secrets out of this root file unless absolutely required for local dev. |
10 | | -# - Use `backend/.env.example` for backend server credentials and secrets. |
| 7 | +# IMPORTANT NOTES: |
| 8 | +# - Variables prefixed with `PUBLIC_` or `VITE_` are exposed to the frontend |
| 9 | +# and visible in browser JavaScript. DO NOT put secrets in these variables. |
| 10 | +# - Keep secrets (API keys, tokens) in backend/.env.example instead |
| 11 | +# - This file is for blockchain network config and frontend API routing only |
| 12 | +# - For backend secrets, see: backend/.env.example |
| 13 | +# - Do NOT commit real .env files to version control (add to .gitignore) |
11 | 14 |
|
12 | | -# ----------------------------------------------------------------------------- |
13 | | -# Stellar scaffold / CLI runtime settings |
14 | | -# ----------------------------------------------------------------------------- |
15 | | -# Which scaffold environment profile to use. |
16 | | -# Allowed examples: development | testing | staging | production |
| 15 | + |
| 16 | +# ============================================================================= |
| 17 | +# Stellar CLI & Scaffold Configuration (REQUIRED - build + local stellar network) |
| 18 | +# ============================================================================= |
| 19 | + |
| 20 | +# Stellar Scaffold Environment Profile |
| 21 | +# Specifies which SDK environment profile to use for Stellar CLI operations |
| 22 | +# Profiles determine: network, RPC endpoints, contract addresses, signer keys |
| 23 | +# Values: development (local sandbox) |
| 24 | +# staging (testnet or internal staging network) |
| 25 | +# production (mainnet) |
| 26 | +# testing (isolated test environment, resets often) |
| 27 | +# Default: development |
| 28 | +# The SDK reads corresponding config from .stellar/ directory |
| 29 | +# Check: ls .stellar/keys/{profile}/ to see available keys/accounts |
17 | 30 | STELLAR_SCAFFOLD_ENV=development |
18 | 31 |
|
19 | | -# Where Stellar CLI stores local config (relative path shown for local dev). |
20 | | -# Use an absolute path in CI if needed. |
| 32 | +# XDG Config Home (Stellar SDK Configuration Directory) |
| 33 | +# Base directory where Stellar CLI stores configuration, keys, and metadata |
| 34 | +# For local dev: use relative path e.g., ".config" → creates ./.config in project root |
| 35 | +# For CI/CD or per-user: use absolute path e.g., "/home/user/.stellar" |
| 36 | +# Recommendation: Use relative path for local dev to keep configs in project |
| 37 | +# The SDK creates subdirectories: keys/{profile}/, contracts/, networks/ |
| 38 | +# Important: Add this directory to .gitignore to prevent key leaks |
21 | 39 | XDG_CONFIG_HOME=".config" |
22 | 40 |
|
23 | | -# ----------------------------------------------------------------------------- |
24 | | -# Frontend network configuration (required for blockchain reads/writes) |
25 | | -# ----------------------------------------------------------------------------- |
26 | | -# Which Stellar network the frontend should target. |
27 | | -# Common values: LOCAL, TESTNET, MAINNET |
| 41 | + |
| 42 | +# ============================================================================= |
| 43 | +# Frontend Stellar Blockchain Network Configuration (REQUIRED - reads/writes) |
| 44 | +# ============================================================================= |
| 45 | + |
| 46 | +# Stellar Network Selection (Frontend Target) |
| 47 | +# Which Stellar network the frontend UI connects to |
| 48 | +# Values: LOCAL (local developer sandbox) |
| 49 | +# TESTNET (SDF Stellar testnet, free, resets monthly) |
| 50 | +# MAINNET (production Stellar mainnet, real XLM) |
| 51 | +# Must match the network that VITE_STELLAR_RPC_URL and VITE_STELLAR_HORIZON_URL connect to |
| 52 | +# Mismatches: Would cause transaction failures or rejected signed transactions |
| 53 | +# Default: LOCAL (recommended for local dev with docker-compose up) |
| 54 | +# PUBLIC prefix: Visible in browser frontend (JavaScript). Not a secret. |
28 | 55 | PUBLIC_STELLAR_NETWORK="LOCAL" |
29 | 56 |
|
30 | | -# Passphrase for the selected network. |
31 | | -# LOCAL example: "Standalone Network ; February 2017" |
32 | | -# TESTNET example: "Test SDF Network ; September 2015" |
33 | | -# MAINNET example: "Public Global Stellar Network ; September 2015" |
| 57 | +# Stellar Network Passphrase (Frontend) |
| 58 | +# Cryptographic string that identifies the specific Stellar network |
| 59 | +# Every transaction signed includes this passphrase; mismatches = invalid tx |
| 60 | +# Must match the actual network being used (see PUBLIC_STELLAR_NETWORK) |
| 61 | +# Current networks: |
| 62 | +# LOCAL: "Standalone Network ; February 2017" (Stellar dev docker sandbox) |
| 63 | +# TESTNET: "Test SDF Network ; September 2015" (SDF public testnet) |
| 64 | +# MAINNET: "Public Global Stellar Network ; September 2015" (SDF mainnet) |
| 65 | +# Important: This is included in transaction signatures; changing it invalidates old signatures |
| 66 | +# PUBLIC prefix: Visible in browser. Not a secret (it's in every transaction anyway). |
34 | 67 | PUBLIC_STELLAR_NETWORK_PASSPHRASE="Standalone Network ; February 2017" |
35 | 68 |
|
36 | | -# Soroban RPC endpoint used by contract-read/write flows in the frontend. |
| 69 | +# Stellar RPC Endpoint (Soroban Read/Write operations) |
| 70 | +# JSON-RPC endpoint for smart contract reads and transaction submissions |
| 71 | +# Used by: Frontend for contract deployments, function calls, state reads |
| 72 | +# Must be compatible with PUBLIC_STELLAR_NETWORK selection |
| 73 | +# LOCAL: http://localhost:8000/rpc (requires: docker-compose up to run Stellar sandbox) |
| 74 | +# TESTNET: Use a Soroban RPC provider (e.g., https://soroban-testnet-rpc.stellar.org) |
| 75 | +# MAINNET: Use a Soroban RPC provider (e.g., https://soroban-mainnet-rpc.stellar.org) |
| 76 | +# Format: Must include /rpc path for RPC calls |
| 77 | +# PUBLIC prefix: Exposed to frontend JavaScript (localhost is fine for dev) |
37 | 78 | PUBLIC_STELLAR_RPC_URL="http://localhost:8000/rpc" |
38 | 79 |
|
39 | | -# Horizon endpoint used by frontend transaction/history utilities. |
| 80 | +# Stellar Horizon Endpoint (Transaction history and metadata) |
| 81 | +# REST API endpoint for reading ledger data, accounts, transactions |
| 82 | +# Used by: Frontend for account balance checks, transaction history, fee estimation |
| 83 | +# Must be compatible with PUBLIC_STELLAR_NETWORK selection |
| 84 | +# LOCAL: http://localhost:8000 (Stellar dev sandbox with Horizon on same port) |
| 85 | +# TESTNET: https://horizon-testnet.stellar.org (SDF public API, rate-limited) |
| 86 | +# MAINNET: https://horizon.stellar.org (SDF public API, rate-limited) |
| 87 | +# Format: Just the host:port, no path suffix |
| 88 | +# PUBLIC prefix: Exposed to frontend JavaScript (localhost is fine for dev) |
40 | 89 | PUBLIC_STELLAR_HORIZON_URL="http://localhost:8000" |
41 | 90 |
|
42 | | -# ----------------------------------------------------------------------------- |
43 | | -# Frontend API + auth routing (required for local full-stack runs) |
44 | | -# ----------------------------------------------------------------------------- |
45 | | -# Primary API origin used by most frontend service modules. |
| 91 | + |
| 92 | +# ============================================================================= |
| 93 | +# Frontend API & Backend Routing (REQUIRED - requests to backend server) |
| 94 | +# ============================================================================= |
| 95 | + |
| 96 | +# Primary Backend API Origin |
| 97 | +# The base URL where frontend makes all API requests (auth, users, payroll, etc.) |
| 98 | +# Must exactly match backend's CORS_ORIGIN setting or requests will be blocked |
| 99 | +# Format: http(s)://hostname:port (no trailing slash!) |
| 100 | +# LOCAL: http://localhost:3000 (backend dev server) |
| 101 | +# STAGING: https://api-staging.payd.io |
| 102 | +# PRODUCTION: https://api.payd.io |
| 103 | +# Important: MUST include protocol (http:// or https://) and port if not default |
| 104 | +# VITE_ prefix: Exposed to frontend JavaScript at build time |
46 | 105 | VITE_API_URL="http://localhost:3000" |
47 | 106 |
|
48 | | -# Optional fallback API origin used by selected modules. |
49 | | -# Keep aligned with VITE_API_URL unless intentionally split. |
| 107 | +# Fallback/Secondary Backend API Origin |
| 108 | +# Alternative API endpoint for specific modules (if needs differ from main) |
| 109 | +# Usually kept aligned with VITE_API_URL unless intentionally split |
| 110 | +# Format: Same as VITE_API_URL |
| 111 | +# Most modules use VITE_API_URL; only special cases use this fallback |
| 112 | +# Leave aligned with VITE_API_URL unless you have a specific reason to differ |
| 113 | +# Examples of split: analytics API on different domain, legacy endpoint |
| 114 | +# VITE_ prefix: Exposed to frontend JavaScript at build time |
50 | 115 | VITE_API_BASE_URL="http://localhost:3000" |
51 | 116 |
|
52 | 117 | # Backend auth endpoint origin used by login callbacks. |
|
0 commit comments