feat: create backend project structure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-24 14:49:13 +08:00
parent eb47af57c4
commit f7a61bc7c6
22 changed files with 105 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
# Database
DATABASE_URL: str = "postgresql://user:pass@localhost:5432/imagecreator"
# JWT
SECRET_KEY: str = "your-secret-key-change-in-production"
ALGORITHM: str = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
# CORS
CORS_ORIGINS: list[str] = ["http://localhost:3000"]
# LLM API Keys
GEMINI_API_KEY: str = ""
OPENAI_API_KEY: str = ""
# Image storage
IMAGE_STORAGE_PATH: str = "/app/uploads"
class Config:
env_file = ".env"
@lru_cache()
def get_settings():
return Settings()
settings = get_settings()