/ backend / config.py
config.py
 1  """Configuration for ACDC Forge backend."""
 2  
 3  from pydantic_settings import BaseSettings
 4  from functools import lru_cache
 5  
 6  
 7  class Settings(BaseSettings):
 8      """Application settings."""
 9  
10      # App
11      app_name: str = "ACDC Forge"
12      debug: bool = False
13  
14      # Radicle
15      radicle_home: str = "~/.radicle"
16      rad_path: str = "rad"
17  
18      # Database (cache only)
19      database_url: str = "sqlite+aiosqlite:///./cache.db"
20  
21      # JWT
22      jwt_secret: str = "dev-secret-change-in-production"
23      jwt_algorithm: str = "HS256"
24      jwt_expire_minutes: int = 60
25  
26      # Chain endpoints
27      alpha_rpc_url: str = "http://localhost:3030"
28      delta_rpc_url: str = "http://localhost:3031"
29  
30      class Config:
31          env_file = ".env"
32          env_file_encoding = "utf-8"
33  
34  
35  @lru_cache
36  def get_settings() -> Settings:
37      """Get cached settings instance."""
38      return Settings()