File size: 1,141 Bytes
a496aae
 
 
 
 
eba9fd4
a496aae
eba9fd4
 
 
a496aae
 
 
eba9fd4
 
 
5f1d522
 
eba9fd4
5f1d522
a496aae
 
 
 
 
 
 
a3dde2f
a496aae
 
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
import os
from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    # Database
    database_url: str = os.getenv("DATABASE_URL")  # βœ… No fallback for production
    
    # Security - NO HARDCODED SECRETS!
    secret_key: str = os.getenv("SECRET_KEY")  # βœ… Must come from environment
    nextjs_secret: str = os.getenv("NEXTJS_SECRET")  # βœ… Must come from environment
    algorithm: str = "HS256"
    access_token_expire_minutes: int = 30
    
    # API Keys - NO HARDCODED KEYS!
    gemini_api_key: str = os.getenv("GEMINI_API_KEY")  # βœ… Must come from environment
    pinecone_api_key: str = os.getenv("PINECONE_API_KEY")  # βœ… Must come from environment
    
    # Pinecone Configuration
    pinecone_index_name: str = os.getenv("PINECONE_INDEX_NAME", "qodex")  # Only this has safe fallback
    pinecone_environment: str = os.getenv("PINECONE_ENVIRONMENT", "gcp-starter")
    
    # App
    environment: str = os.getenv("ENVIRONMENT", "production")
    debug: bool = os.getenv("DEBUG", "false").lower() == "true"
    
    class Config:
        env_file = ".env"
        extra = "ignore"

settings = Settings()