Created
August 5, 2025 16:39
-
-
Save CiprianSpiridon/95b0fbc257f63651da93d7e8a1f28919 to your computer and use it in GitHub Desktop.
# Example Global Environment Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example Global Environment Configuration | |
# Template showing all available environment variables for the ShipToday monorepo | |
# | |
# IMPORTANT: This project uses separate environment files: | |
# - env.global.dev.yaml (for development) | |
# - env.global.prod.yaml (for production) | |
# | |
# SECURITY NOTE: Never commit real secrets to this file! | |
# This is a template - edit the actual env.global.dev.yaml and env.global.prod.yaml files | |
# ============================================================================= | |
# DATABASE CONFIGURATION | |
# ============================================================================= | |
database: | |
# Supabase Configuration | |
SUPABASE_URL: "https://YOUR_PROJECT_ID.supabase.co" | |
SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." | |
SUPABASE_SERVICE_ROLE_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." | |
# Database URLs | |
DATABASE_URL: "postgresql://postgres:your_password@localhost:5432/shiptoday" | |
DIRECT_URL: "postgresql://postgres:your_password@localhost:5432/shiptoday" | |
# ============================================================================= | |
# AUTHENTICATION & SECURITY | |
# ============================================================================= | |
auth: | |
# NextAuth Configuration | |
NEXTAUTH_URL: "http://localhost:3000" | |
NEXTAUTH_SECRET: "your-super-secret-nextauth-secret-here" | |
# OAuth Providers (get from provider dashboards) | |
GOOGLE_CLIENT_ID: "your-google-client-id.googleusercontent.com" | |
GOOGLE_CLIENT_SECRET: "your-google-client-secret" | |
GITHUB_CLIENT_ID: "your-github-client-id" | |
GITHUB_CLIENT_SECRET: "your-github-client-secret" | |
APPLE_CLIENT_ID: "your.apple.client.id" | |
APPLE_CLIENT_SECRET: "your-apple-client-secret" | |
# ============================================================================= | |
# PAYMENT PROVIDERS | |
# ============================================================================= | |
payments: | |
# Stripe (get from https://dashboard.stripe.com/apikeys) | |
STRIPE_PUBLIC_KEY: "pk_test_51..." | |
STRIPE_SECRET_KEY: "sk_test_51..." | |
STRIPE_WEBHOOK_SECRET: "whsec_..." | |
# LemonSqueezy (optional) | |
LEMONSQUEEZY_API_KEY: "your-lemonsqueezy-api-key" | |
LEMONSQUEEZY_STORE_ID: "your-store-id" | |
LEMONSQUEEZY_WEBHOOK_SECRET: "your-webhook-secret" | |
# Paddle (optional) | |
PADDLE_VENDOR_ID: "your-paddle-vendor-id" | |
PADDLE_API_KEY: "your-paddle-api-key" | |
PADDLE_WEBHOOK_SECRET: "your-paddle-webhook-secret" | |
# PayPal (optional) | |
PAYPAL_CLIENT_ID: "your-paypal-client-id" | |
PAYPAL_CLIENT_SECRET: "your-paypal-client-secret" | |
# ============================================================================= | |
# EMAIL SERVICES | |
# ============================================================================= | |
email: | |
# Global email configuration | |
EMAIL_FROM: "[email protected]" | |
# Resend (recommended - get from https://resend.com/api-keys) | |
RESEND_API_KEY: "re_..." | |
# SendGrid (optional - get from https://sendgrid.com/marketing/sendgrid-services-cro/) | |
SENDGRID_API_KEY: "SG.your-sendgrid-api-key" | |
# Postmark (optional - get from https://postmarkapp.com/) | |
POSTMARK_API_KEY: "your-postmark-api-key" | |
# Mailgun (optional - get from https://mailgun.com/) | |
MAILGUN_API_KEY: "your-mailgun-api-key" | |
MAILGUN_DOMAIN: "your-domain.mailgun.org" | |
# SMTP fallback (optional - use any SMTP provider) | |
SMTP_HOST: "smtp.gmail.com" | |
SMTP_PORT: "587" | |
SMTP_USER: "[email protected]" | |
SMTP_PASS: "your-app-password" | |
# ============================================================================= | |
# ANALYTICS & MONITORING | |
# ============================================================================= | |
analytics: | |
# PostHog (get from https://app.posthog.com/project/settings) | |
NEXT_PUBLIC_POSTHOG_KEY: "phc_..." | |
NEXT_PUBLIC_POSTHOG_HOST: "https://app.posthog.com" | |
# Google Analytics (optional) | |
NEXT_PUBLIC_GA_MEASUREMENT_ID: "G-..." | |
# Sentry (optional - for error tracking) | |
SENTRY_DSN: "https://[email protected]/..." | |
NEXT_PUBLIC_SENTRY_DSN: "https://[email protected]/..." | |
# ============================================================================= | |
# AI & LLM SERVICES (Optional) | |
# ============================================================================= | |
ai: | |
# OpenAI (get from https://platform.openai.com/api-keys) | |
OPENAI_API_KEY: "sk-..." | |
# Anthropic (optional) | |
ANTHROPIC_API_KEY: "sk-ant-..." | |
# Together AI (optional) | |
TOGETHER_API_KEY: "your-together-api-key" | |
# ============================================================================= | |
# STORAGE & CDN (Optional) | |
# ============================================================================= | |
storage: | |
# AWS S3 Configuration | |
AWS_ACCESS_KEY_ID: "your-aws-access-key" | |
AWS_SECRET_ACCESS_KEY: "your-aws-secret-key" | |
AWS_REGION: "us-east-1" | |
AWS_S3_BUCKET: "your-s3-bucket" | |
AWS_S3_ENDPOINT: "https://s3.amazonaws.com" # Optional custom endpoint | |
AWS_S3_FORCE_PATH_STYLE: "false" # Use virtual hosted style URLs | |
AWS_S3_DEFAULT_ACL: "private" # Default ACL for uploads | |
# Cloudflare R2 Configuration (S3-compatible) | |
CLOUDFLARE_R2_BUCKET: "your-r2-bucket" | |
CLOUDFLARE_R2_ACCOUNT_ID: "your-cloudflare-account-id" | |
CLOUDFLARE_R2_ACCESS_KEY_ID: "your-r2-access-key" | |
CLOUDFLARE_R2_SECRET_ACCESS_KEY: "your-r2-secret-key" | |
CLOUDFLARE_R2_REGION: "auto" # Cloudflare R2 uses 'auto' | |
CLOUDFLARE_R2_ENDPOINT: "https://your-account-id.r2.cloudflarestorage.com" | |
CLOUDFLARE_R2_PUBLIC_DOMAIN: "cdn.yourdomain.com" # Optional custom domain | |
# Supabase Storage Configuration | |
SUPABASE_STORAGE_BUCKET: "uploads" # Default bucket name | |
SUPABASE_STORAGE_PUBLIC: "true" # Whether files are public by default | |
# General CDN Configuration | |
CLOUDFLARE_API_TOKEN: "your-cloudflare-token" | |
CLOUDFLARE_ZONE_ID: "your-zone-id" | |
# ============================================================================= | |
# SEARCH & DATA (Optional) | |
# ============================================================================= | |
search: | |
# Algolia | |
ALGOLIA_APP_ID: "your-algolia-app-id" | |
ALGOLIA_API_KEY: "your-algolia-api-key" | |
NEXT_PUBLIC_ALGOLIA_SEARCH_KEY: "your-search-only-key" | |
# ============================================================================= | |
# DEVELOPMENT & DEPLOYMENT | |
# ============================================================================= | |
development: | |
# Environment | |
NODE_ENV: "development" | |
PORT: "3000" | |
# Debugging | |
DEBUG: "false" | |
VERBOSE_LOGGING: "false" | |
# ============================================================================= | |
# PUBLIC VARIABLES (Client-side accessible) | |
# ============================================================================= | |
public: | |
# App Configuration | |
NEXT_PUBLIC_APP_NAME: "ShipToday" | |
NEXT_PUBLIC_APP_URL: "http://localhost:3000" | |
NEXT_PUBLIC_API_URL: "http://localhost:3000/api" | |
# Supabase Public Variables | |
NEXT_PUBLIC_SUPABASE_URL: "https://YOUR_PROJECT_ID.supabase.co" | |
NEXT_PUBLIC_SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." | |
# Feature Flags | |
NEXT_PUBLIC_ENABLE_ANALYTICS: "true" | |
NEXT_PUBLIC_ENABLE_PAYMENTS: "true" | |
NEXT_PUBLIC_ENABLE_AI_FEATURES: "true" | |
# ============================================================================= | |
# SETUP INSTRUCTIONS | |
# ============================================================================= | |
# | |
# This is a template file showing all available environment variables. | |
# The project uses separate environment files for development and production: | |
# | |
# π Environment Files: | |
# - env.global.dev.yaml (development - localhost URLs) | |
# - env.global.prod.yaml (production - production URLs) | |
# - env.global.example.yaml (this template file) | |
# | |
# π Development Setup: | |
# 1. Edit env.global.dev.yaml with your actual development values | |
# 2. Sync environment files: node scripts/sync-env.js --env dev | |
# 3. Start development: pnpm dev | |
# | |
# π Production Deployment: | |
# 1. Edit env.global.prod.yaml with your actual production values | |
# 2. Generate production env: node scripts/sync-env.js --env prod | |
# 3. Create Vercel file: node scripts/create-vercel-env.js | |
# 4. Upload vercel.env to Vercel Dashboard | |
# | |
# π For detailed information, see _docs/ENV_MANAGEMENT.md | |
# | |
# β οΈ Key Differences Between Environments: | |
# Development: http://localhost:3000, NODE_ENV=development | |
# Production: https://www.shiptoday.dev, NODE_ENV=production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment