-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
157 lines (122 loc) · 5.84 KB
/
.env.example
File metadata and controls
157 lines (122 loc) · 5.84 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
# Villa Environment Configuration
# ================================
# This file documents ALL environment variables used across the monorepo.
# Copy to .env.local for local development (gitignored).
#
# Sync commands:
# ./scripts/env-sync.sh pull github # Pull secrets from GitHub to .env.local
# ./scripts/env-sync.sh push github # Push .env.local to GitHub Secrets
# ./scripts/env-sync.sh push do # Push to DigitalOcean App Platform
# ./scripts/env-sync.sh validate # Validate .env.local has all required vars
# Per-app environment files:
# apps/hub/.env.example Hub (villa.cash)
# apps/key/.env.example Key (key.villa.cash)
# apps/developers/.env.example Developers (docs.villa.cash)
# apps/api/.env.example API service
# apps/telemetry/.env.example Telemetry (local only)
# contracts/.env.example Solidity contracts
# ============================================================================
# INFRASTRUCTURE SECRETS (GitHub Secrets + DO App Platform)
# ============================================================================
# DigitalOcean
DIGITALOCEAN_ACCESS_TOKEN= # DO API token for deployments
# Cloudflare
CLOUDFLARE_API_TOKEN= # Cloudflare API token
CLOUDFLARE_ZONE_ID= # villa.cash zone ID
# Database (PostgreSQL on DigitalOcean)
DATABASE_URL= # postgresql://user:pass@host:25060/villa?sslmode=require
DATABASE_POOL_URL= # postgresql://user:pass@host:25061/villa?sslmode=require (pooled)
# Blockchain
DEPLOYER_PRIVATE_KEY= # Contract deployment key (Base Sepolia/Mainnet)
BASESCAN_API_KEY= # Etherscan API key for contract verification
# Railway
RAILWAY_TOKEN= # Railway API token (generate at Railway Dashboard > Settings > Tokens)
# # Also set as GitHub Secret for CI/CD workflows
# Nickname Minting (V3 Contract)
NICKNAME_RESOLVER_V3_ADDRESS=0x180ddE044F1627156Cac6b2d068706508902AE9C
MINTER_PRIVATE_KEY= # Server wallet with MINTER_ROLE on V3 contract
# API Security
REVALIDATE_TOKEN= # Secret token for revalidation API
MIGRATE_SECRET= # Secret token for database migration API
# ============================================================================
# HUB APP (apps/hub) - NEXT_PUBLIC_ vars are exposed to browser
# ============================================================================
# Application
NEXT_PUBLIC_APP_URL=http://localhost:3000
NODE_ENV=development
# Blockchain Configuration
NEXT_PUBLIC_CHAIN_ID=84532 # 84532 (Base Sepolia) or 8453 (Base Mainnet)
# Build Info (set by CI)
NEXT_PUBLIC_VERSION=0.2.0 # App version
NEXT_PUBLIC_BUILD_HASH= # Build hash (set by CI)
NEXT_PUBLIC_GIT_SHA= # Git commit SHA (set by CI)
NEXT_PUBLIC_BUILD_TIME= # Build timestamp (set by CI)
NEXT_PUBLIC_ENV=development # Environment name
# Porto ID Configuration
NEXT_PUBLIC_PORTO_ENV=stg # stg or prod
NEXT_PUBLIC_PORTO_DIALOG_HOST=https://id.porto.sh
# Blockchain RPC URLs
BASE_RPC_URL=https://mainnet.base.org
BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
# API
NEXT_PUBLIC_API_URL=/api # API base URL (relative or absolute)
# Unforgettable SDK (Face Recovery - Phase 2)
NEXT_PUBLIC_UNFORGETTABLE_APP_ID=
# Map Configuration (OpenStreetMap)
NEXT_PUBLIC_TILE_SERVER_URL=https://tile.openstreetmap.org/{z}/{x}/{y}.png
NEXT_PUBLIC_MAP_DEFAULT_CENTER_LAT=10.9333
NEXT_PUBLIC_MAP_DEFAULT_CENTER_LNG=108.2833
# Development Settings
NEXT_PUBLIC_ENABLE_DEV_TOOLS=true
NEXT_PUBLIC_LOG_LEVEL=debug
# Glide Configuration (optional - for deposits)
# AI Configuration (optional)
ANTHROPIC_API_KEY=
# ============================================================================
# API SERVICE (apps/api)
# ============================================================================
# Server
PORT=3001
APP_ENV=local # local, development, staging, production, test
# Database overrides (optional - DATABASE_URL is primary)
DATABASE_SSL= # false, true, require, prefer
DB_MAX_CONNECTIONS=10
DB_IDLE_TIMEOUT=20
DB_CONNECT_TIMEOUT=10
DB_RETRY_ATTEMPTS=3
DB_RETRY_DELAY=1000
DB_ENABLE_FALLBACK=false # true only for local dev
# Logging
LOG_LEVEL=debug
LOG_DB_CONFIG=false
# ============================================================================
# CONTRACTS (contracts/)
# ============================================================================
# Deployment (also uses DEPLOYER_PRIVATE_KEY, BASESCAN_API_KEY)
BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
BASE_MAINNET_RPC_URL=https://mainnet.base.org
# ============================================================================
# CI/CD (GitHub Actions)
# ============================================================================
# These are set in GitHub Secrets, not in .env files:
# - DIGITALOCEAN_ACCESS_TOKEN
# - CLOUDFLARE_API_TOKEN
# - CLOUDFLARE_ZONE_ID
# - DATABASE_URL
# - DATABASE_POOL_URL
# - DEPLOYER_PRIVATE_KEY
# - BASESCAN_API_KEY
# ============================================================================
# TELEMETRY APP (apps/telemetry) - Local Development Only
# ============================================================================
# Paths
VILLA_ROOT=/path/to/villa # Path to Villa repository root
BACKUP_DIR=/path/to/backups # Path for database backups
# ============================================================================
# TESTING
# ============================================================================
# Playwright
BASE_URL=http://localhost:3000 # Test base URL
CI=false # Set by CI environment
# v0.dev (for UI generation testing)
V0_API_KEY= # v0.dev API key for automated UI testing