-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
140 lines (110 loc) · 5.12 KB
/
Copy path.env.example
File metadata and controls
140 lines (110 loc) · 5.12 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
# =================================================================
# SYNAPSE - ENVIRONMENT CONFIGURATION
# =================================================================
# Copy this file to .env and fill in your actual values
# All settings are configurable - adjust as needed for your deployment
# =================================================================
# SERVER CONFIGURATION
# =================================================================
# Host for the server to bind to. Use 0.0.0.0 for production/Docker.
HOST=localhost
# Port for the Express server to listen on
PORT=3000
# Node environment (development, production, test)
NODE_ENV=development
# Trust proxy for rate limiting behind a reverse proxy (e.g., Traefik, Nginx)
# Set to 'true' if your app is behind a reverse proxy
TRUST_PROXY=false
# =================================================================
# OPENROUTER API CONFIGURATION
# =================================================================
# Your OpenRouter API key - get it from https://openrouter.ai/keys
OPENROUTER_API_KEY=your_openrouter_api_key_here
# OpenRouter base URL (usually doesn't need to change)
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# Default model for MCQ generation (you can change this to any supported model)
# Popular options: openai/gpt-4.1-mini, anthropic/claude-4-sonnet, google/gemini-2.5-flash
OPENROUTER_MODEL=openai/gpt-4.1-mini
# PDF processing engine (pdf-text, mistral-ocr, native)
# pdf-text: Free, good for text-based PDFs
# mistral-ocr: Paid, good for scanned documents with images ($0.002 per 1,000 pages)
# native: Uses model's native file processing (varies by model)
PDF_PROCESSING_ENGINE=pdf-text
# Search using Tavily
# Enable/disable Tavily search for better context retrieval. Enter your Tavily API key below to enable.
# If you don't have a Tavily API key, you can get one from https://tavily.com/
TAVILY_API_KEY=
# =================================================================
# REDIS CONFIGURATION
# =================================================================
# Redis connection URL - format: redis://[username:password@]host:port[/database]
REDIS_URL=redis://default:your_password@your_host:6379/0
# Redis connection timeout (milliseconds)
REDIS_CONNECT_TIMEOUT=10000
# Redis command timeout (milliseconds)
REDIS_COMMAND_TIMEOUT=5000
# Redis retry attempts
REDIS_RETRY_ATTEMPTS=3
# =================================================================
# QUIZ CONFIGURATION
# =================================================================
# Minimum number of MCQs allowed
MIN_QUIZ_LENGTH=5
# Maximum number of MCQs allowed
MAX_QUIZ_LENGTH=50
# =================================================================
# FILE UPLOAD LIMITS
# =================================================================
# Maximum file size for PDF uploads (in bytes)
# 10485760 = 10MB, 20971520 = 20MB, 52428800 = 50MB
MAX_FILE_SIZE=10485760
# Maximum number of files that can be uploaded at once
MAX_FILES_COUNT=5
# Allowed file types (MIME types)
ALLOWED_FILE_TYPES=application/pdf
# =================================================================
# RATE LIMITING CONFIGURATION
# =================================================================
# Enable/disable rate limiting (true/false)
ENABLE_RATE_LIMITING=true
# Number of quizzes a user can generate per minute.
# This is the most resource-intensive operation, so keep it low.
RATE_LIMIT_QUIZZES_PER_MINUTE=2
# General rate limit for other API requests (fetching quizzes, submitting, etc.)
# This can be higher as these operations are less costly.
RATE_LIMIT_API_REQUESTS_PER_MINUTE=50
# =================================================================
# SECURITY CONFIGURATION
# =================================================================
# CORS allowed origins (comma-separated)
# Use * for development, specific domains for production
CORS_ORIGINS=http://localhost:5173,http://localhost:3000
# Maximum request body size (e.g., 10mb, 50mb)
MAX_REQUEST_SIZE=10mb
# =================================================================
# LOGGING CONFIGURATION
# =================================================================
# Log level (error, warn, info, debug)
LOG_LEVEL=info
# Enable/disable file logging (true/false)
ENABLE_FILE_LOGGING=false
# Log file path (only used if file logging is enabled)
LOG_FILE_PATH=./logs/server.log
# =================================================================
# OPENROUTER ADVANCED SETTINGS
# =================================================================
# Temperature for MCQ generation (0.0 to 1.0)
# Lower values = more focused, higher values = more creative
MCQ_TEMPERATURE=0.3
# Maximum tokens for MCQ generation response
MCQ_MAX_TOKENS=4000
# =================================================================
# DEVELOPMENT/DEBUG SETTINGS
# =================================================================
# Enable/disable debug mode (adds extra logging)
DEBUG_MODE=false
# =================================================================
# MONITORING & HEALTH CHECKS
# =================================================================
# Enable health check endpoint (true/false)
ENABLE_HEALTH_CHECK=true