Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
OPENAI_API_KEY=sk-...

# Embedding Model (Optional)
# Options: text-embedding-3-small (faster, cheaper), text-embedding-3-large (better quality)
# Default: text-embedding-3-large
EMBEDDING_MODEL=text-embedding-3-large
# Options: text-embedding-3-small (default, faster/cheaper), text-embedding-3-large (better quality)
EMBEDDING_MODEL=text-embedding-3-small

# Pinecone API (Required)
# Pinecone API (Required)
# Get from: https://app.pinecone.io/
PINECONE_API_KEY=pcsk_...
PINECONE_INDEX_NAME=codeintel
Expand All @@ -19,13 +18,16 @@ PINECONE_INDEX_NAME=codeintel
# Get from: https://app.supabase.com/project/_/settings/api
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=eyJ...
# From Project Settings -> API -> JWT Secret
SUPABASE_JWT_SECRET=your-jwt-secret
# From Project Settings -> API -> service_role key
SUPABASE_SERVICE_ROLE_KEY=eyJ...

# Backend API
API_KEY=change-this-secret-key-for-production
# Development API Key (Optional -- dev/test only, ignored in production)
# Used to bypass JWT auth when DEBUG=true. Never set in production.
DEV_API_KEY=
DEBUG=false
LOG_LEVEL=INFO
Comment thread
DevanshuNEU marked this conversation as resolved.

# Backend API URL (used by MCP server and frontend)
BACKEND_API_URL=http://backend:8000
FRONTEND_URL=http://localhost:3000

Expand All @@ -37,31 +39,28 @@ GITHUB_REDIRECT_URI=http://localhost:3000/auth/github/callback

# CORS Configuration (Security)
# Comma-separated list of allowed origins
# Development: http://localhost:3000
# Production: https://your-app.vercel.app,https://your-domain.com
ALLOWED_ORIGINS=http://localhost:3000

# Redis (auto-configured in Docker, set REDIS_URL in Railway)
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_URL=

# Sentry Error Tracking (Optional but recommended for production)
# Get DSN from: https://sentry.io -> Settings -> Projects -> Client Keys
SENTRY_DSN=
SENTRY_SEND_PII=false
SENTRY_INCLUDE_LOCAL_VARS=false
ENVIRONMENT=development # development, staging, production
ENVIRONMENT=development

# Discord Webhook (Optional - for feedback notifications)
# Discord Webhook (Optional -- for feedback notifications)
DISCORD_FEEDBACK_WEBHOOK=

# Search V2 Configuration
# Cohere API for reranking (Optional - improves search quality)
# Cohere API for reranking (Optional -- improves search quality)
# Get from: https://dashboard.cohere.com/api-keys
# Free tier: 10K requests/month
COHERE_API_KEY=
SEARCH_V2_ENABLED=true

# Voyage AI - code-specific embeddings (Optional - improves code search quality)
# Voyage AI (Optional -- code-specific embeddings for better search)
# Get from: https://dash.voyageai.com/
VOYAGE_API_KEY=
3 changes: 3 additions & 0 deletions backend/config/startup_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
("SENTRY_SEND_PII", "Send user emails to Sentry", "PII disabled (privacy safe)"),
("SENTRY_INCLUDE_LOCAL_VARS", "Include local vars in Sentry traces", "Local vars excluded"),
("REDIS_HOST", "Redis host for caching", "Using default localhost"),
("GITHUB_CLIENT_ID", "GitHub OAuth client ID", "GitHub repo import disabled"),
("GITHUB_CLIENT_SECRET", "GitHub OAuth client secret", "GitHub repo import disabled"),
("DISCORD_FEEDBACK_WEBHOOK", "Discord webhook for feedback", "Feedback notifications disabled"),
]


Expand Down
4 changes: 1 addition & 3 deletions backend/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

# Set test environment BEFORE imports
os.environ["DEBUG"] = "true"
os.environ["DEV_API_KEY"] = "test-secret-key" # New env var for dev key
os.environ["API_KEY"] = "test-secret-key" # Legacy support
os.environ["DEV_API_KEY"] = "test-secret-key"
os.environ["OPENAI_API_KEY"] = "sk-test-key"
os.environ["PINECONE_API_KEY"] = "pcsk-test"
os.environ["PINECONE_INDEX_NAME"] = "test-index"
os.environ["SUPABASE_URL"] = "https://test.supabase.co"
os.environ["SUPABASE_KEY"] = "test-key"
os.environ["SUPABASE_ANON_KEY"] = "test-anon-key"
os.environ["SUPABASE_JWT_SECRET"] = "test-jwt-secret"

Expand Down
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ services:
- SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY}
- SUPABASE_JWT_SECRET=${SUPABASE_JWT_SECRET}
- SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY}
- API_KEY=${API_KEY}
- DEV_API_KEY=${DEV_API_KEY}
- DEBUG=${DEBUG:-false}
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-text-embedding-3-small}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
- GITHUB_REDIRECT_URI=${GITHUB_REDIRECT_URI}
- BACKEND_API_URL=http://backend:8000
- DISCORD_FEEDBACK_WEBHOOK=${DISCORD_FEEDBACK_WEBHOOK}
- COHERE_API_KEY=${COHERE_API_KEY}
Expand Down Expand Up @@ -96,7 +102,6 @@ services:
# - "8001:8001"
# environment:
# - BACKEND_API_URL=http://backend:8000
# - API_KEY=${API_KEY}
# depends_on:
# - backend
# networks:
Expand Down