Spaces:
Sleeping
Sleeping
| from pydantic_settings import BaseSettings | |
| from typing import List | |
| import os | |
| class Settings(BaseSettings): | |
| # Application | |
| APP_NAME: str = "PrepMind API" | |
| ENVIRONMENT: str = "development" | |
| DEBUG: bool = True | |
| API_VERSION: str = "v1" | |
| # Server | |
| HOST: str = "0.0.0.0" | |
| PORT: int = 8000 | |
| # Database | |
| DATABASE_URL: str | |
| SUPABASE_URL: str | |
| SUPABASE_ANON_KEY: str | |
| SUPABASE_SERVICE_KEY: str | |
| # JWT | |
| SECRET_KEY: str | |
| ALGORITHM: str = "HS256" | |
| ACCESS_TOKEN_EXPIRE_MINUTES: int = 30 | |
| REFRESH_TOKEN_EXPIRE_DAYS: int = 7 | |
| # Google Gemini | |
| GOOGLE_API_KEY: str | |
| # Storage | |
| STORAGE_BUCKET: str = "prepmind-files" | |
| RESUME_BUCKET: str = "resumes" | |
| AUDIO_BUCKET: str = "interview-audio" | |
| # External APIs | |
| LEETCODE_API_URL: str = "https://leetcode.com/graphql" | |
| GITHUB_API_URL: str = "https://api.github.com" | |
| GITHUB_TOKEN: str = "" | |
| # Redis | |
| REDIS_URL: str = "redis://localhost:6379/0" | |
| # CORS | |
| CORS_ORIGINS: List[str] = ["http://localhost:3000", "http://localhost:5173"] | |
| # Rate Limiting | |
| RATE_LIMIT_PER_MINUTE: int = 60 | |
| # Email (Optional - for future use) | |
| SMTP_HOST: str = "smtp.gmail.com" | |
| SMTP_PORT: int = 587 | |
| SMTP_USER: str = "" | |
| SMTP_PASSWORD: str = "" | |
| class Config: | |
| env_file = ".env" | |
| case_sensitive = True | |
| extra = "ignore" # ← This ignores extra fields in .env | |
| settings = Settings() | |