# Game Dev APIs - Environment Variables Configuration This file documents all required environment variables for the comprehensive game dev API integrations in AeThex-OS. ## Authentication & Core ```bash NODE_ENV=development PORT=5000 SESSION_SECRET=your-super-secret-session-key-min-32-chars ``` ## Game Platforms ### Minecraft ```bash MINECRAFT_CLIENT_ID=your_minecraft_client_id MINECRAFT_CLIENT_SECRET=your_minecraft_client_secret ``` **Setup:** https://learn.microsoft.com/en-us/gaming/gaming-services/xbox-live-api/ ### Roblox ```bash ROBLOX_CLIENT_ID=your_roblox_client_id ROBLOX_CLIENT_SECRET=your_roblox_client_secret ``` **Setup:** https://create.roblox.com/docs/cloud/open-cloud/oauth2-overview ### Meta Horizon Worlds ```bash META_APP_ID=your_meta_app_id META_APP_SECRET=your_meta_app_secret ``` **Setup:** https://developers.meta.com/docs/horizon/get-started-sdk/ ### Steam ```bash STEAM_API_KEY=your_steam_api_key ``` **Setup:** https://partner.steamgames.com/doc/webapi_overview ### Twitch ```bash TWITCH_CLIENT_ID=your_twitch_client_id TWITCH_CLIENT_SECRET=your_twitch_client_secret ``` **Setup:** https://dev.twitch.tv/console/apps ### YouTube Gaming ```bash YOUTUBE_API_KEY=your_youtube_api_key YOUTUBE_CLIENT_ID=your_youtube_client_id YOUTUBE_CLIENT_SECRET=your_youtube_client_secret ``` **Setup:** https://developers.google.com/youtube/v3/getting-started ## Game Backend Services ### Epic Online Services (EOS) ```bash EOS_DEPLOYMENT_ID=your_eos_deployment_id EOS_CLIENT_ID=your_eos_client_id EOS_CLIENT_SECRET=your_eos_client_secret ``` **Setup:** https://dev.epicgames.com/docs/web-api-refs/ ### PlayFab ```bash PLAYFAB_TITLE_ID=your_playfab_title_id PLAYFAB_DEV_SECRET_KEY=your_playfab_dev_secret_key ``` **Setup:** https://learn.microsoft.com/en-us/gaming/playfab/ ### AWS GameLift ```bash AWS_REGION=us-east-1 AWS_ACCESS_KEY_ID=your_aws_access_key AWS_SECRET_ACCESS_KEY=your_aws_secret_key AWS_GAMELIFT_FLEET_ID=your_fleet_id AWS_GAMELIFT_QUEUE_NAME=your_queue_name ``` **Setup:** https://docs.aws.amazon.com/gamelift/ ## Engine Integrations ### Unity Cloud ```bash UNITY_PROJECT_ID=your_unity_project_id UNITY_API_KEY=your_unity_api_key ``` **Setup:** https://cloud.unity.com/ ### Unreal Engine ```bash UNREAL_PROJECT_ID=your_unreal_project_id UNREAL_API_KEY=your_unreal_api_key ``` **Setup:** https://docs.unrealengine.com/5.0/en-US/ ## AI & Analytics ### Anthropic Claude API ```bash ANTHROPIC_API_KEY=your_anthropic_api_key ``` **Setup:** https://console.anthropic.com/ ### Firebase ```bash FIREBASE_PROJECT_ID=your_firebase_project_id FIREBASE_SERVICE_ACCOUNT_KEY={"type":"service_account",...} FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXXXX FIREBASE_API_SECRET=your_firebase_api_secret ``` **Setup:** https://console.firebase.google.com/ ### Segment.io ```bash SEGMENT_WRITE_KEY=your_segment_write_key ``` **Setup:** https://app.segment.com/ ## Cloud Storage ### AWS S3 ```bash AWS_S3_BUCKET=your-bucket-name AWS_REGION=us-east-1 AWS_ACCESS_KEY_ID=your_aws_access_key AWS_SECRET_ACCESS_KEY=your_aws_secret_key ``` **Setup:** https://s3.console.aws.amazon.com/ ### 3D Asset Services ```bash SKETCHFAB_API_KEY=your_sketchfab_api_key POLYHAVEN_API_KEY=your_polyhaven_api_key ``` **Setup:** - Sketchfab: https://sketchfab.com/settings/api - Poly Haven: https://polyhaven.com/api ## Payment Integrations ### PayPal ```bash PAYPAL_CLIENT_ID=your_paypal_client_id PAYPAL_CLIENT_SECRET=your_paypal_client_secret PAYPAL_SANDBOX=true # Set to false in production ``` **Setup:** https://developer.paypal.com/ ### Stripe (Existing) ```bash STRIPE_SECRET_KEY=sk_live_xxxxx STRIPE_PUBLISHABLE_KEY=pk_live_xxxxx STRIPE_WEBHOOK_SECRET=whsec_xxxxx ``` ### Google Play Billing ```bash GOOGLE_PLAY_PACKAGE_NAME=com.aethex.app GOOGLE_PLAY_SERVICE_ACCOUNT={"type":"service_account",...} ``` **Setup:** https://play.google.com/console/ ### Apple App Store ```bash APPLE_BUNDLE_ID=com.aethex.app APPLE_ISSUER_ID=your_issuer_id APPLE_KEY_ID=your_key_id APPLE_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\n... ``` **Setup:** https://appstoreconnect.apple.com/ ## Platform Services ### Google Play Services ```bash GOOGLE_PLAY_CLIENT_ID=your_google_client_id GOOGLE_PLAY_CLIENT_SECRET=your_google_client_secret ``` **Setup:** https://play.google.com/console/ ## Supabase (Existing) ```bash VITE_SUPABASE_URL=https://xxxxx.supabase.co VITE_SUPABASE_ANON_KEY=your_anon_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key ``` ## AI Integrations (Existing) ```bash AI_INTEGRATIONS_OPENAI_BASE_URL=https://api.openai.com/v1 AI_INTEGRATIONS_OPENAI_API_KEY=your_openai_api_key ``` --- ## Quick Setup Checklist - [ ] Copy `.env.example` to `.env` - [ ] Fill in all required API keys and secrets - [ ] Register applications on each platform's developer console - [ ] Test OAuth flows for each provider - [ ] Verify webhook endpoints are configured - [ ] Enable billing on cloud services (AWS, Firebase, etc.) - [ ] Set up monitoring and error tracking - [ ] Document any custom configuration ## Security Notes ⚠️ **NEVER commit `.env` files to version control** - Use `.env.example` as template with placeholder values - In production, use environment variable management service (e.g., AWS Secrets Manager, GitHub Secrets) - Rotate API keys periodically - Use separate keys for dev/staging/production - Enable API key restrictions where possible - Monitor API usage and set up alerts ## Support For issues or questions about specific API integrations: - Check the API provider's official documentation - Review the implementation in `server/game-dev-apis.ts` - Test with Postman or cURL before integrating