-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
163 lines (126 loc) · 4 KB
/
Copy path.env.example
File metadata and controls
163 lines (126 loc) · 4 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# AI Study Architect Environment Variables Template
# Copy this file to .env and fill in your values
# NEVER commit the actual .env file!
# ===== Backend Configuration =====
# API Settings
API_VERSION=v1
DEBUG=False
SECRET_KEY=your-secret-key-here-change-in-production
ALLOWED_HOSTS=localhost,127.0.0.1
# Database Configuration
DATABASE_URL=postgresql://user:password@localhost:5433/ai_study_architect
# Alternative format:
# POSTGRES_USER=your_db_user
# POSTGRES_PASSWORD=your_db_password
# POSTGRES_DB=ai_study_architect
# POSTGRES_HOST=localhost
# POSTGRES_PORT=5433
# Redis Configuration
REDIS_URL=redis://localhost:6379/1
# Alternative format:
# REDIS_HOST=localhost
# REDIS_PORT=6379
# REDIS_DB=1
# Celery Configuration
CELERY_BROKER_URL=redis://localhost:6379/2
CELERY_RESULT_BACKEND=redis://localhost:6379/3
# ===== AI/ML Configuration =====
# Cloud AI Services (Claude primary, OpenAI fallback)
# ANTHROPIC_API_KEY= # Get from console.anthropic.com
# OPENAI_API_KEY= # Get from platform.openai.com
# Vector Database (Qdrant)
QDRANT_HOST=localhost
QDRANT_PORT=6333
QDRANT_COLLECTION_NAME=study_materials
QDRANT_API_KEY= # Optional, for Qdrant Cloud
# LangChain/LangGraph
LANGCHAIN_TRACING_V2=false # Set to true for debugging
LANGCHAIN_API_KEY= # Optional, for LangSmith tracing
LANGCHAIN_PROJECT=ai-study-architect
# ===== Authentication & Security =====
# JWT Settings
JWT_SECRET_KEY=your-jwt-secret-key-here-change-in-production
JWT_ALGORITHM=RS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7
# CORS Settings
CORS_ORIGINS=http://localhost:3000,http://localhost:5173
# Session Security
SESSION_SECRET_KEY=your-session-secret-key-here-change-in-production
SESSION_COOKIE_SECURE=False # Set to True in production with HTTPS
SESSION_COOKIE_HTTPONLY=True
SESSION_COOKIE_SAMESITE=lax
# ===== Frontend Configuration =====
# API Endpoints
VITE_API_URL=http://localhost:8000
VITE_WS_URL=ws://localhost:8000
# Feature Flags
VITE_ENABLE_COLLABORATION=true
VITE_ENABLE_OFFLINE_MODE=false
VITE_ENABLE_ANALYTICS=false
# ===== External Services (Optional) =====
# AWS S3 (for cloud storage)
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=us-east-1
S3_BUCKET_NAME=
# Google Cloud (alternative storage)
GOOGLE_APPLICATION_CREDENTIALS=
GCS_BUCKET_NAME=
# Email Service (for notifications)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
EMAIL_USE_TLS=True
DEFAULT_FROM_EMAIL=noreply@aistudyarchitect.com
# Monitoring (Optional)
SENTRY_DSN=
PROMETHEUS_ENABLED=false
OPENTELEMETRY_ENABLED=false
# ===== Development Tools =====
# Logging
LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_FORMAT=json # json or text
# Testing
TEST_DATABASE_URL=postgresql://user:password@localhost:5433/ai_study_architect_test
TEST_REDIS_URL=redis://localhost:6379/15
# Documentation
DOCS_ENABLED=True # Enable FastAPI automatic docs
REDOC_ENABLED=True # Enable ReDoc UI
# ===== Rate Limiting =====
# API Rate Limits (requests per minute)
RATE_LIMIT_DEFAULT=60
RATE_LIMIT_UPLOAD=10
RATE_LIMIT_AI_GENERATION=20
# ===== File Upload Settings =====
# Maximum file sizes (in bytes)
MAX_UPLOAD_SIZE=52428800 # 50MB
ALLOWED_UPLOAD_EXTENSIONS=pdf,docx,pptx,txt,md,jpg,jpeg,png,mp3,mp4,wav
# Upload directories (relative to project root)
UPLOAD_DIR=uploads
TEMP_DIR=temp
# ===== Privacy Settings =====
# Data Retention (days)
USER_DATA_RETENTION_DAYS=365
ANALYTICS_RETENTION_DAYS=90
LOG_RETENTION_DAYS=30
# Anonymization
ENABLE_TELEMETRY=false
ANONYMIZE_USER_DATA=true
# ===== Performance Tuning =====
# Worker Configuration
WEB_CONCURRENCY=4
WORKER_CONNECTIONS=1000
WORKER_TIMEOUT=120
# Cache Settings
CACHE_TTL_SECONDS=3600
ENABLE_QUERY_CACHE=true
ENABLE_RESPONSE_CACHE=true
# ===== Notes =====
#
# 1. Generate secure keys using: python -c "import secrets; print(secrets.token_urlsafe(32))"
# 2. In production, use environment-specific .env files or a secrets manager
# 3. Never commit actual credentials to version control
# 4. Regularly rotate all keys and passwords
# 5. Use strong, unique passwords for all services