-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.env.example
More file actions
585 lines (489 loc) · 25.1 KB
/
.env.example
File metadata and controls
585 lines (489 loc) · 25.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
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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# CreditNexus — Annotated environment variable reference
# Copy desired sections to .env and fill values. See .env.example.
# Polymarket: dev/POLYMARKET_CONFIGURATION_GUIDE.md
# RevenueCat: dev/REVENUECAT_CONFIGURATION_GUIDE.md
# Run: npx localtunnel --port 8000 → your url is: https://icy-chairs-warn.loca.lt
# then set VERIFICATION_BASE_URL (and DigiSigner/webhook URLs) to that tunnel.
VERIFICATION_BASE_URL=https://icy-chairs-warn.loca.lt
ENCRYPTION_KEY=
LINK_ENCRYPTION_KEY=
# =============================================================================
# LLM Provider Configuration
# =============================================================================
# Choose your LLM provider: "openai", "vllm", or "huggingface"
LLM_PROVIDER=openai
# =============================================================================
# OPTIONAL: OpenAI API Key (always required, even if using other providers)
# =============================================================================
OPENAI_API_KEY=your_openai_api_key_here
# Model name/identifier (varies by provider)
# OpenAI: "gpt-4o", "gpt-4o-mini", "gpt-3.5-turbo"
# vLLM: Model name as configured in your vLLM server
# HuggingFace: Model ID from HuggingFace Hub (e.g., "microsoft/Phi-3-mini-4k-instruct")
LLM_MODEL=gpt-4o
# Temperature for LLM generation (0.0 = deterministic, 1.0 = creative)
LLM_TEMPERATURE=0.0
# =============================================================================
# vLLM Configuration (only needed if LLM_PROVIDER=vllm)
# =============================================================================
# Base URL for your vLLM server (e.g., "http://localhost:8000")
VLLM_BASE_URL=
# Optional API key if your vLLM server requires authentication
VLLM_API_KEY=
# =============================================================================
# HuggingFace Configuration (only needed if LLM_PROVIDER=huggingface)
# =============================================================================
# HuggingFace API token (get from https://huggingface.co/settings/tokens)
HUGGINGFACE_API_KEY=
# Optional: Custom base URL for HuggingFace API
# Default: https://api-inference.huggingface.co/v1
# For Inference Providers router: https://router.huggingface.co/{provider}/v3/openai
HUGGINGFACE_BASE_URL=
# HuggingFace Inference Provider Selection
# Available providers: "auto", "together", "sambanova", "fireworks-ai", "cohere",
# "fal-ai", "groq", "replicate", "hf-inference", "black-forest-labs", "cerebras",
# "featherless-ai", "hyperbolic", "nebius", "novita", "nscale", "openai"
# "auto" (default): Selects first available provider based on your preferences
# at https://hf.co/settings/inference-providers
# Specific provider: Forces use of that provider (e.g., "together", "sambanova")
HUGGINGFACE_INFERENCE_PROVIDER=auto
# HuggingFace Local Model Configuration
# Set to true to load models locally using transformers (requires GPU/CPU resources)
# Set to false to use inference endpoints (API-based, no local resources needed)
HUGGINGFACE_USE_LOCAL=false
# =============================================================================
# Embeddings Configuration
# =============================================================================
# Embeddings model name/identifier
# OpenAI: "text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"
# HuggingFace: Model ID from Hub (e.g., "sentence-transformers/all-MiniLM-L6-v2")
EMBEDDINGS_MODEL=text-embedding-3-small
# Embeddings provider (if None, uses LLM_PROVIDER)
# Options: "openai", "huggingface", or leave empty to use LLM_PROVIDER
EMBEDDINGS_PROVIDER=huggingface
# Local Embeddings Configuration (HuggingFace only)
# Set to true to use local embeddings model instead of API
EMBEDDINGS_USE_LOCAL=false
# Device for local embeddings: "cpu", "cuda", "cuda:0", etc.
# "auto" will automatically select the best available device
EMBEDDINGS_DEVICE=cpu
# Additional model_kwargs for HuggingFaceEmbeddings (JSON string)
# Examples:
# '{"device_map":"auto"}' - Auto device mapping
# '{"trust_remote_code":true}' - Trust remote code
# '{"device":"cuda","model_kwargs":{"torch_dtype":"float16"}}' - GPU with float16
EMBEDDINGS_MODEL_KWARGS=
# =============================================================================
# Web Search Service Configuration (for DeepResearch and PeopleHub)
# =============================================================================
# Serper API key for web search (get from https://serper.dev/)
SERPER_API_KEY=
# Rate limit for web search requests (format: "N/period", e.g., "360/hour")
# Default: 360/hour (matches Serper free tier)
WEB_SEARCH_RATE_LIMIT=360/hour
# Directory for web search analytics data (request counts, timing)
# Default: ./data/web_search_analytics (created automatically)
WEB_SEARCH_ANALYTICS_DIR=
# =============================================================================
# Reranking Configuration (for search result reranking)
# =============================================================================
# Use local reranking model (True) or remote API (False)
# Local: Uses sentence-transformers CrossEncoder (requires GPU/CPU resources)
# Remote: Uses API-based reranking (e.g., Cohere, Jina)
RERANKING_USE_LOCAL=true
# Local reranking model identifier (HuggingFace model ID)
# Default: BAAI/bge-reranker-base
# Alternatives: BAAI/bge-reranker-large (better quality), cross-encoder/ms-marco-MiniLM-L-6-v2 (faster)
RERANKING_MODEL=BAAI/bge-reranker-base
# Device for local reranking: "cpu", "cuda", "cuda:0", etc.
RERANKING_DEVICE=cpu
# Remote reranking API URL (only needed if RERANKING_USE_LOCAL=false)
# Examples:
# Cohere: https://api.cohere.ai/v1/rerank
# Jina: https://api.jina.ai/v1/rerank
RERANKING_API_URL=
# Remote reranking API key (only needed if using remote reranking)
RERANKING_API_KEY=
# =============================================================================
# Data Cache TTL (seconds) — app.core.data_cache
# =============================================================================
# OHLCV, snapshots, fundamentals, news, web search, trading quotes, backtest.
# Override to tune freshness vs. API usage. All values in seconds.
# Daily OHLCV bars (default: 7 days)
CACHE_TTL_OHLCV_1D=604800
# Hourly OHLCV bars (default: 1 day)
CACHE_TTL_OHLCV_1H=86400
# 15‑minute OHLCV bars (default: 4 hours)
CACHE_TTL_OHLCV_15M=14400
# Ticker snapshot, e.g. Polygon (default: 90 s)
CACHE_TTL_SNAPSHOT=90
# Fundamental data, e.g. Alpha Vantage (default: 24 h)
CACHE_TTL_FUNDAMENTAL=86400
# News, e.g. Tickertick (default: 30 min)
CACHE_TTL_NEWS=1800
# Web search results (default: 1 h)
CACHE_TTL_WEB_SEARCH=3600
# Alpaca/trading quotes (default: 1 min)
CACHE_TTL_TRADING_QUOTE=60
# Backtest results (default: 24 h)
CACHE_TTL_BACKTEST=86400
# =============================================================================
# LangAlpha Quantitative Analysis Configuration
# =============================================================================
# Polygon.io API key for market data (get from https://polygon.io/)
# Required for market data retrieval (OHLCV, ticker snapshots)
POLYGON_API_KEY=
# Alpha Vantage API key for fundamental data (get from https://www.alphavantage.co/support/#api-key)
# Required for fundamental data retrieval (company overview, financial statements)
ALPHA_VANTAGE_API_KEY=
# Tavily API key for news/search (get from https://tavily.com/)
# Optional; used for LangAlpha news/search when set
TAVILY_API_KEY=
# Tickertick API key for financial news (optional; may not be publicly available)
# Leave unset to use web_search or Tavily
TICKERTICK_API_KEY=
# LangAlpha LLM Model Configuration
# Model for reasoning tasks (supervisor, planner, analyst)
# Default: gpt-4o (OpenAI), can be overridden per provider
LANGALPHA_REASONING_MODEL=gpt-4o
# Model for basic tasks (researcher, reporter, market agent)
# Default: gpt-4o-mini (OpenAI), can be overridden per provider
LANGALPHA_BASIC_MODEL=gpt-4o-mini
# Model for economic analysis tasks
# Default: gpt-4o-mini (OpenAI), can be overridden per provider
LANGALPHA_ECONOMIC_MODEL=gpt-4o-mini
# Model for coding/calculation tasks (coder agent)
# Default: gpt-4o (OpenAI), can be overridden per provider
LANGALPHA_CODING_MODEL=gpt-4o
# Budget level for LangAlpha agents
# Options: "low" (uses economic models), "medium" (uses basic models), "high" (uses reasoning/coding models)
# Default: medium
# Low budget: All agents use economic model (cheapest)
# Medium budget: All agents use basic model (balanced)
# High budget: Agents use specialized models (most expensive, best quality)
LANGALPHA_BUDGET_LEVEL=medium
# =============================================================================
# Sentinel Hub Configuration (for satellite imagery)
# =============================================================================
# Get credentials from https://www.sentinel-hub.com/
SENTINELHUB_KEY=
SENTINELHUB_SECRET=
# =============================================================================
# Policy Engine Configuration
# =============================================================================
POLICY_ENABLED=true
POLICY_RULES_DIR=app/policies
POLICY_RULES_PATTERN=*.yaml
POLICY_ENGINE_VENDOR=
POLICY_AUTO_RELOAD=false
# =============================================================================
# LangChain Configuration for Filing/Signature Chains
# =============================================================================
# Temperature for filing requirement evaluation chains (0.0 = deterministic)
FILING_CHAIN_TEMPERATURE=0.0
# Temperature for signature request generation chains (0.0 = deterministic)
SIGNATURE_CHAIN_TEMPERATURE=0.0
# Maximum retry attempts for filing chains
FILING_CHAIN_MAX_RETRIES=3
# Maximum retry attempts for signature chains
SIGNATURE_CHAIN_MAX_RETRIES=3
# =============================================================================
# Plaid / Banking (Trading Phase 1)
# =============================================================================
# Enable Plaid bank linking (accounts, balances, and transactions) for trading/portfolio views.
# When enabled and correctly configured, the backend exposes:
# - /api/banking/status, /link-token, /connect, /accounts, /balances, /transactions, /disconnect
# and the frontend `LinkAccounts` app uses `react-plaid-link` to open Plaid Link.
# No Plaid secrets are stored in the client; everything flows through these APIs.
PLAID_ENABLED=false
# Plaid API credentials — obtain from the Plaid dashboard.
# For development, use a sandbox or development client ID/secret.
PLAID_CLIENT_ID=
PLAID_SECRET=
# Plaid environment: sandbox, development, or production.
# This controls which Plaid API host is used by `app.services.plaid_service`.
PLAID_ENV=sandbox
# Brokerage funding: link bank (Auth product → processor token → Alpaca ACH), fund (INCOMING), withdraw (OUTGOING).
# Requires PLAID_* above and ALPACA_BROKER_* below. See docs/guides/brokerage-funding.md.
# Plaid Transfer API (instant interbank: RTP when eligible, else ACH). Requires Transfer product enabled in Plaid dashboard.
# Reuses PLAID_CLIENT_ID and PLAID_SECRET from above; no separate Transfer credentials.
PLAID_TRANSFER_ENABLED=false
# Origination account ID from Plaid (for debits). Required when PLAID_TRANSFER_ENABLED=true.
PLAID_TRANSFER_ORIGINATION_ACCOUNT_ID=
# =============================================================================
# Companies House API Configuration (for UK Regulatory Filings)
# =============================================================================
# Companies House API key (free registration at https://developer.company-information.service.gov.uk/)
# Required for automated UK charge filings (MR01)
COMPANIES_HOUSE_API_KEY=
# =============================================================================
# Alpaca (Trading + optional Market Data for Stock Prediction)
# =============================================================================
# See docs/guides/alpaca-trading-setup.md
# Trading: place/cancel orders, portfolio, market data in Trading Dashboard.
# Historical bars: when ALPACA_DATA_ENABLED=true, used for stock prediction and backtest; else yahooquery.
# Note: For multiuser brokerage use ALPACA_BROKER_* below; Trading API vars are for data/backtest only.
ALPACA_BASE_URL=https://paper-api.alpaca.markets
ALPACA_API_KEY=
ALPACA_API_SECRET=
ALPACA_DATA_ENABLED=false
# =============================================================================
# Alpaca Broker API (multiuser brokerage)
# =============================================================================
# Each user gets an Alpaca customer account; orders are placed per account.
# Sandbox: https://broker-api.sandbox.alpaca.markets | Live: https://broker-api.alpaca.markets
ALPACA_BROKER_BASE_URL=https://broker-api.sandbox.alpaca.markets
ALPACA_BROKER_API_KEY=
ALPACA_BROKER_API_SECRET=
ALPACA_BROKER_PAPER=true
# Brokerage onboarding product and optional fee (Plaid link-for-brokerage + payment)
BROKERAGE_ONBOARDING_PRODUCT_ID=brokerage_onboarding
BROKERAGE_ONBOARDING_FEE_ENABLED=false
BROKERAGE_ONBOARDING_FEE_AMOUNT=0.00
BROKERAGE_ONBOARDING_FEE_CURRENCY=USD
# Optional: max single transfer amount for brokerage fund/withdraw (e.g. 25000.00). Leave empty for no limit.
BROKERAGE_MAX_SINGLE_TRANSFER=
# =============================================================================
# Unified funding (credit top-up, Fund Polymarket, Alpaca via x402)
# =============================================================================
# POST /api/funding/request, POST /api/credits/top-up use the payment router (x402 + optional RevenueCat).
# Required: X402_ENABLED and X402_* (see Payment & x402 section below) for MetaMask/facilitator payments.
# Optional: REVENUECAT_ENABLED and REVENUECAT_* for "Add credits" / credit top-up via RevenueCat.
# No additional env vars; funding types: credit_top_up, polymarket_funding, alpaca_funding.
# =============================================================================
# Stock Prediction & Modal (Chronos)
# =============================================================================
# See docs/guides/stock-prediction-setup.md
# Market data: Alpaca (ALPACA_DATA_ENABLED=true) or yahooquery. Backtest needs ≥130 bars.
# Enable stock prediction APIs (daily, hourly, 15min, backtest, recommend-order)
STOCK_PREDICTION_ENABLED=false
# Default lookback bars: daily, hourly, 15min
STOCK_PREDICTION_DEFAULT_LOOKBACK_DAILY=252
STOCK_PREDICTION_DEFAULT_LOOKBACK_HOURLY=504
STOCK_PREDICTION_DEFAULT_LOOKBACK_15MIN=96
# Modal app for Chronos. When STOCK_PREDICTION_USE_LOCAL=false, Chronos runs on Modal.
# For GPU on Modal: set MODAL_USE_GPU=1 when running `modal run` or `modal deploy`.
MODAL_APP_NAME=creditnexus-stock-prediction
MODAL_TOKEN_ID=
MODAL_TOKEN_SECRET=
# Use GPU (T4) for chronos_inference on Modal. Env: MODAL_USE_GPU=1 or true when deploying/running Modal.
MODAL_USE_GPU=false
# Chronos: model and device
CHRONOS_MODEL_ID=amazon/chronos-t5-small
# Device: cpu, cuda, cuda:0. Used by Modal and when STOCK_PREDICTION_USE_LOCAL=true
CHRONOS_DEVICE=cpu
# Run Chronos locally (torch+chronos-bolt) instead of Modal. Requires: pip install chronos-bolt torch
STOCK_PREDICTION_USE_LOCAL=false
# =============================================================================
# Polymarket (SFP prediction markets & surveillance)
# =============================================================================
# Surveillance: docs/guides/polymarket-surveillance-signals.md
POLYMARKET_ENABLED=false
POLYMARKET_API_URL=
POLYMARKET_API_KEY=
POLYMARKET_NETWORK=polygon
POLYMARKET_GAMMA_API_URL=https://gamma-api.polymarket.com
POLYMARKET_DATA_API_URL=https://data-api.polymarket.com
POLYMARKET_SURVEILLANCE_ENABLED=false
POLYMARKET_PUBLISH_EXTERNAL=false
# Builders Program: order attribution & relayer (obtain from polymarket.com/settings?tab=builder)
POLY_BUILDER_API_KEY=
POLY_BUILDER_SECRET=
POLY_BUILDER_PASSPHRASE=
POLYMARKET_BUILDER_SIGNING_MODE=remote
POLYMARKET_RELAYER_URL=https://relayer-v2.polymarket.com/
# =============================================================================
# Polymarket Cross-Chain (bridge, outcome tokens)
# =============================================================================
# See docs/guides/polymarket-cross-chain-setup.md
# Enable cross-chain bridge and SFP outcome token minting on L2s
CROSS_CHAIN_ENABLED=false
# Bridge API URL for cross-chain transfers
POLYMARKET_BRIDGE_API_URL=
# Chain ID for outcome tokens (e.g. Base=8453, Polygon=137)
OUTCOME_TOKEN_CHAIN_ID=
# ERC-1155 SFP outcome token contract on OUTCOME_TOKEN_CHAIN_ID
SFP_OUTCOME_TOKEN_CONTRACT=
# =============================================================================
# x402 Payment Engine Configuration
# =============================================================================
REQUIRE_CREDITS_FOR_PREDICTIONS=
X402_ENABLED=true
X402_FACILITATOR_URL=https://facilitator.x402.org
X402_NETWORK=base
X402_TOKEN=USDC
# Base Mainnet (Production)
# X402_NETWORK_RPC_URL=https://mainnet.base.org
# Base Sepolia (Testnet) — Recommended for development
# X402_NETWORK_RPC_URL=https://sepolia.base.org
# Local Hardhat Network RPC
X402_NETWORK_RPC_URL=http://127.0.0.1:8545
# =============================================================================
# RevenueCat (subscriptions & entitlements) — integrates with x402
# =============================================================================
# See dev/REVENUECAT_CONFIGURATION_GUIDE.md for entitlement/upgrade flows, PaymentRouter, troubleshooting.
# Enables entitlement checks (GET /api/subscriptions/entitlement) and post–x402 promotional grants.
REVENUECAT_ENABLED=false
# RevenueCat secret API key (sk_...) for REST API. Required when REVENUECAT_ENABLED=true.
REVENUECAT_API_KEY=
# Entitlement identifier for Pro tier (Polymarket, premium features)
REVENUECAT_ENTITLEMENT_PRO=pro
# Amount in USD for subscription upgrade via x402 (POST /api/subscriptions/upgrade). Pro tier.
SUBSCRIPTION_UPGRADE_AMOUNT=9.99
# =============================================================================
# Blockchain & Smart Contract Configuration
# =============================================================================
# RPC URL for Base network
# Mainnet: https://mainnet.base.org
# Sepolia Testnet: https://sepolia.base.org
X402_NETWORK_RPC_URL=https://mainnet.base.org
# Securitization Smart Contracts (Base network)
# If empty, contracts will be auto-deployed on first use (if BLOCKCHAIN_AUTO_DEPLOY=true)
# Get addresses after deploying contracts (see contracts/README.md, docs/guides/rolling-credits-setup.md)
SECURITIZATION_NOTARIZATION_CONTRACT=
SECURITIZATION_TOKEN_CONTRACT=
SECURITIZATION_PAYMENT_ROUTER_CONTRACT=
# CreditToken (ERC-721) for rolling credits; deploy via contracts/scripts/deploy.js
# See docs/guides/rolling-credits-setup.md
CREDIT_TOKEN_CONTRACT=
# USDC Token Address (Base network)
# Mainnet: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
# Sepolia Testnet: (check Base Sepolia documentation for testnet USDC address)
USDC_TOKEN_ADDRESS=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
# Smart Contract Auto-Deployment
# Private key for contract deployment (optional, auto-generated in dev if not provided)
# WARNING: Never commit private keys to version control!
# Format: 0x... (64 hex characters, no 0x prefix in .env)
BLOCKCHAIN_DEPLOYER_PRIVATE_KEY=
# Auto-deploy contracts if addresses not in config (default: true for development)
# Set to false in production and manually deploy contracts
BLOCKCHAIN_AUTO_DEPLOY=true
# Wallet Auto-Generation
# Auto-generate demo wallet addresses for users without wallets (default: true)
# Useful for development and demos
WALLET_AUTO_GENERATE_DEMO=true
# =============================================================================
# Audio Transcription (STT) Configuration
# =============================================================================
# Gradio Space URL for speech-to-text (default: nvidia/canary-1b-v2)
STT_API_URL=https://nvidia-canary-1b-v2.hf.space
STT_SOURCE_LANG=en
STT_TARGET_LANG=en
# =============================================================================
# Image OCR Configuration
# =============================================================================
# Gradio Space URL for OCR (default: prithivMLmods/Multimodal-OCR3)
OCR_API_URL=https://prithivmlmods-multimodal-ocr3.hf.space
# =============================================================================
# ChromaDB Configuration
# =============================================================================
CHROMADB_PERSIST_DIR=./chroma_db
# Optional: Directory to load documents into ChromaDB on startup
CHROMADB_SEED_DOCUMENTS_DIR=
# =============================================================================
# Enhanced Satellite Verification & Green Finance
# =============================================================================
# Enable enhanced satellite features (green finance metrics, OSM, air quality)
ENHANCED_SATELLITE_ENABLED=true
# Street map API provider (only "openstreetmap" supported)
STREET_MAP_API_PROVIDER=openstreetmap
# OpenStreetMap Configuration
OSM_OVERPASS_API_URL=https://overpass-api.de/api/interpreter
OSM_CACHE_ENABLED=true
OSM_CACHE_TTL_HOURS=24
# Air Quality Configuration
AIR_QUALITY_ENABLED=true
AIR_QUALITY_API_PROVIDER=openaq
# Not required for OpenAQ free tier
AIR_QUALITY_API_KEY=
AIR_QUALITY_CACHE_ENABLED=true
AIR_QUALITY_CACHE_TTL_HOURS=24
# Vehicle Detection (Selective - High Cost)
# Default: disabled, enable for high-value cases only
VEHICLE_DETECTION_ENABLED=false
VEHICLE_DETECTION_MODEL_PATH=./models/vehicle_detector.pt
# Only process if transaction amount > $1M
VEHICLE_DETECTION_MIN_TRANSACTION_AMOUNT=1000000.0
VEHICLE_DETECTION_USE_HIGH_RES_IMAGERY=true
# Pollution Monitoring
POLLUTION_MONITORING_ENABLED=true
METHANE_MONITORING_ENABLED=true
# Use Sentinel-5P for methane detection (free, coarse resolution)
METHANE_USE_SENTINEL5P=true
# Sustainability Scoring
SUSTAINABILITY_SCORING_ENABLED=true
# Component weights (must sum to 1.0)
SUSTAINABILITY_NDVI_WEIGHT=0.25
SUSTAINABILITY_AQI_WEIGHT=0.25
SUSTAINABILITY_ACTIVITY_WEIGHT=0.20
SUSTAINABILITY_GREEN_INFRA_WEIGHT=0.15
SUSTAINABILITY_POLLUTION_WEIGHT=0.15
# =============================================================================
# Twilio Configuration (for loan recovery notifications)
# =============================================================================
# Enable Twilio integration for SMS and voice communication
TWILIO_ENABLED=false
# Twilio Account SID (get from https://console.twilio.com/)
TWILIO_ACCOUNT_SID=
# Twilio Auth Token (get from https://console.twilio.com/)
# WARNING: Keep this secret! Never commit to version control.
TWILIO_AUTH_TOKEN=
# Twilio phone number (E.164 format, e.g., +1234567890)
# Purchase from https://console.twilio.com/us1/develop/phone-numbers/manage/search
TWILIO_PHONE_NUMBER=
# Enable SMS functionality (requires TWILIO_ENABLED=true)
TWILIO_SMS_ENABLED=true
# Enable voice call functionality (requires TWILIO_ENABLED=true)
TWILIO_VOICE_ENABLED=true
# Webhook URL for Twilio status callbacks
# Set to your public URL + /api/twilio/webhook/status
# Example: https://your-domain.com/api/twilio/webhook/status
# For local development with tunneling: https://your-tunnel-url.loca.lt/api/twilio/webhook/status
TWILIO_WEBHOOK_URL=
# =============================================================================
# Demo Data Configuration
# =============================================================================
DEMO_DATA_ENABLED=true
DEMO_DATA_DEAL_COUNT=12
DEMO_DATA_DEAL_TYPES=loan_application,refinancing,restructuring
DEMO_DATA_STORAGE_PATH=storage/deals/demo
DEMO_DATA_CACHE_ENABLED=true
DEMO_DATA_CACHE_TTL=86400
DEMO_DATA_CACHE_PATH=
# =============================================================================
# Database Configuration
# =============================================================================
# PostgreSQL connection string:
# postgresql://user:password@localhost:5432/creditnexus
# SQLite (development fallback, auto-created if not set):
# sqlite:///./creditnexus.db
DATABASE_URL=postgresql://user:password@localhost:5432/creditnexus
DATABASE_ENABLED=true
# =============================================================================
# Authentication Configuration
# =============================================================================
# JWT secret key for token generation (generate a secure random string)
JWT_SECRET_KEY=your_jwt_secret_key_here
JWT_ALGORITHM=HS256
# =============================================================================
# Seeding Configuration
# =============================================================================
# Seed permission definitions and role mappings on startup
SEED_PERMISSIONS=false
# Force update existing permissions (use with caution)
SEED_PERMISSIONS_FORCE=false
# Seed demo users on startup
SEED_DEMO_USERS=false
# Force update existing demo users (use with caution)
SEED_DEMO_USERS_FORCE=false
# Seed individual demo user roles
SEED_AUDITOR=false
SEED_BANKER=false
SEED_LAW_OFFICER=false
SEED_ACCOUNTANT=false
SEED_APPLICANT=false
# -----------------------------------------------------------------------------
# x402, Securitization, USDC, BLOCKCHAIN_*, WALLET_*: see "x402 Payment Engine"
# and "Securitization Smart Contracts" above. For production: set
# X402_NETWORK_RPC_URL to https://mainnet.base.org or https://sepolia.base.org.
# -----------------------------------------------------------------------------