-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
103 lines (93 loc) · 4.49 KB
/
.env.example
File metadata and controls
103 lines (93 loc) · 4.49 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
# =============================================================================
# DATABASE
# =============================================================================
# REQUIRED: Get this from your PostgreSQL provider (Aiven, Render, Supabase, etc.)
# Format: postgres://username:password@host:port/database?sslmode=require
# For production, use sslmode=require for secure connections
DATABASE_URL=postgres://user:password@host:port/database?sslmode=require
# Optional: Path to CA certificate file for SSL verification
# Most cloud providers (AWS RDS, GCP Cloud SQL, Aiven) work without this
# For self-hosted PostgreSQL with custom SSL certificates:
# DB_SSL_CA_CERT_PATH=/path/to/ca-certificate.pem
# Optional: Connection pool settings
# DB_POOL_MAX=20
# DB_IDLE_TIMEOUT=30000
# DB_CONNECTION_TIMEOUT=10000
# =============================================================================
# SERVER CONFIG
# =============================================================================
# Set to "production" when deploying
NODE_ENV=production
# Port for the server (3000 for local, Vercel auto-assigns, Render uses 10000)
PORT=3000
# REQUIRED: Generate a secure random string: openssl rand -base64 32
# NEVER use a weak default - the app will fail to start without this
JWT_SECRET=
# Your deployed app URL (update after deployment)
APP_URL=https://your-domain.com
BASE_URL=https://your-domain.com
# Frontend URL for CORS (update after deployment)
CLIENT_URL=https://your-domain.com
# =============================================================================
# DEPLOYMENT PLATFORMS
# =============================================================================
# Set to "true" when deploying on Vercel
VERCEL=true
# Set to "true" when deploying on Render
# RENDER=true
# =============================================================================
# RENDER DEPLOYMENT SETTINGS
# =============================================================================
# Go to https://dashboard.render.com → New Web Service
# Build Command: npm install
# Start Command: npm run start
# Instance Type: Free (or paid)
# Environment: Node
# Add all env vars above to Render's Environment Variables section
# =============================================================================
# VERCEL DEPLOYMENT SETTINGS
# =============================================================================
# Go to https://vercel.com → New Project → Import your repo
# Framework Preset: Other
# Build Command: (leave blank - uses package.json)
# Output Directory: client/dist
# Install Command: npm install
# Add all env vars above to Vercel's Environment Variables section
# =============================================================================
# EMAIL CONFIGURATION
# =============================================================================
# EMAIL_SERVICE: gmail, outlook, yahoo, etc.
EMAIL_SERVICE=gmail
# Your email address
EMAIL_USER=your-email@gmail.com
# App password (NOT your regular password) - generate at: https://myaccount.google.com/apppasswords
EMAIL_PASS=your-app-password
# From address shown in emails
EMAIL_FROM=your-email@gmail.com
# =============================================================================
# PUSH NOTIFICATIONS (Optional)
# =============================================================================
# Generate keys at: https://vapidkeys.com/
VAPID_PUBLIC_KEY=your-vapid-public-key
VAPID_PRIVATE_KEY=your-vapid-private-key
# Your contact email for push notifications
VAPID_SUBJECT=mailto:admin@yourdomain.com
# =============================================================================
# INITIAL SUPER ADMIN (OPTIONAL - ONE-TIME SETUP)
# =============================================================================
# IMPORTANT: These are ONLY used to create the FIRST super admin if none exist.
# After creating the first admin, REMOVE these variables from your environment.
# Generate a strong password meeting these requirements:
# - Minimum 12 characters
# - At least one uppercase letter
# - At least one lowercase letter
# - At least one digit
# - At least one special character
# Example: openssl rand -base64 24
# SUPER_ADMIN_EMAIL=your-email@yourdomain.com
# SUPER_ADMIN_PASSWORD=your-strong-password-here
# =============================================================================
# ADMIN INVITE SYSTEM
# =============================================================================
# For ongoing admin management, use the in-app invite system or super admin panel.
# Do NOT store admin passwords in environment variables.