-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
71 lines (60 loc) · 2.52 KB
/
.env.example
File metadata and controls
71 lines (60 loc) · 2.52 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
# ============================================
# Help2Study - Environment Variables
# ============================================
# WHAT ARE ENVIRONMENT VARIABLES?
# These are configuration values stored OUTSIDE your code.
# They keep sensitive data (like API keys) secure and make
# your app portable across different environments.
#
# WHY USE THEM?
# ✓ Security: Never commit secrets to Git
# ✓ Flexibility: Different values for dev/production
# ✓ Portability: Same code works everywhere
#
# HOW TO USE THIS FILE:
# 1. Copy this file: cp .env.example .env
# 2. Fill in your actual values in .env
# 3. Never commit .env to Git (it's in .gitignore)
# ============================================
# --------------------------------------------
# Backend Configuration (Django)
# --------------------------------------------
# Gemini API Key (REQUIRED)
# This powers the AI flashcard generation feature
# Get your free API key: https://makersuite.google.com/app/apikey
API_KEY=your_gemini_api_key_here
# Django Secret Key (REQUIRED for production)
# Used for cryptographic signing (sessions, passwords, etc.)
# Generate one: python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
# SECURITY: Change this before deploying to production!
# SECRET_KEY=your-secret-key-here
# Debug Mode (REQUIRED for production)
# Set to False in production for security
# Default: True (only for development)
# DEBUG=False
# Allowed Hosts (REQUIRED for production)
# Comma-separated list of domains that can access your app
# Example: ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com,localhost
# ALLOWED_HOSTS=localhost,127.0.0.1
# Database URL (OPTIONAL - defaults to SQLite)
# For production, use PostgreSQL
# Format: postgresql://username:password@host:port/database
# DATABASE_URL=postgresql://user:password@localhost:5432/help2study
# --------------------------------------------
# Frontend Configuration (React/Vite)
# --------------------------------------------
# Backend API URL (REQUIRED)
# Where the frontend sends requests
# Development: http://localhost:8000
# Production: https://your-api-domain.com
# IMPORTANT: Do NOT use quotes around the URL
VITE_API_URL=http://localhost:8000
# --------------------------------------------
# Optional: Advanced Configuration
# --------------------------------------------
# CORS Origins (OPTIONAL)
# Which domains can make requests to your API
# CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
# Port Configuration (OPTIONAL)
# BACKEND_PORT=8000
# FRONTEND_PORT=5173