Skip to content

An AI-powered search engine with a generative UI

refactor: reorganize and update .env.local.example for v1.0

Yoshiki Miura66a36b242d28
diff --git a/.env.local.example b/.env.local.example
index 414514bc..7bb94614 100644
--- a/.env.local.example
+++ b/.env.local.example
@@ -1,128 +1,128 @@
###############################################################################
-# Required Configuration
-# These settings are essential for the basic functionality of the system.
+# Morphic Configuration
###############################################################################
-# OpenAI API key retrieved here: https://platform.openai.com/api-keys
-OPENAI_API_KEY=[YOUR_OPENAI_API_KEY]
-
-# Search Configuration
-TAVILY_API_KEY=[YOUR_TAVILY_API_KEY] # Get your API key at: https://app.tavily.com/home
+# =============================================================================
+# REQUIRED CONFIGURATION
+# These settings are essential for the application to function
+# =============================================================================
-# Optional Docker Configuration (only needed in some Docker environments)
-# BASE_URL=http://localhost:3000 # Use only if models.json fails to load in Docker
+# -----------------------------------------------------------------------------
+# Database Configuration (Required)
+# -----------------------------------------------------------------------------
+# PostgreSQL connection string (supports Neon, Supabase, or standard PostgreSQL)
+# Format: postgresql://[user]:[password]@[host]/[database]?sslmode=require
+DATABASE_URL=[YOUR_DATABASE_URL]
-###############################################################################
-# Optional Features
-# Enable these features by uncommenting and configuring the settings below
-###############################################################################
+# -----------------------------------------------------------------------------
+# AI Provider Configuration (At least one required)
+# -----------------------------------------------------------------------------
+# IMPORTANT: When using non-OpenAI providers, you must update the model
+# configuration in config/models/*.json to use compatible model IDs for your
+# chosen provider. See docs/CONFIGURATION.md for provider-specific model IDs.
-#------------------------------------------------------------------------------
-# Chat History Storage
-# Enable persistent chat history across sessions
-#------------------------------------------------------------------------------
-# ENABLE_SAVE_CHAT_HISTORY=true # enable chat history storage
-
-# Redis Configuration (Required if ENABLE_SAVE_CHAT_HISTORY=true)
-# Choose between local Redis or Upstash Redis
-# OPTION 1: Local Redis
-# USE_LOCAL_REDIS=false # use local Redis
-# LOCAL_REDIS_URL=redis://localhost:6379 # local Redis URL (if USE_LOCAL_REDIS=true)
-
-# OPTION 2: Upstash Redis (Recommended for production)
-# UPSTASH_REDIS_REST_URL=[YOUR_UPSTASH_REDIS_REST_URL] # Upstash Redis REST URL (if USE_LOCAL_REDIS=false)
-# UPSTASH_REDIS_REST_TOKEN=[YOUR_UPSTASH_REDIS_REST_TOKEN] # Upstash Redis REST Token (if USE_LOCAL_REDIS=false)
-
-#------------------------------------------------------------------------------
-# Additional AI Providers
-# Enable alternative AI models by configuring these providers
-#------------------------------------------------------------------------------
-# Google Generative AI
-# GOOGLE_GENERATIVE_AI_API_KEY=[YOUR_GOOGLE_GENERATIVE_AI_API_KEY]
+# Option 1: OpenAI
+# Get your API key at: https://platform.openai.com/api-keys
+OPENAI_API_KEY=[YOUR_OPENAI_API_KEY]
-# Anthropic (Claude)
+# Option 2: Anthropic Claude
+# Requires updating config/models/*.json with Anthropic model IDs
# ANTHROPIC_API_KEY=[YOUR_ANTHROPIC_API_KEY]
-# Groq
-# GROQ_API_KEY=[YOUR_GROQ_API_KEY]
-
-# Ollama
-# OLLAMA_BASE_URL=http://localhost:11434
-
-# Azure OpenAI
-# AZURE_API_KEY=
-# AZURE_RESOURCE_NAME=
-
-# DeepSeek
-# DEEPSEEK_API_KEY=[YOUR_DEEPSEEK_API_KEY]
-
-# Fireworks
-# FIREWORKS_API_KEY=[YOUR_FIREWORKS_API_KEY]
-
-# xAI (Grok)
-# XAI_API_KEY=[YOUR_XAI_API_KEY]
+# Option 3: Google Gemini
+# Requires updating config/models/*.json with Google model IDs
+# GOOGLE_GENERATIVE_AI_API_KEY=[YOUR_GOOGLE_GENERATIVE_AI_API_KEY]
-# OpenAI Compatible Model
-# OPENAI_COMPATIBLE_API_KEY=
-# OPENAI_COMPATIBLE_API_BASE_URL=
+# Option 4: Vercel AI Gateway
+# Unified API gateway for multiple providers
+# AI_GATEWAY_API_KEY=[YOUR_AI_GATEWAY_API_KEY]
+
+# -----------------------------------------------------------------------------
+# Search Provider Configuration (Required)
+# -----------------------------------------------------------------------------
+# Tavily Search
+# Get your API key at: https://app.tavily.com/home
+TAVILY_API_KEY=[YOUR_TAVILY_API_KEY]
+
+# Brave Search (Required for comprehensive search results)
+# Get your API key at: https://brave.com/search/api/
+# Note: Can be made optional by commenting out after initial setup
+BRAVE_SEARCH_API_KEY=[YOUR_BRAVE_SEARCH_API_KEY]
+
+# -----------------------------------------------------------------------------
+# Authentication Configuration (Required)
+# -----------------------------------------------------------------------------
+# Supabase Authentication
+# Get your project URL and anon key from: https://supabase.com/dashboard
+# Note: Can be made optional in future releases for anonymous-only usage
+NEXT_PUBLIC_SUPABASE_URL=[YOUR_SUPABASE_PROJECT_URL]
+NEXT_PUBLIC_SUPABASE_ANON_KEY=[YOUR_SUPABASE_ANON_KEY]
+
+# =============================================================================
+# OPTIONAL FEATURES
+# Enable additional functionality as needed
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# File Upload Support (Cloudflare R2)
+# Enable file and image upload functionality
+# -----------------------------------------------------------------------------
+# R2_ACCOUNT_ID=[YOUR_R2_ACCOUNT_ID]
+# R2_ACCESS_KEY_ID=[YOUR_R2_ACCESS_KEY_ID]
+# R2_SECRET_ACCESS_KEY=[YOUR_R2_SECRET_ACCESS_KEY]
+# R2_BUCKET_NAME=user-uploads # Default: user-uploads
+# R2_PUBLIC_URL=[YOUR_R2_PUBLIC_URL] # e.g., https://pub-xxx.r2.dev
-#------------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# Alternative Search Providers
-# Configure different search backends (default: Tavily)
-#------------------------------------------------------------------------------
-# SEARCH_API=searxng # Available options: tavily, searxng, exa
+# Configure different search backends
+# -----------------------------------------------------------------------------
+# Select search provider (default: tavily)
+# SEARCH_API=tavily # Options: tavily, searxng, exa
+
+# Exa Neural Search
+# EXA_API_KEY=[YOUR_EXA_API_KEY]
-# SearXNG Configuration (Required if SEARCH_API=searxng)
-# SEARXNG_API_URL=http://localhost:8080 # Replace with your local SearXNG API URL or docker http://searxng:8080
-# SEARXNG_SECRET="" # generate a secret key e.g. openssl rand -base64 32
+# SearXNG (Self-hosted)
+# SEARXNG_API_URL=http://localhost:8080 # Or docker: http://searxng:8080
+# SEARXNG_SECRET=[YOUR_SECRET_KEY] # Generate: openssl rand -base64 32
# SEARXNG_PORT=8080
# SEARXNG_BIND_ADDRESS=0.0.0.0
# SEARXNG_IMAGE_PROXY=true
# SEARXNG_LIMITER=false
-# SEARXNG_DEFAULT_DEPTH=basic
+# SEARXNG_DEFAULT_DEPTH=basic # Options: basic, advanced
# SEARXNG_MAX_RESULTS=50
# SEARXNG_ENGINES=google,bing,duckduckgo,wikipedia
-# SEARXNG_TIME_RANGE=None
-# SEARXNG_SAFESEARCH=0
-
-#------------------------------------------------------------------------------
-# Additional Features
-# Enable extra functionality as needed
-#------------------------------------------------------------------------------
-# NEXT_PUBLIC_ENABLE_SHARE=true # Enable sharing of chat conversations
-# SERPER_API_KEY=[YOUR_SERPER_API_KEY] # Enable video search capability
-# JINA_API_KEY=[YOUR_JINA_API_KEY] # Alternative to Tavily for retrieve tool
-
-#------------------------------------------------------------------------------
-# Langfuse Configuration (LLM Observability)
-# Enable tracing and monitoring of AI operations
-#------------------------------------------------------------------------------
-# ENABLE_LANGFUSE_TRACING=false # Enable Langfuse tracing (default: false)
-# LANGFUSE_SECRET_KEY=[YOUR_LANGFUSE_SECRET_KEY] # Get from https://cloud.langfuse.com
-# LANGFUSE_PUBLIC_KEY=[YOUR_LANGFUSE_PUBLIC_KEY] # Get from https://cloud.langfuse.com
-# LANGFUSE_BASEURL=https://cloud.langfuse.com # Or your self-hosted URL
-
-# ------------------------------
-# Database Configuration
-# ------------------------------
-# PostgreSQL connection string for Neon DB
-# Format: postgresql://[user]:[password]@[host]/[database]?sslmode=require
-DATABASE_URL=[YOUR_NEON_DATABASE_URL]
-
-# ------------------------------
-# Supabase Configuration (Auth)
-# ------------------------------
-# Your Supabase project URL.
-# NEXT_PUBLIC_SUPABASE_URL=[YOUR_NEXT_PUBLIC_SUPABASE_URL]
-
-# Your Supabase project's anonymous (public) key.
-# NEXT_PUBLIC_SUPABASE_ANON_KEY=[YOUR_NEXT_PUBLIC_SUPABASE_ANON_KEY]
-
-# ------------------------------
-# Cloudflare R2 Configuration
-# ------------------------------
-# R2_ACCOUNT_ID=[YOUR_R2_ACCOUNT_ID]
-# R2_ACCESS_KEY_ID=[YOUR_R2_ACCESS_KEY_ID]
-# R2_SECRET_ACCESS_KEY=[YOUR_R2_SECRET_ACCESS_KEY]
-# R2_BUCKET_NAME=user-uploads
-# R2_PUBLIC_URL=[YOUR_R2_PUBLIC_URL] # e.g., https://pub-xxx.r2.dev or your custom domain
\ No newline at end of file
+# SEARXNG_TIME_RANGE=None # Options: day, week, month, year, None
+# SEARXNG_SAFESEARCH=0 # 0=off, 1=moderate, 2=strict
+
+# -----------------------------------------------------------------------------
+# Content Extraction
+# -----------------------------------------------------------------------------
+# Default: Tavily Extract API (uses TAVILY_API_KEY configured above)
+#
+# Alternative: Jina AI - Enhanced content extraction from web pages
+# Provides alternative extraction method with different capabilities
+# Get your API key at: https://jina.ai/
+# JINA_API_KEY=[YOUR_JINA_API_KEY]
+
+# -----------------------------------------------------------------------------
+# Observability & Monitoring
+# -----------------------------------------------------------------------------
+# Langfuse Tracing
+# ENABLE_LANGFUSE_TRACING=true
+# LANGFUSE_SECRET_KEY=[YOUR_LANGFUSE_SECRET_KEY]
+# LANGFUSE_PUBLIC_KEY=[YOUR_LANGFUSE_PUBLIC_KEY]
+# LANGFUSE_BASEURL=https://cloud.langfuse.com # Or self-hosted URL
+
+# Performance Logging
+# ENABLE_PERF_LOGGING=true
+
+# -----------------------------------------------------------------------------
+# Advanced Configuration
+# -----------------------------------------------------------------------------
+# Model Configuration Profile
+# MORPHIC_MODELS_PROFILE=default # Options: default, cloud, or custom profile
+
+# Feedback Notifications (Slack)
+# SLACK_WEBHOOK_URL=[YOUR_SLACK_WEBHOOK_URL]