|
| 1 | +# ============================================================================= |
| 2 | +# ASSET FORGE API - Environment Configuration |
| 3 | +# ============================================================================= |
| 4 | + |
| 5 | +# ----------------------------------------------------------------------------- |
| 6 | +# AI PROVIDERS |
| 7 | +# ----------------------------------------------------------------------------- |
| 8 | + |
| 9 | +# OpenAI (Required for direct access) |
| 10 | +# Get your key at: https://platform.openai.com/api-keys |
| 11 | +OPENAI_API_KEY=sk-... |
| 12 | + |
| 13 | +# Meshy AI (Required for 3D model generation) |
| 14 | +# Get your key at: https://www.meshy.ai/api |
| 15 | +MESHY_API_KEY=... |
| 16 | + |
| 17 | +# Vercel AI Gateway (Optional - Recommended) |
| 18 | +# Provides unified access to all AI providers with analytics and cost tracking |
| 19 | +# Get your key at: https://vercel.com/docs/ai-gateway |
| 20 | +# If set, this will be used instead of direct provider keys |
| 21 | +AI_GATEWAY_API_KEY= |
| 22 | + |
| 23 | +# Anthropic (Optional - For Claude models) |
| 24 | +# Get your key at: https://console.anthropic.com/ |
| 25 | +ANTHROPIC_API_KEY= |
| 26 | + |
| 27 | +# OpenRouter (Optional - For multi-provider access) |
| 28 | +# Get your key at: https://openrouter.ai/ |
| 29 | +OPENROUTER_API_KEY= |
| 30 | + |
| 31 | +# ----------------------------------------------------------------------------- |
| 32 | +# DATABASE (PostgreSQL) |
| 33 | +# ----------------------------------------------------------------------------- |
| 34 | + |
| 35 | +# Database connection (auto-configured by docker-compose) |
| 36 | +DB_HOST=postgres |
| 37 | +DB_PORT=5432 |
| 38 | +DB_NAME=asset_forge |
| 39 | +DB_USER=asset_forge |
| 40 | +DB_PASSWORD=asset_forge_dev_password_2024 |
| 41 | + |
| 42 | +# Note: For production, change these credentials and use strong passwords! |
| 43 | + |
| 44 | +# ----------------------------------------------------------------------------- |
| 45 | +# SERVER CONFIGURATION |
| 46 | +# ----------------------------------------------------------------------------- |
| 47 | + |
| 48 | +# API Server |
| 49 | +PORT=3004 |
| 50 | +NODE_ENV=development |
| 51 | + |
| 52 | +# Frontend URL (for CORS) |
| 53 | +FRONTEND_URL=http://localhost:3000 |
| 54 | + |
| 55 | +# Image Server URL (for Meshy.ai to access concept art) |
| 56 | +# In development: http://localhost:3004 |
| 57 | +# In production: Your public domain |
| 58 | +IMAGE_SERVER_URL=http://localhost:3004 |
| 59 | + |
| 60 | +# ----------------------------------------------------------------------------- |
| 61 | +# MESHY CONFIGURATION |
| 62 | +# ----------------------------------------------------------------------------- |
| 63 | + |
| 64 | +# Meshy API Settings |
| 65 | +MESHY_POLL_INTERVAL_MS=5000 |
| 66 | +MESHY_TIMEOUT_MS=300000 |
| 67 | + |
| 68 | +# Quality-specific timeouts |
| 69 | +MESHY_TIMEOUT_STANDARD_MS=300000 |
| 70 | +MESHY_TIMEOUT_HIGH_MS=450000 |
| 71 | +MESHY_TIMEOUT_ULTRA_MS=600000 |
| 72 | + |
| 73 | +# Quality-specific models |
| 74 | +MESHY_MODEL_STANDARD=meshy-4 |
| 75 | +MESHY_MODEL_HIGH=meshy-5 |
| 76 | +MESHY_MODEL_ULTRA=meshy-5 |
| 77 | +MESHY_MODEL_DEFAULT=meshy-5 |
| 78 | + |
| 79 | +# ----------------------------------------------------------------------------- |
| 80 | +# AUTHENTICATION (Optional - For production) |
| 81 | +# ----------------------------------------------------------------------------- |
| 82 | + |
| 83 | +# Privy (for user authentication) |
| 84 | +# PRIVY_APP_ID= |
| 85 | +# PRIVY_APP_SECRET= |
| 86 | + |
| 87 | +# ----------------------------------------------------------------------------- |
| 88 | +# FEATURES FLAGS |
| 89 | +# ----------------------------------------------------------------------------- |
| 90 | + |
| 91 | +# Enable specific features |
| 92 | +ENABLE_GPT4_ENHANCEMENT=true |
| 93 | +ENABLE_RETEXTURING=true |
| 94 | +ENABLE_RIGGING=true |
| 95 | + |
| 96 | +# ----------------------------------------------------------------------------- |
| 97 | +# DEVELOPMENT |
| 98 | +# ----------------------------------------------------------------------------- |
| 99 | + |
| 100 | +# Debug logging |
| 101 | +DEBUG=false |
| 102 | +LOG_LEVEL=info |
| 103 | + |
| 104 | +# ----------------------------------------------------------------------------- |
| 105 | +# PRODUCTION SETTINGS (when deployed) |
| 106 | +# ----------------------------------------------------------------------------- |
| 107 | + |
| 108 | +# SSL/Security |
| 109 | +# FORCE_HTTPS=true |
| 110 | +# SSL_CERT_PATH= |
| 111 | +# SSL_KEY_PATH= |
| 112 | + |
| 113 | +# Rate Limiting |
| 114 | +# RATE_LIMIT_MAX_REQUESTS=100 |
| 115 | +# RATE_LIMIT_WINDOW_MS=60000 |
| 116 | + |
| 117 | +# Monitoring |
| 118 | +# SENTRY_DSN= |
| 119 | +# NEW_RELIC_LICENSE_KEY= |
| 120 | + |
| 121 | +# ============================================================================= |
| 122 | +# QUICK START |
| 123 | +# ============================================================================= |
| 124 | +# |
| 125 | +# 1. Copy this file to .env: |
| 126 | +# cp .env.example .env |
| 127 | +# |
| 128 | +# 2. Fill in your API keys: |
| 129 | +# - OPENAI_API_KEY (required) |
| 130 | +# - MESHY_API_KEY (required) |
| 131 | +# - AI_GATEWAY_API_KEY (optional but recommended) |
| 132 | +# |
| 133 | +# 3. Start services: |
| 134 | +# ./start-services.sh |
| 135 | +# |
| 136 | +# 4. Test the API: |
| 137 | +# curl http://localhost:3004/api/health |
| 138 | +# |
| 139 | +# ============================================================================= |
| 140 | +# AI GATEWAY BENEFITS |
| 141 | +# ============================================================================= |
| 142 | +# |
| 143 | +# Setting AI_GATEWAY_API_KEY provides: |
| 144 | +# ✅ Unified access to all AI providers (OpenAI, Anthropic, Google, etc.) |
| 145 | +# ✅ Built-in analytics and cost tracking |
| 146 | +# ✅ Per-user usage tracking |
| 147 | +# ✅ Automatic rate limiting |
| 148 | +# ✅ Price comparison across providers |
| 149 | +# ✅ OIDC authentication on Vercel deployments |
| 150 | +# |
| 151 | +# Learn more: AI_GATEWAY_GUIDE.md |
| 152 | +# |
| 153 | +# ============================================================================= |
0 commit comments