File size: 2,111 Bytes
054d73a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# ExamInsight Environment Variables
# Copy to .env for local development
# For HF Spaces, add these as Secrets in the Space settings

# =============================================================================
# REQUIRED
# =============================================================================

# OpenAI API Key (required for ChatKit)
OPENAI_API_KEY=sk-your-openai-api-key

# =============================================================================
# GOOGLE OAUTH (optional - for private Google Sheets)
# =============================================================================

# Get these from Google Cloud Console > APIs & Services > Credentials
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-your-client-secret

# Redirect URI - update for production
# Local: http://localhost:8000/auth/callback
# HF Spaces: https://taboola-cz-examinsight.hf.space/auth/callback
GOOGLE_REDIRECT_URI=http://localhost:8000/auth/callback

# =============================================================================
# EMAIL (optional - for sending reports)
# =============================================================================

# Option 1: Gmail SMTP (easier setup)
GMAIL_USER=your-email@gmail.com
GMAIL_APP_PASSWORD=your-16-char-app-password

# Option 2: SendGrid API
SENDGRID_API_KEY=SG.your-sendgrid-api-key
SENDGRID_FROM_EMAIL=examinsight@yourdomain.com

# =============================================================================
# SECURITY
# =============================================================================

# Generate with: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
ENCRYPTION_KEY=your-fernet-encryption-key

# =============================================================================
# FRONTEND (for HF Spaces domain key)
# =============================================================================

# Register your HF Space domain at:
# https://platform.openai.com/settings/organization/security/domain-allowlist
VITE_CHATKIT_API_DOMAIN_KEY=domain_pk_your-production-key