Repository navigation
Expand file tree
/
Copy path.env
More file actions
137 lines (88 loc) · 6.69 KB
/
Copy path.env
File metadata and controls
137 lines (88 loc) · 6.69 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
# ─────────────────────────────────────────────────────────────
# 🧀 CHEESE WALLET — Backend Environment Variables
# ─────────────────────────────────────────────────────────────
# Copy this file to .env and fill in your values.
# Never commit .env to version control.
#
# Required fields are marked ← REQUIRED
# Fields with defaults can be left as-is for local development.
# ─────────────────────────────────────────────────────────────
# ── App ──────────────────────────────────────────────────────
NODE_ENV=development # development | production | test
PORT=3001 # HTTP port the API listens on
# URL of the frontend PWA (used for CORS allow-list)
FRONTEND_URL=http://localhost:3000 # ← REQUIRED in production
# Base URL for generated PayLink share URLs
PAYLINK_BASE_URL=https://cheesepay.xyz # ← REQUIRED in production
# ── PostgreSQL ───────────────────────────────────────────────
DB_HOST=localhost
DB_PORT=5432
DB_NAME=cheese_wallet
DB_USER=postgres
DB_PASS=BNG482@AA # ← REQUIRED (use a strong password in production)
# Optional: full connection URL (overrides individual DB_* vars if your ORM supports it)
# DATABASE_URL=postgresql://cheese:cheese@localhost:5432/cheese_wallet
# ── Redis ────────────────────────────────────────────────────
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD= # Leave blank if Redis has no auth (local dev)
# ← REQUIRED in production
# ── JWT ──────────────────────────────────────────────────────
# Generate secrets with: node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
JWT_ACCESS_SECRET=replace-with-64-byte-random-hex # ← REQUIRED
JWT_ACCESS_EXPIRES=15m # Access token TTL (e.g. 15m, 1h)
JWT_REFRESH_SECRET=replace-with-different-64-byte-hex # ← REQUIRED (must differ from access secret)
JWT_REFRESH_EXPIRES=30d # Refresh token TTL
# ── Rate Limiting (ThrottlerGuard) ───────────────────────────
THROTTLE_TTL=60 # Window size in seconds
THROTTLE_LIMIT=100 # Max requests per IP per window
# ── OTP ──────────────────────────────────────────────────────
OTP_TTL_SECONDS=300 # How long an OTP is valid (300 = 5 minutes)
# ── SMTP (legacy fallback — prefer ZeptoMail below) ──────────
# Only needed if EmailService falls back to nodemailer directly.
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=noreply@cheesewallet.app
SMTP_PASS=your-smtp-password
EMAIL_FROM=Cheese Wallet <noreply@cheesewallet.app>
# ── ZeptoMail (primary transactional email) ──────────────────
# Get your API key at: https://zeptomail.zoho.com
ZEPTOMAIL_API_KEY=your-zeptomail-api-key # ← REQUIRED
ZEPTOMAIL_FROM_ADDRESS=noreply@cheesewallet.app
ZEPTOMAIL_FROM_NAME=Cheese Wallet
ZEPTOMAIL_REPLY_TO=support@cheesewallet.app
# ── Stellar Blockchain ───────────────────────────────────────
# "testnet" or "mainnet"
STELLAR_NETWORK=testnet
# Horizon RPC endpoint
# Testnet: https://horizon-testnet.stellar.org
# Mainnet: https://horizon.stellar.org
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
# USDC asset issuer address
# Testnet (Circle): GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
# Mainnet (Circle): GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
STELLAR_USDC_ISSUER=GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
# Master Stellar keypair — funds new user wallets with XLM for fees + establishes USDC trustlines
# Generate with: stellar-sdk Keypair.random().secret()
STELLAR_MASTER_SECRET=S...your-master-stellar-secret-key # ← REQUIRED (keep this extremely safe)
# AES-256-GCM key for encrypting user Stellar secret keys + card numbers at rest
# Generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
STELLAR_WALLET_ENCRYPTION_KEY=replace-with-32-byte-hex # ← REQUIRED
# Platform wallet address that receives protocol fees (PayLink 0.1% fee, etc.)
STELLAR_PLATFORM_WALLET_ADDRESS=G...your-platform-wallet-address # ← REQUIRED
# ── Exchange Rate ────────────────────────────────────────────
# Provider URL for USD/NGN rate (must return JSON with a rate field)
# Example providers: ExchangeRate-API, Open Exchange Rates, Binance P2P feed
EXCHANGE_RATE_URL=https://api.exchangerate-api.com/v4/latest/USD # ← REQUIRED
# Platform spread added on top of market rate (NGN buy rate shown to users)
# 1.5 means the user gets 1.5% less than the raw market rate
NGN_SPREAD_PERCENT=1.5
# ── Paystack ─────────────────────────────────────────────────
# Used for: bank list, account name resolution, NGN payouts
# Get keys at: https://dashboard.paystack.com/#/settings/developers
PAYSTACK_SECRET_KEY=sk_test_your-paystack-secret-key # ← REQUIRED (sk_live_... in production)
PAYSTACK_PUBLIC_KEY=pk_test_your-paystack-public-key # ← REQUIRED (pk_live_... in production)
# ── Earn Module ───────────────────────────────────────────────
EARN_DEFAULT_APY=5 # Annual percentage yield offered to users (%)
# ── Referral Module ───────────────────────────────────────────
REFERRAL_REWARD_USDC=2 # USDC reward paid to referrer per successful signup