-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
248 lines (202 loc) · 9.63 KB
/
.env.example
File metadata and controls
248 lines (202 loc) · 9.63 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
248
# =============================================================================
# ETH SHOT - Environment Configuration
# =============================================================================
# Copy this file to .env and fill in your actual values
# DO NOT commit .env to version control - it contains sensitive information
# =============================================================================
# SUPABASE DATABASE CONFIGURATION
# =============================================================================
# Get these from your Supabase project dashboard at https://supabase.com
VITE_SUPABASE_URL=https://your-project-id.supabase.co
VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
# PUBLIC_ prefixed variables for SvelteKit (required by supabase.js)
PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_DB_PASSWORD=your-database-password
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# JWT Keys (for ES256 signing) - Copy the contents of the respective files as single-line JSON
# Copy the contents of jwk-private-key.json as a single line JSON string
JWT_PRIVATE_KEY_JWK=contents-of-jwk-private-key.json-file
# Copy the contents of jwt.json as a single line JSON string
JWT_PUBLIC_KEY_JWK=contents-of-jwt.json-file
# =============================================================================
# SECURITY CONFIGURATION (CRITICAL - SERVER-SIDE ONLY)
# =============================================================================
# JWT Secret for server-side authentication - NEVER expose to client
# Generate a secure random string for production: openssl rand -base64 32
# This MUST be kept secret and NEVER exposed to the client
SUPABASE_JWT_SECRET=your-super-secret-jwt-signing-key-here
# Rate limiting (requests per minute per IP)
RATE_LIMIT_RPM=60
# CORS origins (comma-separated for multiple origins)
CORS_ORIGINS=http://localhost:5173,https://ethshot.io
# =============================================================================
# SMART CONTRACT CONFIGURATION
# =============================================================================
# Contract address after deployment (will be generated during deployment)
VITE_CONTRACT_ADDRESS=0x1234567890123456789012345678901234567890
# RPC URL for blockchain connection
# Sepolia Testnet (recommended for testing)
VITE_RPC_URL=https://sepolia.infura.io/v3/your-infura-project-id
# Alternative: Alchemy
# VITE_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/your-alchemy-key
ETHERSCAN_API_KEY=your-etherscan-api-key
PRIVATE_KEY=0x1234567890123456789012345678901234567890123456789012345678901234
# Network configuration
VITE_NETWORK_NAME=Sepolia Testnet
VITE_CHAIN_ID=11155111
# Commission Configuration
# The wallet address that will receive the 10% house commission
# This address becomes the contract owner and can withdraw house funds
HOUSE_COMMISSION_ADDRESS=0x1234567890123456789012345678901234567890
# =============================================================================
# APPLICATION CONFIGURATION
# =============================================================================
# Your application's public URL (used for social sharing)
VITE_APP_URL=https://ethshot.io
# Game configuration
VITE_GAME_NAME=ETH Shot
VITE_GAME_DESCRIPTION=Take your shot at the ETH jackpot! 0.0005 ETH per shot, 1% chance to win big!
# Social sharing configuration
VITE_TWITTER_HANDLE=@your-twitter-handle
VITE_DISCORD_INVITE=https://discord.gg/your-invite-code
# =============================================================================
# WEB3 WALLET CONFIGURATION
# =============================================================================
# WalletConnect Project ID (get from https://cloud.walletconnect.com)
VITE_WALLETCONNECT_PROJECT_ID=your-walletconnect-project-id
# =============================================================================
# DEVELOPMENT CONFIGURATION
# =============================================================================
# Environment mode
NODE_ENV=development
# Development server configuration
PORT=5173
HOST=localhost
# Enable debug logging in development
DEBUG=true
# =============================================================================
# DEPLOYMENT CONFIGURATION (Production Only)
# =============================================================================
# Set these for production deployment
# Vercel configuration
# VERCEL_URL=ethshot.vercel.app
# VERCEL_ENV=production
# Analytics (optional)
# VITE_GOOGLE_ANALYTICS_ID=G-XXXXXXXXXX
# VITE_PLAUSIBLE_DOMAIN=ethshot.io
# =============================================================================
# BLOCKCHAIN NETWORK ALTERNATIVES
# =============================================================================
# Uncomment and use these for different networks:
# Ethereum Mainnet (Production)
# VITE_RPC_URL=https://mainnet.infura.io/v3/your-infura-project-id
# VITE_NETWORK_NAME=Ethereum Mainnet
# VITE_CHAIN_ID=1
# Polygon Mainnet (Alternative)
# VITE_RPC_URL=https://polygon-mainnet.infura.io/v3/your-infura-project-id
# VITE_NETWORK_NAME=Polygon
# VITE_CHAIN_ID=137
# Arbitrum One (Layer 2)
# VITE_RPC_URL=https://arbitrum-mainnet.infura.io/v3/your-infura-project-id
# VITE_NETWORK_NAME=Arbitrum One
# VITE_CHAIN_ID=42161
# =============================================================================
# HARDHAT DEPLOYMENT CONFIGURATION
# =============================================================================
# Private key for contract deployment (NEVER commit this!)
# PRIVATE_KEY=your-wallet-private-key-for-deployment
# Etherscan API key for contract verification
# ETHERSCAN_API_KEY=your-etherscan-api-key
# Gas price configuration (in gwei)
# GAS_PRICE=20
# GAS_LIMIT=3000000
# =============================================================================
# HARDCODED VALUES TO BE CONFIGURED
# =============================================================================
# These values are currently hardcoded in the application and should be made configurable
# Game Configuration (currently hardcoded in src/lib/stores/game.js)
VITE_SHOT_COST_ETH=0.0005
VITE_SPONSOR_COST_ETH=0.001
VITE_FIRST_SHOT_COST_ETH=0.001
VITE_WIN_PERCENTAGE=1
VITE_WINNER_PAYOUT_PERCENTAGE=90
VITE_HOUSE_FEE_PERCENTAGE=10
VITE_COOLDOWN_HOURS=1
# UI Configuration (currently hardcoded in various components)
VITE_TOAST_DURATION_MS=5000
VITE_ANIMATION_DURATION_MS=3000
VITE_LEADERBOARD_LIMIT=10
VITE_RECENT_WINNERS_LIMIT=5
VITE_ETH_USD_PRICE=2500
# Social Media URLs (currently hardcoded in Footer.svelte and game.js)
VITE_TWITTER_URL=https://x.com/your-x-handle
VITE_GITHUB_URL=https://github.com/your-org/ethshot-web
VITE_DISCORD_URL=https://discord.gg/your-invite-code
# Block Explorer URLs (currently hardcoded in wallet.js)
VITE_BLOCK_EXPLORER_URL=https://sepolia.etherscan.io
VITE_MAINNET_EXPLORER_URL=https://etherscan.io
VITE_BASE_EXPLORER_URL=https://basescan.org
VITE_ARBITRUM_EXPLORER_URL=https://arbiscan.io
# Network RPC URLs (currently hardcoded with demo keys in wallet.js)
MAINNET_RPC_URL=https://mainnet.infura.io/v3/your-infura-project-id
SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/your-infura-project-id
RPC_URL=https://mainnet.base.org
ARBITRUM_RPC_URL=https://arb1.arbitrum.io/rpc
# Database Table Names (currently hardcoded in supabase.js)
VITE_DB_TABLE_PLAYERS=players
VITE_DB_TABLE_SHOTS=shots
VITE_DB_TABLE_WINNERS=winners
VITE_DB_TABLE_SPONSORS=sponsors
VITE_DB_TABLE_GAME_STATS=game_stats
# Development/Debug Configuration
VITE_ENABLE_MOCK_DATA=false
VITE_LOG_LEVEL=info
VITE_ENABLE_ANALYTICS=true
# Wallet Configuration (currently hardcoded in wallet.js)
VITE_INFURA_PROJECT_ID=your-infura-project-id
VITE_WALLETCONNECT_THEME=dark
VITE_WALLETCONNECT_CACHE_PROVIDER=true
# =============================================================================
# NOTES FOR DEVELOPERS
# =============================================================================
# Priority for implementing these configurations:
# 1. HIGH: Game rules (shot cost, win percentage, cooldown)
# 2. HIGH: Network configuration (RPC URLs, block explorers)
# 3. MEDIUM: Social media URLs and branding
# 4. MEDIUM: UI constants (toast duration, limits)
# 5. LOW: Database table names and debug flags
#
# To implement:
# 1. Create src/lib/config.js to centralize these values
# 2. Replace hardcoded values throughout the codebase
# 3. Update components to use configuration variables
# 4. Add runtime validation for required variables
# =============================================================================
# TATUM API CONFIGURATION
# =============================================================================
# Tatum API key for fetching real-time exchange rates
TATUM_API_KEY=your-tatum-api-key-here
# =============================================================================
# REFERRAL SYSTEM CONFIGURATION
# =============================================================================
# Referral discount configuration
# Discount percentage for both referrer and referee (as decimal, e.g., 0.20 = 20%)
VITE_REFERRAL_DISCOUNT_PERCENTAGE=0.20
# Discount expiration time in days
VITE_REFERRAL_DISCOUNT_EXPIRY_DAYS=30
# Maximum number of discounts per user
VITE_REFERRAL_MAX_DISCOUNTS_PER_USER=5
# Minimum time between discount usage (in hours)
VITE_REFERRAL_DISCOUNT_COOLDOWN_HOURS=24
# =============================================================================
# CHAT SYSTEM CONFIGURATION
# =============================================================================
# Chat server WebSocket URL
# Development: ws://localhost:8080/chat
# Production: wss://your-chat-server.railway.app/chat
VITE_CHAT_SERVER_URL=ws://localhost:8080/chat
# Chat server port (for local development)
CHAT_SERVER_PORT=8080
# Enable/disable chat system
VITE_CHAT_ENABLED=true