Repository navigation
Expand file tree
/
Copy pathenv.example
More file actions
118 lines (87 loc) · 3.44 KB
/
Copy pathenv.example
File metadata and controls
118 lines (87 loc) · 3.44 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
# ===========================================
# WhatsApp Services Configuration
# ===========================================
# Server Port
PORT=3001
# Frontend Port (for Docker deployment)
FRONTEND_PORT=5173
# ===========================================
# Authentication (NEW)
# ===========================================
# JWT Secret Key - IMPORTANT: Change this in production!
# Generate a secure random string: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
# Admin Credentials
ADMIN_USERNAME=admin
ADMIN_PASSWORD=changeme123
# Node Environment (development/production)
NODE_ENV=production
# ===========================================
# API Security
# ===========================================
# API Security Key (set this in production!)
API_KEY=your_secure_api_key_here
# ===========================================
# Webhook Configuration
# ===========================================
# Base URL for webhook callbacks (fallback for all sessions)
BASE_WEBHOOK_URL=http://localhost:3001/localCallbackExample
# Per-session webhook (optional)
# Format: {SESSIONID}_WEBHOOK_URL
# Note: Replace hyphens (-) in session name with underscores (_)
#
# Examples:
# Session "MYSESSION" -> MYSESSION_WEBHOOK_URL=https://your-server.com/webhook
# Session "CASANEIRA-WA" -> CASANEIRA_WA_WEBHOOK_URL=https://your-n8n.com/webhook/xxx
# Session "MY-SHOP-BOT" -> MY_SHOP_BOT_WEBHOOK_URL=https://your-n8n.com/webhook/yyy
#
# n8n Integration Example:
# CASANEIRA_WA_WEBHOOK_URL=https://n8n.yourdomain.com/webhook/whatsapp-incoming
# ===========================================
# Feature Flags
# ===========================================
# Enable local callback example (for testing)
ENABLE_LOCAL_CALLBACK_EXAMPLE=TRUE
# Enable Swagger API documentation endpoint
ENABLE_SWAGGER_ENDPOINT=TRUE
# Auto-mark messages as read
SET_MESSAGES_AS_SEEN=FALSE
# Automatically recover sessions on restart
RECOVER_SESSIONS=TRUE
# ===========================================
# Callback Settings
# ===========================================
# Disable specific callbacks (comma-separated)
# Options: message, qr, authenticated, ready, disconnected, message_ack,
# message_reaction, message_edit, group_join, group_leave, etc.
DISABLED_CALLBACKS=message_ack,message_reaction
# ===========================================
# File & Performance Settings
# ===========================================
# Maximum attachment size in bytes (default: 5MB)
MAX_ATTACHMENT_SIZE=5000000
# ===========================================
# Rate Limiting
# ===========================================
# Maximum requests per window
RATE_LIMIT_MAX=100
# Rate limit window in milliseconds (1 minute = 60000)
RATE_LIMIT_WINDOW_MS=60000
# ===========================================
# Advanced: WhatsApp Web Version
# ===========================================
# Specify WhatsApp Web version (optional)
# Leave empty to use latest
# WEB_VERSION=2.2412.54
# WhatsApp Web version cache type
# Options: local, remote, none
# WEB_VERSION_CACHE_TYPE=local
# ===========================================
# Frontend Configuration (for development)
# ===========================================
# API Host (when running frontend in development mode)
# VITE_API_HOST=localhost
# API Port (when running frontend in development mode)
# VITE_API_PORT=3001
# API URL (for production builds)
# VITE_API_URL=https://api.yourdomain.com