-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
48 lines (39 loc) · 2.04 KB
/
.env.example
File metadata and controls
48 lines (39 loc) · 2.04 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
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Database
# ==============================================================================
# ENVIRONMENT VARIABLES FOR VERCEL DEPLOYMENT
# ==============================================================================
# Add these to your Vercel project settings: Project Settings > Environment Variables
# All variables are required for production deployment
# Database Configuration
# MongoDB connection string with authentication
DATABASE_URL="mongodb://username:password@host:port/database?authSource=database&replicaSet=rs0"
# JWT Configuration
# Generate a secure random string for production (minimum 256 characters recommended)
JWT_SECRET="your-super-long-secret-key-here"
# Admin Configuration
# Email address for admin user (must be exposed to client for admin checks)
NEXT_PUBLIC_ADMIN_EMAIL="admin@example.com"
# Email Configuration
# Gmail SMTP credentials for sending emails (password reset, notifications, etc.)
EMAIL_USER="your-email@gmail.com"
EMAIL_PASS="your-app-specific-password"
# ==============================================================================
# NOTES FOR VERCEL DEPLOYMENT:
# ==============================================================================
# 1. All variables with NEXT_PUBLIC_ prefix are exposed to the browser
# 2. Other variables are server-side only and kept secure
# 3. No frontend/backend URL needed - Next.js handles both
# 4. No PORT needed - Vercel assigns automatically
# 5. No NODE_ENV needed - Vercel sets it automatically (production/preview/development)
# 6. Database should be accessible from Vercel's IP ranges
# 7. For Gmail: Enable 2FA and create an app-specific password
# =============================================================================="your-mongodb-connection-string"
# JWT Secret
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
# Email Configuration (for password reset)
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-email-app-password
# Admin Email (for admin features)
NEXT_PUBLIC_ADMIN_EMAIL=admin@example.com