-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
135 lines (105 loc) · 6.1 KB
/
.env.example
File metadata and controls
135 lines (105 loc) · 6.1 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
# =============================================================================
# Rotated Secrets
# =============================================================================
# Neon Database Configuration
DATABASE_URL="postgres://username:password@host:port/database?sslmode=require"
DATABASE_URL_UNPOOLED="postgresql://username:password@host:port/database?sslmode=require"
# NOTE: migrate:deploy:base uses DATABASE_URL_UNPOOLED for migrations to avoid
# pooler/transaction-pooling limitations. Runtime should continue to use DATABASE_URL.
# Privy
NEXT_PUBLIC_PRIVY_APP_ID=your-privy-app-id
PRIVY_SERVER_APP_SECRET=your-privy-app-secret-here
PRIVY_SERVER_VERIFICATION_KEY=your-privy-verification-key-here
# AI Configuration - API Keys
OPENROUTER_API_KEY=sk-or-your-openrouter-api-key-here
OPENROUTER_SITE_URL=https://betterai.tools
OPENROUTER_SITE_NAME=BetterAI
# Research Sources - API Keys
EXA_API_KEY=your-exa-api-key-here
# Vercel KV (Redis) Configuration - Rate Limiting
# These are automatically injected by Vercel when you provision a KV database
# For local development, run: vercel env pull .env.local
KV_REST_API_URL=https://your-kv-database.upstash.io
KV_REST_API_TOKEN=your-kv-token-here
# Cron Job Configuration
# IMPORTANT: CRON_SECRET is required for all cron endpoints for security
# Generate with: openssl rand -base64 32
CRON_SECRET=your-secret-token-here
NEXT_PUBLIC_APP_URL=https://betterai.tools/
# BetterStack Heartbeat Monitoring
# Get these URLs from BetterStack → Uptime → Heartbeats
BETTERSTACK_HEARTBEAT_POLYMARKET_DATA=https://uptime.betterstack.com/api/v1/heartbeat/your-polymarket-id
BETTERSTACK_HEARTBEAT_BATCH_PREDICTIONS=https://uptime.betterstack.com/api/v1/heartbeat/your-batch-predictions-id
BETTERSTACK_HEARTBEAT_PREDICTION_CHECK=https://uptime.betterstack.com/api/v1/heartbeat/your-prediction-check-id
# Vercel Deploy Hook for GitHub Actions migrations
# Get this from Vercel → Project Settings → Git → Deploy Hooks
VERCEL_DEPLOY_HOOK_URL=https://api.vercel.com/v1/integrations/deploy/your-hook-id
# PostHog Analytics Configuration
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
# Loops.so Email Marketing Configuration
# API key for Loops.so integration - used to add new users to mailing lists
LOOPS_API_KEY=
# =============================================================================
# Feature Flags Configuration
# =============================================================================
# Set to "1" or "true" to enable features in production
# Features are enabled by default in development
SHOW_SEARCH=true
SHOW_TOS=true
SHOW_PRIVACY=true
SHOW_LOGIN_SIGNUP=true
SHOW_PORTFOLIO=false
SHOW_ACTIVITY=false
# Batch Predictions Configuration (Standard Daily)
BATCH_PREDICTIONS_TOP_COUNT=10
# Extend prediction window
BATCH_PREDICTIONS_TARGET_DAYS=14
# More comprehensive accuracy checking (reduced from 45 to conserve bandwidth)
PREDICTION_CHECK_LOOKBACK_DAYS=30
# More frequent data updates
BATCH_PREDICTIONS_END_RANGE_HOURS=48
BATCH_PREDICTIONS_MODEL=google/gemini-2.5-flash-lite
#
# Batch predictions web search control (set to 'true' to enable, anything else disables)
BATCH_PREDICTIONS_WEB_SEARCH=false
# Batch Predictions Configuration (6-Month High-Volume)
BATCH_PREDICTIONS_6MONTH_TOP_COUNT=25
BATCH_PREDICTIONS_6MONTH_END_RANGE_HOURS=4320 # 6 months = 180 days * 24 hours
BATCH_PREDICTIONS_6MONTH_TARGET_DAYS=180 # 6 months
BATCH_PREDICTIONS_6MONTH_MODEL=google/gemini-2.0-flash-001
BATCH_PREDICTIONS_6MONTH_CONCURRENCY=3
# =============================================================================
# Polymarket Data Update Configuration
# =============================================================================
# DAILY UPDATE (Every 6 Hours)
# Standard refresh for active markets and recent events
# Used by: /lib/inngest/functions/polymarket-data-update.ts
POLYMARKET_UPDATE_LIMIT=50 # Max events per batch (default: 50, production recommended: 50-100)
POLYMARKET_UPDATE_BATCH_SIZE=50 # Events per API batch (default: 50)
POLYMARKET_UPDATE_DAYS_PAST=8 # Days to look back for events
POLYMARKET_UPDATE_DAYS_FUTURE=21 # Days to look ahead for events
POLYMARKET_UPDATE_DELAY_MS=1000 # Delay between API requests (rate limiting)
POLYMARKET_UPDATE_MAX_RETRIES=3 # Max retries for failed requests
POLYMARKET_UPDATE_RETRY_DELAY_MS=2000 # Delay between retries
POLYMARKET_UPDATE_TIMEOUT_MS=30000 # Request timeout (30 seconds)
POLYMARKET_UPDATE_USER_AGENT=BetterAI/1.0 # User agent for API requests
POLYMARKET_UPDATE_MAX_BATCH_FAILURES=3 # Max batch failures before abort
POLYMARKET_TIMEOUT_WARNING_MS=600000 # Timeout warning at 10 minutes (optional)
POLYMARKET_TIMEOUT_ABORT_MS=720000 # Timeout abort at 12 minutes (optional)
# 6-MONTH COMPREHENSIVE UPDATE (Weekly on Sundays)
# High-volume comprehensive analysis for long-term predictions
# Used by: /lib/inngest/functions/polymarket-data-update-6month.ts
POLYMARKET_6MONTH_MAX_EVENTS_LIMIT=2000 # Max events (default: 3000, production currently: 25)
POLYMARKET_6MONTH_UPDATE_BATCH_SIZE=50 # Events per API batch (default: 50)
POLYMARKET_6MONTH_UPDATE_DAYS_PAST=8 # Days to look back for events
POLYMARKET_6MONTH_UPDATE_DAYS_FUTURE=180 # Days to look ahead (6 months)
POLYMARKET_6MONTH_UPDATE_DELAY_MS=1000 # Delay between API requests
POLYMARKET_6MONTH_UPDATE_MAX_RETRIES=3 # Max retries for failed requests
POLYMARKET_6MONTH_UPDATE_RETRY_DELAY_MS=2000 # Delay between retries
POLYMARKET_6MONTH_UPDATE_TIMEOUT_MS=30000 # Request timeout (30 seconds)
POLYMARKET_6MONTH_UPDATE_USER_AGENT=BetterAI-6Month/1.0 # User agent for API requests
POLYMARKET_6MONTH_UPDATE_MAX_BATCH_FAILURES=3 # Max batch failures before abort
POLYMARKET_6MONTH_UPDATE_SORT_BY=volume1yr # Sort by annual volume for high-volume events
POLYMARKET_6MONTH_TIMEOUT_WARNING_MS=600000 # Timeout warning at 10 minutes (optional)
POLYMARKET_6MONTH_TIMEOUT_ABORT_MS=720000 # Timeout abort at 12 minutes (optional)