Skip to content

Environment Variables

Juca uses 30+ environment variables configured via .env.local. Copy .env.example as a starting point:

Terminal window
cp .env.example .env.local
Terminal window
ANTHROPIC_API_KEY=sk-ant-...
GROQ_API_KEY=gsk_...
ENABLE_DEV_AUTH=true
VariableDescriptionRequired
ANTHROPIC_API_KEYAnthropic API key for Claude (Sonnet 4, Opus 4, Haiku 3.5)Yes
GROQ_API_KEYGroq API key for fast inference critics (Qwen 3 32B, Llama 3.3 70B)Yes
OPENAI_API_KEYOpenAI API key (GPT-5.x, o3, o1, GPT-4.1)No
DEEPSEEK_API_KEYDeepSeek API key (R1, Chat)No
GEMINI_API_KEYGoogle Gemini API key (2.5 Flash/Pro)No
OLLAMA_BASE_URLOllama base URL for local models (comparator only)No
VariableDescriptionRequired
VALTER_API_URLValter REST API base URLYes (hub mode)
VALTER_API_KEYValter API key (X-API-Key header)Yes (hub mode)
VariableDescriptionDefault
DATA_PATHRoot data directory./data
INTEGRAS_PATHFull decision texts directory./data/integras
SESSIONS_PATHSession persistence directory./data/sessions
FEEDBACK_PATHUser feedback storage path
SQLITE_PATHMain SQLite database file./data/juca.db
SEARCH_DB_PATHSearch index database file
SQLITE_VEC_PATHsqlite-vec extension path
VariableDescriptionDefault
KG_PROVIDERKG backend: json (local files) or neo4j (Neo4j Aura)json
NEO4J_URINeo4j connection URI (neo4j+s://...)
NEO4J_USERNAMENeo4j username
NEO4J_PASSWORDNeo4j password
VariableDescriptionRequired
ENABLE_DEV_AUTHSet to true to bypass auth for local devNo
ENABLE_TEST_AUTHMock auth for automated testsNo
GOOGLE_CLIENT_IDGoogle OAuth 2.0 client IDProduction only
GOOGLE_CLIENT_SECRETGoogle OAuth 2.0 client secretProduction only
AUTH_SECRETNextAuth JWT secret (generate with openssl rand -base64 32)Production only
RESEND_API_KEYResend API key for magic link emailsProduction only
AUTH_EMAIL_FROMSender email for magic linksProduction only
ADMIN_EMAILSComma-separated admin email whitelist (case-insensitive)No
VariableDescriptionDefault
EMBEDDING_SERVICE_URLExternal embedding service URL
EMBEDDING_MODELEmbedding model namerufimelo/Legal-BERTimbau-sts-base
VariableDescriptionDefault
OTEL_EXPORTER_OTLP_ENDPOINTOpenTelemetry OTLP endpoint— (disabled)
OTEL_EXPORTER_OTLP_HEADERSOTLP authentication headers
VITE_LOG_ENDPOINTRemote structured logging endpoint
VariableDescriptionDefault
NEXT_PUBLIC_APP_URLPublic application URLhttp://localhost:3000
NEXT_PUBLIC_API_URLAPI base URL (client-side)'' (same origin)
ANALYZEEnable Next.js bundle analyzer— (disabled)