# GigLez Environment Configuration
# Copy this file to .env and update values for your environment

# =============================================================================
# DATABASE CONFIGURATION
# =============================================================================

GIGLEZ_DB_HOST=localhost
GIGLEZ_DB_PORT=5432
GIGLEZ_DB_NAME=giglez
GIGLEZ_DB_USER=giglez_user
GIGLEZ_DB_PASSWORD=giglez_secure_password_2026

# Connection Pool Settings (Wigle pattern: moderate pooling)
GIGLEZ_DB_POOL_SIZE=10
GIGLEZ_DB_MAX_OVERFLOW=20

# Debug mode (set to "true" to echo SQL queries)
GIGLEZ_DB_ECHO=false

# =============================================================================
# API CONFIGURATION
# =============================================================================

# API Server
GIGLEZ_API_HOST=0.0.0.0
GIGLEZ_API_PORT=8000
GIGLEZ_API_WORKERS=4

# CORS (comma-separated origins)
GIGLEZ_API_CORS_ORIGINS=http://localhost:3000,http://localhost:8080

# JWT Authentication
GIGLEZ_JWT_SECRET_KEY=your-secret-key-change-this-in-production
GIGLEZ_JWT_ALGORITHM=HS256
GIGLEZ_JWT_EXPIRE_MINUTES=1440

# =============================================================================
# FILE STORAGE
# =============================================================================

# Local file storage path
GIGLEZ_STORAGE_PATH=/home/dell/coding/giglez/storage

# Maximum upload file size (bytes)
GIGLEZ_MAX_UPLOAD_SIZE=10485760  # 10 MB

# Maximum files per batch upload
GIGLEZ_MAX_BATCH_FILES=100

# =============================================================================
# PERFORMANCE TUNING
# =============================================================================

# Transaction batch size (Wigle pattern: 512 operations per commit)
GIGLEZ_BATCH_SIZE=512

# LRU cache size for device lookups (Wigle pattern: 256 entries)
GIGLEZ_CACHE_SIZE=256

# Redis cache (optional, leave empty to disable)
GIGLEZ_REDIS_URL=

# =============================================================================
# LOGGING
# =============================================================================

# Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
GIGLEZ_LOG_LEVEL=INFO

# Log file path
GIGLEZ_LOG_FILE=/home/dell/coding/giglez/logs/giglez.log

# =============================================================================
# GPS VALIDATION
# =============================================================================

# Maximum GPS accuracy threshold (meters) - Wigle pattern
GIGLEZ_GPS_MAX_ACCURACY=50

# Minimum GPS accuracy for high-quality captures
GIGLEZ_GPS_MIN_ACCURACY=10

# =============================================================================
# SIGNATURE DATABASES
# =============================================================================

# Flipper Zero repository path (for imports)
GIGLEZ_FLIPPER_REPO_PATH=/tmp/flipperzero-firmware

# RTL_433 repository path (for imports)
GIGLEZ_RTL433_REPO_PATH=/tmp/rtl_433

# Auto-update signature databases (cron-style)
GIGLEZ_SIGNATURE_AUTO_UPDATE=false
