-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.production.template
More file actions
159 lines (134 loc) · 4.87 KB
/
.env.production.template
File metadata and controls
159 lines (134 loc) · 4.87 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
# Production Environment Variables Template
# Copy this file to .env.local and fill in your actual values
# ===============================
# DOMAIN & APP CONFIGURATION
# ===============================
NEXT_PUBLIC_APP_URL=https://yourdomain.com
NODE_ENV=production
# ===============================
# FIREBASE AUTHENTICATION
# ===============================
# Get these values from Firebase Console > Project Settings > General
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
# Firebase Admin SDK (for server-side operations)
FIREBASE_PRIVATE_KEY_ID=your_private_key_id
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nyour_private_key\n-----END PRIVATE KEY-----\n"
FIREBASE_CLIENT_EMAIL=firebase-adminsdk-xxxxx@your_project.iam.gserviceaccount.com
FIREBASE_CLIENT_ID=your_client_id
# ===============================
# STRIPE PAYMENTS (LIVE KEYS FOR PRODUCTION)
# ===============================
# Get these from Stripe Dashboard (use LIVE keys for production)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_xxxxx
STRIPE_SECRET_KEY=sk_live_xxxxx
STRIPE_WEBHOOK_SECRET=whsec_xxxxx
# Price IDs for subscription plans (create these in Stripe Dashboard)
STRIPE_PREMIUM_PRICE_ID=price_xxxxx
STRIPE_PRO_PRICE_ID=price_xxxxx
# ===============================
# SELF-HOSTED TTS CONFIGURATION
# ===============================
# URL where your XTTS service is running
XTTS_API_URL=https://tts.yourdomain.com
# or for co-located setup: http://localhost:8000
# Optional API key for securing TTS endpoint
XTTS_API_KEY=your_secure_tts_api_key
# ===============================
# RATE LIMITING (UPSTASH REDIS)
# ===============================
# Create account at https://upstash.com/
UPSTASH_REDIS_REST_URL=https://xxx-xxx-xxx.upstash.io
UPSTASH_REDIS_REST_TOKEN=xxxxx
# Alternative: Use Redis connection string
# REDIS_URL=redis://localhost:6379
# ===============================
# SECURITY CONFIGURATION
# ===============================
# Generate a secure random string (32+ characters)
JWT_SECRET=your_random_secure_secret_32_characters_minimum
ENCRYPTION_KEY=another_secure_key_for_encryption_32chars
# CORS allowed origins (comma-separated)
ALLOWED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
# ===============================
# MONITORING & ANALYTICS (OPTIONAL)
# ===============================
# Sentry for error tracking
SENTRY_DSN=https://xxxxx@sentry.io/xxxxx
SENTRY_ORG=your_org
SENTRY_PROJECT=your_project
# Vercel Analytics (automatically enabled on Vercel)
NEXT_PUBLIC_VERCEL_ANALYTICS_ID=your_analytics_id
# PostHog for product analytics
NEXT_PUBLIC_POSTHOG_KEY=phc_xxxxx
NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com
# ===============================
# AI MODEL CONFIGURATION
# ===============================
# Model file paths (relative to project root)
MODEL_PATH=./models
TOKENIZER_PATH=./models/tokenizer.json
# AI service configuration
AI_MAX_TOKENS=1000
AI_TEMPERATURE=0.7
AI_MAX_CONTEXT_LENGTH=2048
# ===============================
# EMAIL CONFIGURATION (OPTIONAL)
# ===============================
# For sending transactional emails
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER=apikey
SMTP_PASS=your_sendgrid_api_key
EMAIL_FROM=noreply@yourdomain.com
# ===============================
# DATABASE (IF USING EXTERNAL DB)
# ===============================
# PostgreSQL connection string (if migrating from Firebase)
DATABASE_URL=postgresql://user:password@localhost:5432/therapeutic_ai
# ===============================
# CACHE CONFIGURATION
# ===============================
# Redis for caching (can be same as rate limiting Redis)
CACHE_REDIS_URL=redis://localhost:6379
CACHE_TTL=3600
# ===============================
# FILE STORAGE (IF USING EXTERNAL STORAGE)
# ===============================
# AWS S3 for file uploads
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=us-east-1
AWS_S3_BUCKET=your-bucket-name
# ===============================
# FEATURE FLAGS
# ===============================
# Enable/disable features
ENABLE_VOICE_SYNTHESIS=true
ENABLE_USER_ANALYTICS=true
ENABLE_RATE_LIMITING=true
ENABLE_ADMIN_PANEL=false
# ===============================
# LOGGING CONFIGURATION
# ===============================
LOG_LEVEL=info
LOG_FORMAT=json
# ===============================
# SECURITY HEADERS
# ===============================
# Add custom domains to CSP if needed
CSP_ADDITIONAL_DOMAINS=https://cdn.yourdomain.com
# ===============================
# DEPLOYMENT CONFIGURATION
# ===============================
# Build configuration
BUILD_STANDALONE=true
OUTPUT_FILE_TRACING=true
# Vercel specific (if using Vercel)
VERCEL_TOKEN=your_vercel_token
VERCEL_ORG_ID=your_org_id
VERCEL_PROJECT_ID=your_project_id