initial commit

This commit is contained in:
2026-02-12 18:45:10 +01:00
commit be7bbba456
42 changed files with 3767 additions and 0 deletions

45
backend/app/config.py Normal file
View File

@@ -0,0 +1,45 @@
"""FluentGerman.ai — Application configuration."""
from functools import lru_cache
from typing import Literal
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
"""App settings loaded from environment / .env file."""
# App
app_name: str = "FluentGerman.ai"
debug: bool = False
# Security
secret_key: str = "CHANGE-ME-in-production"
access_token_expire_minutes: int = 60 * 24 # 24h
algorithm: str = "HS256"
# Database
database_url: str = "postgresql+asyncpg://fluentgerman:fluentgerman@localhost:5432/fluentgerman"
# LLM
llm_provider: str = "openai" # used by litellm routing
llm_api_key: str = ""
llm_model: str = "gpt-4o-mini"
# Voice feature flag: "api" = LLM provider Whisper/TTS, "browser" = Web Speech API
voice_mode: Literal["api", "browser"] = "api"
tts_model: str = "tts-1"
tts_voice: str = "alloy"
stt_model: str = "whisper-1"
# Admin bootstrap
admin_email: str = "admin@fluentgerman.ai"
admin_username: str = "admin"
admin_password: str = "CHANGE-ME"
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
@lru_cache
def get_settings() -> Settings:
return Settings()