# ============================================================================= # 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