-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.sample
More file actions
136 lines (121 loc) · 5.58 KB
/
.env.sample
File metadata and controls
136 lines (121 loc) · 5.58 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
# ============================================
# BULK EMAIL SENDER - ENVIRONMENT VARIABLES
# ============================================
# Copy this file to .env.local and fill in all values
# cp .env.sample .env.local
# ============================================
# SUPABASE CONFIGURATION
# ============================================
# Required for user authentication
#
# How to get these values:
# 1. Go to https://supabase.com/dashboard
# 2. Create a new project or select existing
# 3. Go to Settings → API
# 4. Copy "Project URL" for NEXT_PUBLIC_SUPABASE_URL
# 5. Copy "anon public" key for NEXT_PUBLIC_SUPABASE_ANON_KEY
#
# Location: Supabase Dashboard → Your Project → Settings → API
NEXT_PUBLIC_SUPABASE_URL=
# Example: https://abcdefghijklmnop.supabase.co
# Get from: Supabase Dashboard → Settings → API → Project URL
NEXT_PUBLIC_SUPABASE_ANON_KEY=
# Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# Get from: Supabase Dashboard → Settings → API → Project API keys → anon public
# Note: This is safe to expose on client-side (it's meant to be public)
# ============================================
# GMAIL API CONFIGURATION
# ============================================
# Required for sending emails via Gmail API
#
# Setup Steps:
# 1. Go to https://console.cloud.google.com
# 2. Create a new project
# 3. Enable Gmail API (APIs & Services → Library → Gmail API → Enable)
# 4. Configure OAuth consent screen (APIs & Services → OAuth consent screen)
# - Select "Internal" (for Workspace) or "External"
# - Add scope: https://www.googleapis.com/auth/gmail.send
# 5. Create OAuth 2.0 credentials (APIs & Services → Credentials → Create Credentials)
# - Application type: Web application
# - Authorized redirect URI: http://localhost:3000/api/auth/callback (for dev)
# - Authorized redirect URI: https://mail.devmultigroup.com/api/auth/callback (for prod)
# 6. Generate refresh token using: npm run auth:setup
#
# Location: Google Cloud Console → APIs & Services → Credentials
GMAIL_CLIENT_ID=
# Example: 123456789012-abc123def456ghi789jkl.apps.googleusercontent.com
# Get from: Google Cloud Console → APIs & Services → Credentials → Your OAuth 2.0 Client → Client ID
GMAIL_CLIENT_SECRET=
# Example: GOCSPX-abc123def456ghi789
# Get from: Google Cloud Console → APIs & Services → Credentials → Your OAuth 2.0 Client → Client secret
# ⚠️ SECURITY: Never commit this to Git! Keep it secret.
GMAIL_REDIRECT_URI=
# ⚠️ OPTIONAL - Auto-detected if not set
# The redirect URI is automatically determined based on environment:
# - Development: http://localhost:3000/api/auth/callback
# - Production: https://mail.devmultigroup.com/api/auth/callback
# - Or uses NEXT_PUBLIC_APP_URL if set: ${NEXT_PUBLIC_APP_URL}/api/auth/callback
#
# Only set this manually if you need to override the auto-detection
# For development: http://localhost:3000/api/auth/callback
# For production: https://mail.devmultigroup.com/api/auth/callback
# Must match exactly what you added in Google Cloud Console → Credentials → Authorized redirect URIs
GMAIL_REFRESH_TOKEN=
# Example: 1//0abc123def456ghi789jkl_mnopqrs-tuv-wxyzABCDEF
# Get by running: npm run auth:setup
# Or use OAuth Playground: https://developers.google.com/oauthplayground
# ⚠️ SECURITY: Never commit this to Git! Keep it secret.
# ⚠️ IMPORTANT: This token is generated only once. If lost, revoke access and generate a new one.
GMAIL_USER=
# Example: your.email@gmail.com or you@yourcompany.com
# Your Gmail or Google Workspace email address
# Must be the same account used for OAuth authentication
# For 2,000 recipient limit, use Google Workspace (Standard level)
# ============================================
# POSTHOG ANALYTICS CONFIGURATION
# ============================================
# Required for product analytics and event tracking
#
# Setup Steps:
# 1. Go to https://app.posthog.com/signup
# 2. Sign up for a free account (no credit card required)
# 3. Create a project: "Bulk Email Sender"
# 4. Go to Settings → Project
# 5. Copy "Project API Key" (starts with phc_)
# 6. Note your "Host" URL (usually https://us.posthog.com or https://eu.posthog.com)
#
# Location: PostHog Dashboard → Settings → Project
NEXT_PUBLIC_POSTHOG_KEY=
# Example: phc_abc123def456ghi789jklmnopqrstuvwxyz
# Get from: PostHog Dashboard → Settings → Project → Project API Key
# Free tier: 1 million events/month included
NEXT_PUBLIC_POSTHOG_HOST=
# For PostHog Cloud US: https://us.posthog.com
# For PostHog Cloud EU: https://eu.posthog.com
# For self-hosted: https://your-posthog-instance.com
# Get from: PostHog Dashboard → Settings → Project → Host
# Default: https://us.posthog.com
# ============================================
# OPTIONAL CONFIGURATION
# ============================================
# DATABASE_URL (Optional)
# PostgreSQL connection string if using Supabase database features
# Only needed if storing campaign history in database
#
# How to get:
# 1. Go to Supabase Dashboard → Settings → Database
# 2. Scroll to "Connection string"
# 3. Select "URI" tab
# 4. Copy connection string and replace [YOUR-PASSWORD] with your database password
#
# DATABASE_URL=postgresql://postgres:your-password@db.abcdefghijklmnop.supabase.co:5432/postgres
# NEXT_PUBLIC_APP_URL (Optional but Recommended)
# Your application's public URL
# Used for generating absolute URLs, OAuth redirects, etc.
# If set, GMAIL_REDIRECT_URI will be automatically constructed as: ${NEXT_PUBLIC_APP_URL}/api/auth/callback
#
# For development:
NEXT_PUBLIC_APP_URL=http://localhost:3000
#
# For production:
# NEXT_PUBLIC_APP_URL=https://mail.devmultigroup.com