import os from dotenv import load_dotenv # Load the .env file from the project root load_dotenv() LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO") # --- ๐Ÿ“‚ DIRECTORY CONFIGURATION --- BASE_DIR = os.path.dirname(os.path.abspath(__file__)) TEMP_DIR = os.path.join(BASE_DIR, "temp_reports") # Ensure storage exists for PDF and Audio processing on startup os.makedirs(TEMP_DIR, exist_ok=True) # --- ๐ŸŒ REGIONAL & APP CONFIGURATION --- # The request 'locale' takes priority, but this is the safety fallback DEFAULT_REGION = os.getenv("DEFAULT_REGION", "IN_NEP") APP_NAME = os.getenv("APP_NAME", "LearningView Pro") # --- ๐Ÿ“ง SMTP CREDENTIALS (RAILWAY OPTIMIZED) --- SMTP_SERVER = os.getenv("SMTP_SERVER", "smtp.gmail.com") SMTP_PORT = int(os.getenv("SMTP_PORT", 465)) # Port 465 for SMTP_SSL SMTP_USER = os.getenv("SENDER_EMAIL", "arrowinthedust@gmail.com") SMTP_PASSWORD = os.getenv("SENDER_PASSWORD") # --- ๐Ÿ›ก๏ธ SECURITY & CORS --- CORS_ORIGINS = [ "http://localhost:5173", "http://127.0.0.1:5173", "https://learningview.vercel.app", "https://learningview-pro.vercel.app" ] # --- ๐Ÿ“– ASSESSMENT PROMPTS (The Clinical Source of Truth) --- # Any changes here will reflect across the UI and PDF transcription audit ASSESSMENT_PROMPTS = { "beginner": ( "The sun was very bright today. A small cat sat on the green grass. " "It watched a blue bird fly high in the sky. Soon, it was time for lunch." ), "intermediate": ( "During the summer holidays, we decided to explore the ancient forest " "behind our grandmother's house. The trees were tall and the air was cool." ), "advanced": ( "The intricate relationship between neurological development and linguistic " "acquisition remains a primary focus of modern cognitive science." ) } # config.py update WRITING_PROMPTS = { "beginner": "The quick brown fox jumps over the lazy dog.", # Covers all alphabet letters "intermediate": "A bright blue bird sang a song in the tall green tree.", } # --- ๐Ÿงช SCANNER & CLINICAL THRESHOLDS --- DATA_PURGE_DELAY = 180 # 3-minute Zero-Persistence window MIN_FPS_THRESHOLD = 28.0 # Minimum frame rate for reliable ocular sync # Biometric Distance (in MediaPipe normalized units) CLINICAL_DISTANCE_MIN = 0.075 # Too far CLINICAL_DISTANCE_MAX = 0.13 # Too close # Speech & Phonetic Timing WHISPER_MODEL_SIZE = "base" PHONETIC_GAP_THRESHOLD = 1.5 # Seconds of silence to trigger a "block" STATIONARY_FRAME_THRESHOLD = 25 # Frames of eye-fixation to count a block