File size: 2,664 Bytes
6ca8e48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# DocForge Backend Environment Variables
# Copy this to .env and fill in your values

# ── Auth ──────────────────────────────────────────────────────────────────────
# Secret key for signing JWTs β€” change this in production!
SECRET_KEY=change_me_to_a_long_random_string_in_production

# Fernet key for encrypting stored API keys (32-byte URL-safe base64)
# Generate with: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
# If omitted, derived from SECRET_KEY (fine for dev, use a real key in prod)
ENCRYPTION_KEY=

# URL of your frontend (used in device-flow verification_uri + OAuth redirects)
FRONTEND_URL=http://localhost:3000

# URL of this backend (used to build OAuth callback URIs)
BACKEND_URL=http://localhost:8000

# ── OAuth (Google + GitHub sign-in) ──────────────────────────────────────────
# Google: https://console.cloud.google.com/apis/credentials
# Authorised redirect URI to add: BACKEND_URL/api/auth/oauth/google/callback
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# GitHub: https://github.com/settings/developers β†’ OAuth Apps
# Callback URL to set: BACKEND_URL/api/auth/oauth/github/callback
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

# ── Fallback AI keys (used when user has no keys stored) ─────────────────────
# Optional: lets unauthenticated / keyless users still get a result.
# Leave blank to require every user to supply their own key.
GEMINI_API_KEY=
GROQ_API_KEY=

# ── Storage ───────────────────────────────────────────────────────────────────
# Redis URL (optional β€” uses in-memory cache if not set)
REDIS_URL=redis://localhost:6379

# Supabase (recommended for production β€” stores users, API keys, cache, device codes)
# Required tables: users, user_api_keys, device_codes, cache_entries, corrections
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key

# ── Misc ──────────────────────────────────────────────────────────────────────
# Playwright timeout in milliseconds
PLAYWRIGHT_TIMEOUT=60000

# Set to true to use in-memory fallbacks (no Redis/Supabase required)
# Perfect for local development
DEV_MODE=true