Files
orangecat/.env.example
T
g-butandClaude Sonnet 4.6 cc5f744e0d fix: implement stub components, fix unhandled promises, add booking validation
- QRGenerator: real qrcode.react/QRCodeSVG implementation
- DatePicker: native date input with Tailwind styling
- ImageUpload: drag-and-drop with preview, size/type validation
- RichTextEditor: auto-growing textarea with char counter
- usePostComposerNew: add .catch() to fetchUserProjects promise
- useCurrencyConversion: add .catch() to getRates promise
- AssetRentalCalendar: implement minPeriod/maxPeriod validation
- package.json: relax Node engine to >=20 (remove upper bound)
- .env.example: document all env vars (Redis, AI keys, BTCPay, flags)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 10:40:36 +01:00

186 lines
7.7 KiB
Bash

# OrangeCat Environment Variables Template
# Copy this to .env.local and fill in your actual values
# NEVER commit .env.local to git!
# ============================================================================
# SUPABASE (Required for auth, database, storage)
# ============================================================================
# Get from: https://supabase.com/dashboard/project/[project]/settings/api
NEXT_PUBLIC_SUPABASE_URL="https://your-project.supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY="your-anon-key"
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY="your-publishable-key"
# Server-side only (never expose to browser)
SUPABASE_SERVICE_ROLE_KEY="your-service-role-key"
SUPABASE_SERVICE_KEY="your-service-role-key"
SUPABASE_SECRET_KEY="your-secret-key"
SUPABASE_ACCESS_TOKEN="sbp_..."
SUPABASE_JWT_SECRET="your-jwt-secret"
# ============================================================================
# POSTGRES (Required for database connections)
# ============================================================================
# Get from: Supabase Dashboard → Settings → Database
POSTGRES_URL="postgresql://..."
POSTGRES_URL_NON_POOLING="postgresql://..."
POSTGRES_PRISMA_URL="postgresql://..."
POSTGRES_DATABASE="postgres"
POSTGRES_HOST="db.your-project.supabase.co"
POSTGRES_USER="postgres"
POSTGRES_PASSWORD="your-db-password"
# ============================================================================
# VERCEL (Required for deployment monitoring)
# ============================================================================
# Get from: vercel whoami / vercel login
VERCEL="1"
VERCEL_ENV="development"
VERCEL_URL=""
VERCEL_OIDC_TOKEN=""
VERCEL_TARGET_ENV="production"
# Optional Git integration variables (auto-filled by Vercel)
VERCEL_GIT_PROVIDER=""
VERCEL_GIT_REPO_OWNER=""
VERCEL_GIT_REPO_SLUG=""
VERCEL_GIT_COMMIT_REF=""
VERCEL_GIT_COMMIT_SHA=""
VERCEL_GIT_COMMIT_MESSAGE=""
VERCEL_GIT_COMMIT_AUTHOR_NAME=""
VERCEL_GIT_COMMIT_AUTHOR_LOGIN=""
VERCEL_GIT_PREVIOUS_SHA=""
VERCEL_GIT_PULL_REQUEST_ID=""
VERCEL_GIT_REPO_ID=""
# ============================================================================
# GITHUB (Required for repo integration, PRs, issues)
# ============================================================================
# Get from: gh auth token (after running: gh auth login)
GITHUB_TOKEN="ghp_your_personal_access_token"
# ============================================================================
# APPLICATION (Optional, used for OG metadata and CORS)
# ============================================================================
# NEXT_PUBLIC_APP_URL="https://orangecat.ch"
# NEXT_PUBLIC_SITE_URL="https://orangecat.ch"
# NEXT_PUBLIC_SITE_NAME="OrangeCat"
# ============================================================================
# BITCOIN / LIGHTNING (Required for payments)
# ============================================================================
BITCOIN_NETWORK="testnet"
NEXT_PUBLIC_BITCOIN_ADDRESS="bitcoin:bc1q...?message=OrangeCat%20Donation"
NEXT_PUBLIC_LIGHTNING_ADDRESS="your-username@getalby.com"
# NEXT_PUBLIC_LIGHTNING_NODE_URL=""
# LIGHTNING_API_KEY=""
# Payment provider: 'mock' (default) or 'btcpay' (requires BTCPay Server)
# PAYMENT_PROVIDER="mock"
# BTCPay Server integration (required if PAYMENT_PROVIDER="btcpay")
# BTCPAY_URL="https://your-btcpay-instance.example.com"
# BTCPAY_STORE_ID=""
# BTCPAY_API_KEY=""
# Encryption keys (generate with: openssl rand -hex 32)
# API_KEY_ENCRYPTION_SECRET=""
# PAYMENT_ENCRYPTION_KEY=""
# ============================================================================
# OAUTH PROVIDERS (Optional, social login)
# ============================================================================
# OAuth client IDs and secrets are configured in the Supabase Dashboard:
# Supabase Dashboard > Authentication > Providers
# No env vars needed here — all OAuth config lives in the Supabase dashboard.
# Callback URL to configure for each provider: https://your-domain.com/auth/callback
# Supported providers: Google, GitHub, Apple, X/Twitter
# ============================================================================
# CLOUDFLARE TURNSTILE (Optional, bot protection)
# ============================================================================
# Get from: https://dash.cloudflare.com → Turnstile
# NEXT_PUBLIC_TURNSTILE_SITE_KEY=""
# TURNSTILE_SECRET_KEY=""
# ============================================================================
# REDIS / UPSTASH (Optional, for rate limiting and caching)
# ============================================================================
# REDIS_URL="redis://localhost:6379"
# REDIS_TOKEN=""
# UPSTASH_REDIS_REST_URL="https://your-instance.upstash.io"
# UPSTASH_REDIS_REST_TOKEN=""
# ============================================================================
# AI / OPENROUTER (Optional for platform-level AI)
# ============================================================================
# Get from: https://openrouter.ai/keys
# If not set, AI chat will only work when users bring their own key (BYOK mode)
# If set, provides platform-level access to Llama 4 Maverick and other models
# OPENROUTER_API_KEY="sk-or-..."
# GEMINI_API_KEY=""
# GROQ_API_KEY=""
# ============================================================================
# ANALYTICS (Optional)
# ============================================================================
# Provider: 'ga' (Google Analytics), 'mixpanel', 'amplitude', or 'plausible'
# NEXT_PUBLIC_ANALYTICS_PROVIDER=""
# NEXT_PUBLIC_GA_MEASUREMENT_ID=""
# NEXT_PUBLIC_MIXPANEL_TOKEN=""
# NEXT_PUBLIC_AMPLITUDE_KEY=""
# ============================================================================
# TURBO (Optional build optimization)
# ============================================================================
TURBO_CACHE="remote:rw"
TURBO_REMOTE_ONLY="true"
TURBO_RUN_SUMMARY="true"
TURBO_DOWNLOAD_LOCAL_ENABLED="true"
NX_DAEMON="false"
# ============================================================================
# FEATURE FLAGS (Optional)
# ============================================================================
# Enable mic buttons across forms and onboarding (client-side)
NEXT_PUBLIC_FEATURE_VOICE_INPUT="true"
# Enable analytics tracking
# NEXT_PUBLIC_FEATURE_ANALYTICS="false"
# Show performance monitor overlay (development only)
# NEXT_PUBLIC_SHOW_PERFORMANCE_MONITOR="false"
# Enable Supabase debug logging
# NEXT_PUBLIC_SUPABASE_DEBUG="false"
# Write-mode gates (set to true to enable write operations in those modules)
# LOANS_WRITE_MODE="false"
# PRODUCTS_WRITE_MODE="false"
# METRICS_ENABLED="false"
# ============================================================================
# SETUP INSTRUCTIONS
# ============================================================================
# 1. Copy this file: cp .env.example .env.local
# 2. Fill in Supabase credentials from your project dashboard
# 3. Fill in Postgres credentials from Supabase database settings
# 4. Run: gh auth login (to authenticate GitHub CLI)
# 5. Run: gh auth token (to get GitHub personal access token)
# 6. Add GitHub token to GITHUB_TOKEN above
# 7. Run: vercel login (to authenticate Vercel CLI)
# 8. Optional: Add OpenRouter API key for platform-level AI
# 9. Run: npm run dev (to start development server)
# ============================================================================
# QUICK CREDENTIALS SYNC
# ============================================================================
# Pull production credentials from Vercel:
# vercel env pull .env.local --environment=production --yes
#
# This will populate:
# - All Supabase credentials
# - All Postgres credentials
# - Vercel OIDC token
# - Bitcoin/Lightning addresses
#
# You still need to add manually:
# - GITHUB_TOKEN (from: gh auth token)
# - OPENROUTER_API_KEY (optional, from: https://openrouter.ai/keys)