-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
170 lines (141 loc) · 6.63 KB
/
.env.example
File metadata and controls
170 lines (141 loc) · 6.63 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Environment Variables Template
# Copy this file to .env.local and fill in your values
# ============================================
# PLATFORM ADMINISTRATION
# ============================================
# Comma-separated list of email addresses that should be granted platform admin access
# These users will automatically become platform admins when they register
# Example: PLATFORM_ADMIN_EMAILS=admin@example.com,owner@example.com
PLATFORM_ADMIN_EMAILS=
# ============================================
# DATABASE
# ============================================
DATABASE_URL="postgresql://user:password@localhost:5432/transparency_dev"
# Direct (non-pooled) connection URL for migrations
# Vercel's Neon integration automatically provides DATABASE_URL_UNPOOLED
# For manual setup, use DIRECT_DATABASE_URL with non-pooler connection string
# DATABASE_URL_UNPOOLED="postgresql://user:password@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require"
# DIRECT_DATABASE_URL="postgresql://user:password@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require"
# For production with Neon:
# DATABASE_URL (pooled — used at runtime):
# DATABASE_URL="postgresql://user:password@ep-xxx-pooler.us-east-2.aws.neon.tech/neondb?sslmode=require"
#
# DATABASE_URL_UNPOOLED (direct — used for migrations):
# Automatically provided by Vercel's Neon integration
# Manual setup: use connection string without "-pooler" in hostname
# ============================================
# AUTHENTICATION (Choose one)
# ============================================
# Option 1: Clerk (Recommended)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CLERK_SECRET_KEY=sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/login
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/register
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/profile
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/profile
# Option 2: Supabase Auth
# NEXT_PUBLIC_SUPABASE_URL=https://xxxxxxxxxxxxx.supabase.co
# NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# ============================================
# PAYMENT PROCESSING (Stripe)
# ============================================
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
STRIPE_SECRET_KEY=sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
STRIPE_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Stripe Connect (for organization onboarding)
STRIPE_CLIENT_ID=ca_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Stripe webhook endpoint (for local development):
# Use Stripe CLI: stripe listen --forward-to localhost:3000/api/webhooks/stripe
# ============================================
# FILE STORAGE (Cloudflare R2)
# ============================================
R2_ACCOUNT_ID=your_cloudflare_account_id
R2_ACCESS_KEY_ID=your_r2_access_key_id
R2_SECRET_ACCESS_KEY=your_r2_secret_access_key
R2_BUCKET_NAME=transparency-uploads
NEXT_PUBLIC_R2_PUBLIC_URL=https://pub-xxxxxxxxxxxxx.r2.dev
# Alternative: Supabase Storage
# NEXT_PUBLIC_SUPABASE_STORAGE_BUCKET=uploads
# ============================================
# EMAIL SERVICE
# ============================================
# Resend (auto-provided by Vercel Resend integration in production)
RESEND_API_KEY=
# Optional: Override the "from" address (default: RadBooks <onboarding@resend.dev>)
# EMAIL_FROM=RadBooks <noreply@radbooks.org>
# ============================================
# BANK SYNC (Future - Plaid)
# ============================================
# PLAID_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# PLAID_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# PLAID_ENV=sandbox # sandbox, development, or production
# ============================================
# ACCOUNTING INTEGRATION (Future - QuickBooks)
# ============================================
# QUICKBOOKS_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# QUICKBOOKS_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# QUICKBOOKS_REDIRECT_URI=https://your-app.com/api/quickbooks/callback
# ============================================
# APPLICATION CONFIGURATION
# ============================================
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME="Financial Transparency Platform"
# For production:
# NEXT_PUBLIC_APP_URL=https://transparency-platform.com
# ============================================
# ANALYTICS (Optional)
# ============================================
# Google Analytics
# NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
# PostHog (for product analytics)
# NEXT_PUBLIC_POSTHOG_KEY=phc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com
# ============================================
# ERROR TRACKING (Optional)
# ============================================
# Sentry
# NEXT_PUBLIC_SENTRY_DSN=https://xxxxxxxxxxxxx@xxxxx.ingest.sentry.io/xxxxx
# ============================================
# FEATURE FLAGS (Optional)
# ============================================
# Enable/disable features for testing
ENABLE_BANK_SYNC=false
ENABLE_QUICKBOOKS=false
ENABLE_RECURRING_DONATIONS=false
ENABLE_MOBILE_APP=false
# ============================================
# SECURITY
# ============================================
# JWT Secret (generate with: openssl rand -base64 32)
JWT_SECRET=your_long_random_secret_here_min_32_chars
# Encryption key for sensitive data (generate with: openssl rand -base64 32)
ENCRYPTION_KEY=your_encryption_key_here_min_32_chars
# ============================================
# RATE LIMITING (Optional)
# ============================================
# Redis URL for rate limiting (if using Upstash or Redis Cloud)
# REDIS_URL=redis://default:xxxxxxxxxxxxx@redis-xxxxx.upstash.io:33419
# ============================================
# DEVELOPMENT SETTINGS
# ============================================
# Set to 'development' for detailed logging
NODE_ENV=development
# Skip email verification in development
SKIP_EMAIL_VERIFICATION=true
# Disable rate limiting in development
DISABLE_RATE_LIMITING=true
# ============================================
# TESTING
# ============================================
# Test database (for integration tests)
# TEST_DATABASE_URL="postgresql://user:password@localhost:5432/transparency_test"
# ============================================
# NOTES
# ============================================
# 1. Never commit .env.local to git (it's in .gitignore by default)
# 2. Use different values for development, staging, and production
# 3. Rotate secrets regularly (especially in production)
# 4. Use environment-specific keys (test keys for dev, live keys for prod)
# 5. For Vercel deployment, add these in the Vercel dashboard
# 6. For Railway/Fly.io, use their CLI to set environment variables