forked from nirholas/crypto-vision
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
104 lines (74 loc) · 4.64 KB
/
.env.example
File metadata and controls
104 lines (74 loc) · 4.64 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
# ═══════════════════════════════════════════════════════════════
# Crypto Vision — Environment Variables
# ═══════════════════════════════════════════════════════════════
# ─── Server ───────────────────────────────────────────────────
# Port the HTTP server listens on (required, default: 8080)
PORT=8080
# Runtime environment: "development" or "production" (required, default: development)
NODE_ENV=development
# Pino log level: trace | debug | info | warn | error | fatal (optional, default: info)
LOG_LEVEL=debug
# Comma-separated list of allowed CORS origins (optional, all origins allowed in development)
CORS_ORIGINS=
# Graceful shutdown timeout in milliseconds (optional, default: 15000)
SHUTDOWN_TIMEOUT_MS=15000
# ─── Cache ────────────────────────────────────────────────────
# Redis connection URL for response caching (optional — in-memory LRU used when absent)
REDIS_URL=redis://localhost:6379
# ─── Rate Limiting ───────────────────────────────────────────
# Requests per minute per IP (optional, default: 200)
RATE_LIMIT_RPM=200
# ─── API Key Auth ────────────────────────────────────────────
# Comma-separated API keys with optional tier suffix (optional)
# Format: key1:basic,key2:pro — keys without suffix default to "basic"
# Tiers: public (no key, 30 req/min), basic (200 req/min), pro (2000 req/min)
API_KEYS=
# Comma-separated admin API keys for key management endpoints (optional)
ADMIN_API_KEYS=
# ─── Circuit Breaker ─────────────────────────────────────────
# Consecutive failures before opening circuit for an upstream host (optional, default: 5)
CB_FAILURE_THRESHOLD=5
# Milliseconds before half-open probe after circuit opens (optional, default: 30000)
CB_RESET_MS=30000
# Max concurrent HTTP requests per upstream host (optional, default: 10)
FETCH_CONCURRENCY_PER_HOST=10
# ─── Queue / Concurrency ─────────────────────────────────────
# Max concurrent AI requests processed in parallel (optional, default: 10)
AI_CONCURRENCY=10
# Max queued AI requests before rejecting new ones (optional, default: 500)
AI_MAX_QUEUE=500
# Max concurrent heavy upstream fetches (optional, default: 20)
HEAVY_FETCH_CONCURRENCY=20
# ─── Market Data APIs ────────────────────────────────────────
# Free APIs (no key required): CoinGecko free tier, DeFiLlama,
# CoinPaprika, CoinCap, DexScreener, Fear & Greed Index
# CoinGecko API key for higher rate limits (optional)
COINGECKO_API_KEY=
# Set to "true" to use CoinGecko Pro base URL (optional, default: false)
COINGECKO_PRO=false
# CryptoCompare API key for additional market data (optional, not yet wired)
CRYPTOCOMPARE_API_KEY=
# ─── News ─────────────────────────────────────────────────────
# Base URL for the upstream news aggregation service (optional, default: https://cryptocurrency.cv)
NEWS_API_URL=
# NewsAPI.org key for headline ingestion (optional, not yet wired)
NEWSAPI_API_KEY=
# CryptoPanic API key for sentiment-tagged news (optional, not yet wired)
CRYPTOPANIC_API_KEY=
# ─── AI Providers (at least one required for /ai endpoints) ──
# Providers are tried in order: Groq → Gemini → OpenAI → Anthropic → OpenRouter
# Groq API key — fastest inference, tried first (optional)
GROQ_API_KEY=
# Google Gemini API key (optional)
GEMINI_API_KEY=
# OpenAI API key (optional)
OPENAI_API_KEY=
# Anthropic API key (optional)
ANTHROPIC_API_KEY=
# OpenRouter API key — multi-model gateway, tried last (optional)
OPENROUTER_API_KEY=
# ─── Infrastructure (production / GCP) ───────────────────────
# Google Cloud project ID for Cloud Run deployment (optional)
GCP_PROJECT_ID=
# Google Cloud region (optional, default: us-central1)
GCP_REGION=us-central1