-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
97 lines (79 loc) · 3.86 KB
/
.env.example
File metadata and controls
97 lines (79 loc) · 3.86 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
# WeWrite Environment Configuration Template
# Copy this file to .env.local and fill in your values
# Google Cloud Configuration
GOOGLE_CLOUD_KEY_BASE64=True
GOOGLE_CLOUD_KEY_JSON=your-google-cloud-service-account-json
LOGGING_CLOUD_KEY_JSON=your-logging-service-account-json
# Firebase Configuration (Shared across all environments)
NEXT_PUBLIC_FIREBASE_API_KEY=your-firebase-api-key
NEXT_PUBLIC_FIREBASE_APP_ID=your-firebase-app-id
NEXT_PUBLIC_FIREBASE_BUCKET=your-firebase-bucket
NEXT_PUBLIC_FIREBASE_DB_URL=your-firebase-db-url
NEXT_PUBLIC_FIREBASE_DOMAIN=your-firebase-domain
NEXT_PUBLIC_FIREBASE_MSNGR_ID=your-firebase-messaging-id
NEXT_PUBLIC_FIREBASE_PID=your-firebase-project-id
# Stripe Configuration (Use test keys for development, live keys for production)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_... (dev) / pk_live_... (prod)
STRIPE_SECRET_KEY=sk_test_... (dev) / sk_live_... (prod)
STRIPE_PRODUCT_ID=your-stripe-product-id
STRIPE_WEBHOOK_SECRET=whsec_test_... (dev) / whsec_live_... (prod)
# Resend Email Configuration
# Get your API key from https://resend.com/api-keys
RESEND_API_KEY=re_xxxxx
RESEND_WEBHOOK_SECRET=whsec_xxxxx
# Project Configuration
PROJECT_ID=your-google-cloud-project-id
# Analytics Configuration
NEXT_PUBLIC_GA_MEASUREMENT_ID=your-ga-measurement-id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your-firebase-measurement-id
# Application URLs
NEXT_PUBLIC_APP_URL=http://localhost:3000 (dev) / https://your-domain.com (prod)
NEXT_PUBLIC_BASE_URL=https://your-production-domain.com
# Environment Configuration
NODE_ENV=development (local) / production (vercel)
NEXT_PUBLIC_NODE_ENV=development (local) / production (vercel)
SUBSCRIPTION_ENV=development (local/dev) / production (preview/prod)
# Branch-Aware Local Development
# When running locally (NODE_ENV=development), the system automatically detects your git branch:
# - main branch: Uses production collections (no prefix) - CAUTION: Real data!
# - dev branch: Uses DEV_ prefixed collections - Safe for testing
# - other branches: Uses DEV_ prefixed collections - Safe default
# Development Authentication (local development only)
# Set to 'true' to use isolated test users instead of production Firebase Auth
# This prevents mixing development testing with production user accounts
USE_DEV_AUTH=true
# Development Optimizations (local only)
NEXT_WEBPACK_USEPOLLING=true
NEXT_WEBPACK_DISABLE_CACHE=true
NEXT_CACHE=false
# Cron Job Authentication (Vercel production)
# CRON_SECRET is automatically set by Vercel for cron job requests
# CRON_API_KEY is a custom key for manual API calls
CRON_SECRET=your-vercel-cron-secret
CRON_API_KEY=your-custom-cron-api-key
# External Services
NEXT_PUBLIC_MAPBOX_TOKEN=your-mapbox-token
# LogRocket Configuration (Production monitoring and session replay)
NEXT_PUBLIC_LOGROCKET_APP_ID=your-logrocket-app-id
# Algolia Search Configuration
# Get these from: https://dashboard.algolia.com/account/api-keys
NEXT_PUBLIC_ALGOLIA_APP_ID=your-algolia-app-id
NEXT_PUBLIC_ALGOLIA_SEARCH_KEY=your-algolia-search-key
ALGOLIA_ADMIN_KEY=your-algolia-admin-key
# Typesense Search Configuration (Primary search engine)
# Get these from: https://cloud.typesense.org
# Typesense is used as the primary search engine with Firestore as fallback
NEXT_PUBLIC_TYPESENSE_HOST=your-typesense-host.a1.typesense.net
NEXT_PUBLIC_TYPESENSE_PORT=443
NEXT_PUBLIC_TYPESENSE_PROTOCOL=https
NEXT_PUBLIC_TYPESENSE_SEARCH_KEY=your-typesense-search-only-api-key
TYPESENSE_ADMIN_KEY=your-typesense-admin-api-key
# Admin Configuration (comma-separated lists)
# SECURITY: These are the ONLY users with admin access in production
# Admin emails must match Firebase Auth email addresses
ADMIN_EMAILS=admin@example.com
# Admin user IDs (Firebase Auth UIDs) - optional fallback
ADMIN_USER_IDS=your-firebase-uid
# Cloudflare Turnstile (Bot Protection)
NEXT_PUBLIC_TURNSTILE_SITE_KEY=your-turnstile-site-key
TURNSTILE_SECRET_KEY=your-turnstile-secret-key