# Required for NextAuth GitHub OAuth GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET= NEXTAUTH_SECRET= # Base application URL used by NextAuth (set automatically on Vercel) NEXTAUTH_URL=http://localhost:3000 # Production site URL for emails (optional - Vercel sets VERCEL_URL automatically) # Only needed if you want to override the automatic detection # Example: https://react.foundation NEXT_PUBLIC_SITE_URL= # =================================================================== # RIS SYSTEM: QUICK START - CHOOSE YOUR DEPLOYMENT MODE # =================================================================== # See docs/RIS_DEPLOYMENT_MODES.md for detailed comparison # =================================================================== # # MODE 1: Simple (PAT-only) # ├─ Best for: Testing, MVP, < 50 libraries # ├─ Setup time: 1 minute # ├─ Rate limit: 5,000/hour (shared) # └─ Updates: Monthly # # MODE 2: Professional (GitHub App, no webhooks) # ├─ Best for: Production, any scale # ├─ Setup time: 15 minutes # ├─ Rate limit: 5,000/hour per installation # └─ Updates: Monthly # # MODE 3: Real-time (GitHub App + Webhooks) # ├─ Best for: Production with maintainer engagement # ├─ Setup time: 30 minutes # ├─ Rate limit: 5,000/hour per installation # └─ Updates: Real-time (< 2 minutes) # # =================================================================== # ===== MODE 1: Simple (PAT-only) ===== # Uncomment this line to use Mode 1: # GITHUB_TOKEN=ghp_your_token_here # # Get token at: https://github.com/settings/tokens/new # Required scopes: read:user, public_repo # # That's it! Mode 1 is ready to use. # ===== MODE 2: Professional (GitHub App, no webhooks) ===== # Uncomment these lines to use Mode 2: # GITHUB_APP_ID=123456 # GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- # MIIEpAIBAAKCAQEA... # -----END RSA PRIVATE KEY-----" # # Setup guide: docs/GITHUB_APP_SETUP.md (skip Step 4) # # Optional: Keep PAT as fallback # GITHUB_TOKEN=ghp_your_token_here # ===== MODE 3: Real-time (GitHub App + Webhooks) ===== # Uncomment these lines to use Mode 3: # GITHUB_APP_ID=123456 # GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- # MIIEpAIBAAKCAQEA... # -----END RSA PRIVATE KEY-----" # GITHUB_WEBHOOK_SECRET=your_webhook_secret_here # CRON_SECRET=your_random_secret_here # NEXT_PUBLIC_GITHUB_APP_INSTALL_URL=https://github.com/apps/your-app/installations/new # # Setup guides: # 1. docs/GITHUB_APP_SETUP.md (all steps including Step 4) # 2. docs/RIS_WEBHOOK_IMPLEMENTATION.md # # Optional: Keep PAT as fallback # GITHUB_TOKEN=ghp_your_token_here # # Also required for Mode 3: # - Add webhook processing cron job to vercel.json # - Redis instance (see REDIS_URL below) # =================================================================== # ADVANCED: Hybrid Deployment (Recommended) # =================================================================== # Configure Mode 3 (all variables above) for full functionality: # - Repos with app installed → Real-time updates via webhooks # - Repos without app → Monthly updates via PAT fallback # - Best of both worlds: real-time for engaged maintainers, polling for others # =================================================================== GITHUB_TOKEN= # GitHub Bot Token (for write operations on behalf of users) # Create a dedicated bot account at https://github.com/signup # Generate a PAT with public_repo scope at https://github.com/settings/tokens/new # Required scopes: public_repo (for creating issues/PRs) # This bot will file issues on behalf of users, reducing OAuth scope requirements GITHUB_BOT_TOKEN= # Shopify Storefront API (for fetching products/collections on the frontend) SHOPIFY_STORE_DOMAIN=your-store.myshopify.com SHOPIFY_STOREFRONT_TOKEN= # Shopify Admin API (for management scripts: drops:create, drops:activate, drops:archive) # Required scopes: read_products, write_products, read_collections, write_collections SHOPIFY_ADMIN_TOKEN= # OpenAI API Key for AI image generation and chatbot # Get one at: https://platform.openai.com/api-keys OPENAI_API_KEY= # Optional: override default models for chatbot # OPENAI_RESPONSE_MODEL defaults to gpt-4.1-mini # OPENAI_EMBEDDING_MODEL defaults to text-embedding-3-large OPENAI_RESPONSE_MODEL= OPENAI_EMBEDDING_MODEL= # Chatbot vector index configuration (Redis Stack required) # CHATBOT_REDIS_INDEX defaults to idx:chatbot:chunks # CHATBOT_REDIS_PREFIX defaults to chatbot:chunk: CHATBOT_REDIS_INDEX= CHATBOT_REDIS_PREFIX= # GitHub repository for chatbot issue filing CHATBOT_GITHUB_OWNER= CHATBOT_GITHUB_REPO= # GitLab OAuth credentials (optional - for GitLab authentication) # Get these from your GitLab OAuth application settings GITLAB_CLIENT_ID= GITLAB_CLIENT_SECRET= # Redis connection URL for caching RIS metrics and access control # Required for: Storing library metrics, quarterly allocations, collection status, user allowlist # Format: redis://[username:password@]host:port[/database] # Example local: redis://localhost:6379 # Example Upstash: redis://default:password@host.upstash.io:6379 REDIS_URL=redis://localhost:6379 # Enable/disable real RIS data on frontend # Set to "true" to use real data, "false" to use mock data NEXT_PUBLIC_RIS_ENABLED=true # Enable the AI support chatbot # Set to "true" to render the floating widget NEXT_PUBLIC_ENABLE_CHATBOT=false # Coming Soon Page - Access Control # Super admin email - always has admin access (failsafe) # This user can bootstrap the system even if Redis is empty SUPER_ADMIN_EMAIL=your@email.com # Legacy: Comma-separated list (will be migrated to Redis) # Users not on this list will see the Coming Soon page # Example: user1@gmail.com,user2@example.com,admin@company.com ALLOWED_USERS= # Crawler Bypass Token # Secret token to allow internal crawler to bypass access control # Used by the content ingestion system to crawl pages # Generate a secure random string for this value CRAWLER_BYPASS_TOKEN= # Ingestion API Token # Secret token for CI/CD workflows to trigger content ingestion # Used by GitHub Actions to auto-ingest after production deploys # Generate a secure random string for this value INGESTION_API_TOKEN= # Cron Job Secret # Secret token for webhook processing cron job # Prevents unauthorized triggering of background tasks # Generate a secure random string for this value CRON_SECRET= # Resend API Key for access request notifications # Get one at: https://resend.com/api-keys RESEND_API_KEY= # Resend verified domain for from address # Example: yourdomain.com (without noreply@ prefix) # Must be verified in Resend dashboard RESEND_FROM_DOMAIN=yourdomain.com # Admin email to receive access requests # This is where access request notifications and chatbot escalations will be sent ADMIN_EMAIL=