- Cookie-based auth via backend proxy (httpOnly JWTs) - Supabase Postgres persistence for sessions/messages/profiles + RLS - Fix cross-user session leak (token cache keyed by full token, not 50-char prefix) - Fix missing table grants (42501) via migration; auto-provision profiles on user creation - Chat validation, ownership checks, rate limiting, /api/chat/sessions route ordering - Frontend auth-state reset + credentials include - OpenRouter AI provider (OpenAI-compatible base URL, reasoning disabled) - Tests: chatValidation, appState
20 lines
515 B
Bash
20 lines
515 B
Bash
# AI Provider: "openai" | "anthropic" | "google"
|
|
AI_PROVIDER=openai
|
|
|
|
# OpenAI (OpenAI-compatible; set OPENAI_BASE_URL to use OpenRouter or another provider)
|
|
OPENAI_API_KEY=sk-your-key-here
|
|
OPENAI_BASE_URL=https://openrouter.ai/api/v1
|
|
OPENAI_MODEL=qwen/qwen3.7-flash
|
|
|
|
# Anthropic (optional)
|
|
ANTHROPIC_API_KEY=sk-ant-your-key-here
|
|
ANTHROPIC_MODEL=claude-sonnet-4-20250514
|
|
|
|
# Google (optional)
|
|
GOOGLE_API_KEY=your-google-api-key-here
|
|
GOOGLE_MODEL=gemini-2.0-flash
|
|
|
|
# Server
|
|
PORT=3001
|
|
CORS_ORIGIN=http://localhost:5173
|