File size: 3,244 Bytes
170b9b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1fa857f
 
 
170b9b6
1fa857f
 
170b9b6
1fa857f
 
 
170b9b6
 
1fa857f
 
 
 
 
 
 
 
 
 
 
 
170b9b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7aa8d9d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ad76a88
 
 
 
 
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
# --- Database ---
DATABASE_URL=postgres://courtmitra:courtmitra@localhost:5432/courtmitra
DIRECT_DATABASE_URL=postgres://courtmitra:courtmitra@localhost:5432/courtmitra

# --- Object storage (R2 / Supabase Storage, S3 API) ---
OBJECT_STORAGE_ENDPOINT=
OBJECT_STORAGE_BUCKET=
OBJECT_STORAGE_ACCESS_KEY=
OBJECT_STORAGE_SECRET_KEY=

# --- App URLs ---
APP_BASE_URL=http://localhost:3000
API_BASE_URL=http://localhost:3001
WEBHOOK_BASE_URL=http://localhost:3001

# --- AI provider ---
# Set AI_PROVIDER to switch between providers:
#   openrouter (default) — uses @openrouter/ai-sdk-provider with response-healing plugin
#   opencode | openai-compatible — uses @ai-sdk/openai-compatible pointed at OPENCODE_BASE_URL
AI_PROVIDER=openrouter

# --- OpenRouter (AI_PROVIDER=openrouter) ---
OPENROUTER_API_KEY=
# Example model IDs for openrouter:
# AI_MODEL=google/gemini-2.0-flash-exp:free
# AI_VISION_MODEL=google/gemini-2.0-flash-exp:free
AI_MODEL=google/gemini-2.0-flash-exp:free
AI_VISION_MODEL=google/gemini-2.0-flash-exp:free

# --- OpenCode Go (AI_PROVIDER=opencode) ---
# OpenAI-compatible gateway at https://opencode.ai/zen/go/v1
# All listed models support tool-calling; generateObject uses tool-calling mode.
# Text intake model (no vision): deepseek-v4-flash
# Vision/evidence models (text+image): qwen3.6-plus, mimo-v2.5, kimi-k2.6
OPENCODE_API_KEY=
OPENCODE_BASE_URL=https://opencode.ai/zen/go/v1
# Example model overrides for opencode provider:
# AI_MODEL=deepseek-v4-flash
# AI_VISION_MODEL=qwen3.6-plus

# Legacy key kept for compatibility
AI_PROVIDER_API_KEY=

# --- Local storage (dev only) ---
# LOCAL_STORAGE_DIR: May be relative (resolved to monorepo root) or absolute.
# All apps (api, worker, web) must share the same location.
# Default: ".storage" (resolved to repo root).
LOCAL_STORAGE_DIR=.storage

# --- WhatsApp Cloud API ---
WHATSAPP_VERIFY_TOKEN=
WHATSAPP_APP_SECRET=
WHATSAPP_ACCESS_TOKEN=
WHATSAPP_PHONE_NUMBER_ID=
WHATSAPP_BUSINESS_ACCOUNT_ID=

# --- Telegram ---
TELEGRAM_BOT_TOKEN=

# --- Resend ---
RESEND_API_KEY=
RESEND_FROM=
RESEND_REPLY_DOMAIN=

# --- Google OAuth ---
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# --- Inngest ---
INNGEST_EVENT_KEY=
INNGEST_SIGNING_KEY=
INNGEST_BASE_URL=http://localhost:8288
INNGEST_DEV=1

# --- Secrets / hashing ---
TOKEN_ENCRYPTION_KEY=
PII_HASH_SALT=dev-salt-change-me
JWT_SECRET=dev-jwt-secret-change-me

# --- Observability ---
LANGFUSE_PUBLIC_KEY=
LANGFUSE_SECRET_KEY=

# --- Qdrant vector search ---
# Qdrant Cloud: https://cloud.qdrant.io (free tier: 1GB storage)
# Local: QDRANT_URL=http://localhost:6333, no API key
QDRANT_URL=https://your-cluster-url.qdrant.io:6333
QDRANT_API_KEY=
QDRANT_COLLECTION=courtmitra_legal

# --- OpenAI (Whisper ASR + optional) ---
OPENAI_API_KEY=

# --- Browserbase (cloud browser for portal automation) ---
# Free tier: 5 hours/month browser time
# Sign up: https://www.browserbase.com
BROWSERBASE_API_KEY=
BROWSERBASE_PROJECT_ID=

# --- Surepass (eCourts CNR lookup) ---
# Paid third-party API for Indian court case data
SUREPASS_API_KEY=

# --- Portal automation (optional) ---
# Set to "1" to enable Playwright-based portal automation
# Without this, portal assist degrades to manual packet submission
ENABLE_PORTAL_AUTOMATION=