-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.example.env
More file actions
273 lines (208 loc) · 10 KB
/
.example.env
File metadata and controls
273 lines (208 loc) · 10 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# =============================================================================
# Answer42 Environment Configuration Template
# =============================================================================
# Copy this file to .env and replace the placeholder values with your actual API keys and configuration.
#
# Security Notice: Never commit your actual .env file to version control!
# The .env file is already included in .gitignore for your protection.
#
# For setup instructions, see: https://github.com/samjd-zz/answer42#getting-started
# =============================================================================
# =============================================================================
# AI API Keys (Required)
# =============================================================================
# These are the core AI providers used by Answer42's multi-agent pipeline
# OpenAI API Key
# Used by: OpenAI-based agents (GPT-4 for analysis, cross-reference chat)
# Get yours at: https://platform.openai.com/api-keys
# Format: sk-proj-...
OPENAI_API_KEY=sk-proj-your_openai_api_key_here
# Anthropic API Key
# Used by: Anthropic-based agents (Claude for deep paper analysis, quality checking)
# Get yours at: https://console.anthropic.com/
# Format: sk-ant-api03-...
ANTHROPIC_API_KEY=sk-ant-api03-your_anthropic_api_key_here
# Perplexity API Key
# Used by: Perplexity-based agents (real-time research, fact verification)
# Get yours at: https://www.perplexity.ai/settings/api
# Format: pplx-...
PERPLEXITY_API_KEY=pplx-your_perplexity_api_key_here
# =============================================================================
# Related Paper Discovery APIs (Optional)
# =============================================================================
# These enhance the paper discovery system with additional metadata
# Semantic Scholar API Key (Optional)
# The Semantic Scholar API is free and doesn't require an API key for basic usage.
# For higher rate limits, request a key at: https://www.semanticscholar.org/product/api
# Leave empty for free tier usage
SEMANTIC_SCHOLAR_API_KEY=
# =============================================================================
# Discovery System Configuration
# =============================================================================
# Configure the multi-source paper discovery system behavior
# Enable/disable the discovery system entirely
DISCOVERY_ENABLED=true
# Maximum papers to fetch per discovery source (Crossref, Semantic Scholar, Perplexity)
DISCOVERY_MAX_PAPERS_PER_SOURCE=50
# Cache duration for discovery results (hours)
DISCOVERY_CACHE_DURATION_HOURS=24
# Enable rate limiting for discovery APIs (recommended)
DISCOVERY_RATE_LIMIT_ENABLED=true
# =============================================================================
# Payment Integration (Stripe) - Optional
# =============================================================================
# Required only if you want to enable subscription/payment features
# Get your keys at: https://dashboard.stripe.com/apikeys
# Stripe Publishable Key (starts with pk_test_ for test mode)
STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key_here
# Stripe Secret Key (starts with sk_test_ for test mode)
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key_here
# Stripe Webhook Secret (for handling payment events)
# Get this from your Stripe webhook endpoint configuration
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here
# =============================================================================
# Supabase Configuration (Required)
# =============================================================================
# Supabase provides the PostgreSQL database and additional services
# Supabase Project URL (for local development, use local Supabase instance)
SUPABASE_URL=http://127.0.0.1:54321
# Supabase Anonymous Key (public key for client-side operations)
SUPABASE_ANON_KEY=your_supabase_anon_key_here
# Supabase Service Role Key (private key for server-side operations)
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here
# Supabase Database URL (direct PostgreSQL connection)
SUPABASE_DB_URL=postgresql://postgres:your_password@127.0.0.1:54322/postgres
# =============================================================================
# Database Configuration (Required)
# =============================================================================
# Spring Boot database connection settings (environment-aware)
# Database connection URL (JDBC format)
DATABASE_URL=jdbc:postgresql://localhost:54322/postgres?ssl=false&sslmode=disable
# Database credentials
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=postgres
# =============================================================================
# Performance Configuration
# =============================================================================
# Connection pool and performance settings
# HikariCP connection pool settings
HIKARI_MAXIMUM_POOL_SIZE=10
HIKARI_MINIMUM_IDLE=5
HIKARI_CONNECTION_TIMEOUT=20000
HIKARI_IDLE_TIMEOUT=300000
HIKARI_MAX_LIFETIME=1200000
# Thread pool settings
TASK_EXECUTION_CORE_SIZE=5
TASK_EXECUTION_MAX_SIZE=20
TASK_EXECUTION_QUEUE_CAPACITY=50
# =============================================================================
# Rate Limiting Configuration
# =============================================================================
# API rate limiting settings for external services
# Crossref API rate limiting (requests per second)
DISCOVERY_RATE_LIMIT_CROSSREF_REQUESTS_PER_SECOND=45
# Semantic Scholar API rate limiting (requests per minute)
DISCOVERY_RATE_LIMIT_SEMANTIC_SCHOLAR_REQUESTS_PER_MINUTE=100
# Perplexity API rate limiting (requests per minute)
DISCOVERY_RATE_LIMIT_PERPLEXITY_REQUESTS_PER_MINUTE=10
# =============================================================================
# File Upload Configuration
# =============================================================================
# File upload limits and settings
# Maximum file size for uploads
MAX_FILE_SIZE=50MB
# Maximum request size (should be larger than MAX_FILE_SIZE)
MAX_REQUEST_SIZE=60MB
# Large file threshold for special handling
LARGE_FILE_THRESHOLD=52428800
# =============================================================================
# Logging Configuration
# =============================================================================
# Application logging levels
# Root logging level
LOGGING_LEVEL_ROOT=INFO
# Application-specific logging level
LOGGING_LEVEL_COM_SAMJDTECHNOLOGIES=DEBUG
# SQL logging level (set to DEBUG to see SQL queries)
LOGGING_LEVEL_SQL=DEBUG
# =============================================================================
# Monitoring Configuration
# =============================================================================
# Application monitoring and metrics
# Enable metrics export
MANAGEMENT_METRICS_EXPORT_ENABLED=true
# Metrics export interval
MANAGEMENT_METRICS_EXPORT_STEP=PT5M
# Health endpoint detail level
MANAGEMENT_HEALTH_SHOW_DETAILS=always
# =============================================================================
# Vaadin Configuration
# =============================================================================
# Vaadin UI framework settings
# Production mode (false for development)
VAADIN_PRODUCTION_MODE=false
# Close idle sessions
VAADIN_CLOSE_IDLE_SESSIONS=true
# Heartbeat interval (seconds)
VAADIN_HEARTBEAT_INTERVAL=60
# Launch browser automatically (usually false for server deployments)
VAADIN_LAUNCH_BROWSER=false
# =============================================================================
# Spring Configuration
# =============================================================================
# Spring Boot and JPA settings
# Active Spring profiles
SPRING_PROFILES_ACTIVE=development
# JPA settings
JPA_SHOW_SQL=true
JPA_FORMAT_SQL=true
HIBERNATE_DDL_AUTO=update
# =============================================================================
# Ollama Local AI Fallback Configuration
# =============================================================================
# Local AI processing fallback using Ollama (ensures 99.5%+ uptime)
# Enable Ollama local fallback system
OLLAMA_ENABLED=true
# Ollama service URL (local Docker instance)
OLLAMA_BASE_URL=http://localhost:11434
# Local AI model to use (llama3.1:8b recommended for academic content)
OLLAMA_MODEL=llama3.1:8b
# Ollama request timeout (milliseconds) - extended for local processing
OLLAMA_TIMEOUT=30000
# =============================================================================
# AI Fallback System Configuration
# =============================================================================
# Enterprise-grade resilience system configuration
# Enable the fallback system (automatic failover to local AI)
FALLBACK_ENABLED=true
# Number of cloud provider failures before switching to fallback
FALLBACK_RETRY_AFTER_FAILURES=3
# Individual operation timeout before fallback (seconds)
FALLBACK_TIMEOUT_SECONDS=60
# Connection health check timeout (milliseconds)
FALLBACK_CONNECTION_CHECK_TIMEOUT=5000
# Health check interval for cloud providers (milliseconds)
FALLBACK_HEALTH_CHECK_INTERVAL=30000
# =============================================================================
# Security Configuration
# =============================================================================
# Security-related environment variables
# JWT Secret (generate a secure random string)
JWT_SECRET=your_secure_jwt_secret_here
# Server configuration
SERVER_PORT=8080
SERVER_SSL_ENABLED=false
# =============================================================================
# Setup Instructions
# =============================================================================
# 1. Copy this file: cp .example.env .env
# 2. Edit .env with your actual API keys and configuration
# 3. Ensure .env is in your .gitignore (it already is!)
# 4. Run the application: mvn spring-boot:run
#
# For detailed setup instructions, visit:
# https://github.com/samjd-zz/answer42#getting-started
#
# Need help? Open an issue:
# https://github.com/samjd-zz/answer42/issues
# =============================================================================