# ============================================================================
# AegisAI Environment Configuration
# Copy this file to .env and fill in your values
# ============================================================================
# ============================================================================
# REQUIRED: Gemini API
# ============================================================================
# Get your free API key from: https://ai.google.dev/
GEMINI_API_KEY=your_gemini_api_key_here
# ============================================================================
# Backend Configuration
# ============================================================================
# API Server
API_HOST=0.0.0.0
API_PORT=8000
# Video Processing
VIDEO_SOURCE=0 # 0 for webcam, or path/URL
FRAME_SAMPLE_RATE=2 # Process every N seconds
VIDEO_RESOLUTION_WIDTH=1280
VIDEO_RESOLUTION_HEIGHT=720
# Storage
EVIDENCE_DIR=./evidence
DB_PATH=./aegis.db
MAX_EVIDENCE_AGE_DAYS=30 # Auto-cleanup after N days
# AI Model Configuration
GEMINI_MODEL=gemini-2.0-flash-exp
TEMPERATURE=0.4
MAX_OUTPUT_TOKENS=300
# Analysis Thresholds
CONFIDENCE_THRESHOLD=70 # Minimum confidence for incidents
HIGH_SEVERITY_THRESHOLD=85 # Threshold for high alerts
# Action Execution
ENABLE_EMAIL_ALERTS=false
ENABLE_SMS_ALERTS=false
ENABLE_IOT_ACTIONS=false
# CORS Configuration
CORS_ORIGINS=["http://localhost:3000","http://localhost:5173"]
# Logging
LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR
LOG_FILE=./logs/aegisai.log # Optional log file
# Performance
MAX_CONCURRENT_ANALYSES=3
WEBSOCKET_HEARTBEAT_INTERVAL=30
# ============================================================================
# Email Alerts (Optional)
# ============================================================================
# Gmail SMTP Example - Use App Password, not regular password
# Guide: https://support.google.com/accounts/answer/185833
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your.email@gmail.com
SMTP_PASSWORD=your_app_password_here
ALERT_EMAIL=security@yourcompany.com
# ============================================================================
# SMS Alerts (Optional)
# ============================================================================
# Twilio Configuration
# Sign up: https://www.twilio.com/try-twilio
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE=+1234567890
ALERT_PHONE=+0987654321
# ============================================================================
# Frontend Configuration (for .env.local in frontend/)
# ============================================================================
# Gemini API (client-side)
VITE_GEMINI_API_KEY=your_gemini_api_key_here
# Backend API URL
VITE_API_URL=http://localhost:8000
# Analysis Settings
VITE_ANALYSIS_INTERVAL=4000 # 4 seconds
# ============================================================================
# Production Deployment (Optional)
# ============================================================================
# Render.com
# Add these as environment variables in Render dashboard
# Vercel
# Add VITE_* variables in Vercel project settings
# ============================================================================
# Development/Testing
# ============================================================================
# Enable debug mode
DEBUG=false
# Test mode (disable actual actions)
TEST_MODE=false