-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
81 lines (70 loc) · 3.21 KB
/
.env.example
File metadata and controls
81 lines (70 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Server Configuration
PORT=3000
NODE_ENV=development
# Set to 'production' in production environment
# Supabase Configuration
# Get these from: https://app.supabase.com/project/_/settings/api
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key-here
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here
# Get JWT secret from: https://app.supabase.com/project/_/settings/api (under JWT Settings)
SUPABASE_JWT_SECRET=your-jwt-secret-here
# Authentication Configuration
# This app uses passwordless OTP and Google OAuth for authentication
#
# To enable Google OAuth:
# 1. Go to: https://app.supabase.com/project/_/auth/providers
# 2. Enable "Google" provider
# 3. Add your Google OAuth credentials (Client ID & Secret)
# 4. Add redirect URL: {BASE_URL}/auth/oauth/google/callback
# Example: http://localhost:3000/auth/oauth/google/callback
#
# OTP authentication is enabled by default via Supabase
# Database Configuration (Prisma)
# Get from Supabase: https://app.supabase.com/project/_/settings/database
# Transaction pooler (for queries): postgresql://postgres.[PROJECT-REF]:[PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres?pgbouncer=true
DATABASE_URL=postgresql://postgres.your-ref:your-password@aws-0-us-east-1.pooler.supabase.com:6543/postgres?pgbouncer=true
# Direct connection (for migrations): postgresql://postgres.[PROJECT-REF]:[PASSWORD]@db.[PROJECT-REF].supabase.co:5432/postgres
DIRECT_URL=postgresql://postgres.your-ref:your-password@db.your-ref.supabase.co:5432/postgres
# Redis Configuration (Upstash)
# Get from: https://console.upstash.com/
# Format: redis://default:YOUR_PASSWORD@YOUR_ENDPOINT.upstash.io:6379
REDIS_URL=redis://default:password@endpoint.upstash.io:6379
# LLM Provider API Keys
# OpenAI API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=sk-...
# OpenRouter API key from: https://openrouter.ai/keys
# OpenRouter provides OpenAI-compatible API for multiple model providers (Anthropic, Google, etc.)
OPENROUTER_API_KEY=sk-or-v1-...
# Rate Limiting Configuration
RATE_LIMIT_WINDOW_MS=60000
# Rate limit window in milliseconds (default: 60000 = 1 minute)
RATE_LIMIT_MAX_REQUESTS=50
# Maximum requests per window per user (default: 50)
# CORS Configuration
ALLOWED_ORIGINS=http://localhost:8080,https://scoutcode.com,http://localhost:*
# Comma-separated list of allowed origins
# Use http://localhost:* to allow any localhost port for CLI callback
# Frontend/CLI Configuration
BASE_URL=http://localhost:3000
# Base URL of this backend server (used for OAuth callbacks)
# In production: https://api.yourdomain.com
FRONTEND_URL=https://scoutcode.com
# URL of your frontend application (for redirects)
CLI_CALLBACK_URL_PATTERN=http://localhost:*
# Pattern for CLI callback URLs (supports wildcard ports)
# Logging
LOG_LEVEL=info
# Options: error, warn, info, debug
LOG_FILE=logs/driftal-backend.log
# Path to log file (optional, logs to console by default)
# Authentication
AUTH_CODE_EXPIRY_MINUTES=10
# How long authorization codes are valid (default: 10 minutes)
JWT_EXPIRY_SECONDS=3600
# How long access tokens are valid (default: 3600 = 1 hour)
# Security
FORCE_HTTPS=false
# Set to 'true' in production to force HTTPS
TRUST_PROXY=false
# Set to 'true' if behind a proxy (Railway, Render, etc.)