This repository was archived by the owner on Aug 14, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
129 lines (112 loc) · 3.92 KB
/
Copy path.env.example
File metadata and controls
129 lines (112 loc) · 3.92 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# --- App ---
# Controls which env file is loaded (see app/core/config.py):
# development -> .env, staging -> .env.staging, production -> .env.production
# Anything else (or unset uses the staging default) falls back to .env.
APP_ENV=dev
PROJECT_NAME=Clinsights
API_V1_PREFIX=/api/v1
CORS_ORIGINS=["http://localhost:3000"]
FRONTEND_URL=http://localhost:3000
# --- Postgres (used by docker-compose) ---
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=clinsights
POSTGRES_PORT=5432
# --- Database (used by the app; must match the Postgres vars above) ---
DATABASE_URL=postgresql+asyncpg://user:password@host/dbname
# --- JWT ---
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(64))"
JWT_SECRET=replace-me-with-a-long-random-string-min-32-chars
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRES_MINUTES=3
JWT_REFRESH_TOKEN_EXPIRES_MINUTES=5
COOKIE_SECURE=False
COOKIE_SAMESITE=lax
# --- OTP ---
OTP_LENGTH=6
OTP_EXPIRES_MINUTES=10
OTP_MAX_ATTEMPTS=5
# Server-side pepper used to hash OTPs at rest. Generate as for JWT_SECRET.
OTP_PEPPER=replace-me-with-a-long-random-string-min-32-chars
# --- Email providers ---
# Brevo (used by app/services/mail_transport.py)
BREVO_API_KEY=your_brevo_api_key
BREVO_FROM_EMAIL=your_sender@example.com
BREVO_FROM_NAME=Clinsights
# Resend (transactional email)
RESEND_API_KEY=your_resend_api_key
RESEND_FROM_EMAIL=onboarding@resend.dev
# SMTP (fallback email provider; only used when Brevo/Resend are unavailable)
SMTP_HOST=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM_EMAIL=
SMTP_FROM_NAME=Clinsights
SMTP_USE_TLS=true
# When true, print emails to stdout instead of sending (for local dev).
ALLOW_STDOUT_EMAIL=true
# --- MailerLite (subscribe endpoint) ---
MAILERLITE_API_KEY=your_mailerlite_api_key
# --- Object storage (Cloudflare R2, used by app/services/private_storage.py) ---
R2_ACCOUNT_ID=your_cloudflare_account_id
R2_ACCESS_KEY_ID=your_r2_access_key
R2_SECRET_ACCESS_KEY=your_r2_secret_key
R2_BUCKET_NAME=your_bucket_name
R2_CUSTOM_DOMAIN=
# Local media directories (used when R2 is not configured)
MEDIA_DIR=media
PRIVATE_MEDIA_DIR=private_media
# --- Celery ---
CELERY_BROKER_URL=redis://localhost:6379/0
# Optional result backend; leave blank to disable
CELERY_RESULT_BACKEND=
# --- AI providers ---
# "auto" picks the first configured provider; or force "openai" / "gemini"
AI_PROVIDER=auto
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o-mini
GEMINI_API_KEY=
GEMINI_MODEL=gemini-3-flash-preview
PIPELINE_TIMEOUT_SECONDS=30
# --- Guest sessions (Postgres guest_sessions table) ---
GUEST_SESSION_TTL_SECONDS=3600 # 1 hour
GUEST_CHAT_MESSAGE_LIMIT=3
GUEST_UPLOAD_LIMIT=1
GUEST_UPLOAD_LOCK_SECONDS=1200
GUEST_SESSION_RETENTION_DAYS=7
GUEST_SESSION_CREATE_RATE_LIMIT=30
GUEST_SESSION_CREATE_RATE_WINDOW_SECONDS=3600
# Set true only when the API sits behind a trusted reverse proxy
TRUST_PROXY_FORWARDED_IP=false
# --- Auth rate limits (Redis) ---
SIGNUP_RATE_LIMIT=5
SIGNUP_RATE_WINDOW_SECONDS=3600
LOGIN_FAILURE_RATE_LIMIT=10
LOGIN_FAILURE_RATE_WINDOW_SECONDS=900
WAITLIST_RATE_LIMIT=5
WAITLIST_RATE_WINDOW_SECONDS=3600
OTP_FAILURE_RATE_LIMIT=5
OTP_FAILURE_RATE_WINDOW_SECONDS=300
FORGOT_PASSWORD_RATE_LIMIT=3
FORGOT_PASSWORD_RATE_WINDOW_SECONDS=600
RESEND_OTP_RATE_LIMIT=3
RESEND_OTP_RATE_WINDOW_SECONDS=300
RESET_PASSWORD_RATE_LIMIT=5
RESET_PASSWORD_RATE_WINDOW_SECONDS=600
EMAIL_UPDATE_REQUEST_RATE_LIMIT=3
EMAIL_UPDATE_REQUEST_RATE_WINDOW_SECONDS=600
EMAIL_UPDATE_VERIFY_RATE_LIMIT=5
EMAIL_UPDATE_VERIFY_RATE_WINDOW_SECONDS=300
# --- Auth sessions ---
AUTH_SESSION_INACTIVITY_DAYS=30
AUTH_SESSION_ABSOLUTE_DAYS=90
OAUTH_STATE_EXPIRES_MINUTES=60
# --- Password reset (frontend URLs) ---
FRONTEND_RESET_PASSWORD_URL=http://localhost:3000/reset-password
FRONTEND_AUTH_CALLBACK_URL=http://localhost:3000/login
PASSWORD_RESET_TOKEN_EXPIRES_MINUTES=60
# --- Google OAuth ---
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI=http://localhost:8000/api/v1/auth/google/callback