- Full directory structure with all __init__.py stubs - requirements.txt with all pinned dependencies - app/config/settings.py (BaseSettings, env-based) - app/main.py (CORS, lifespan, /api/v1/health) - Dockerfile (multi-stage, Python 3.12-slim, non-root user) - docker-compose.yml (app + postgres:16 with healthcheck) - .env.example - BACKEND_PLAN.md: mark step 1 done, add one-step-at-a-time rule Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
824 B
Python
32 lines
824 B
Python
from typing import Literal
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/adiuva"
|
|
JWT_SECRET: str = "change-me-in-production"
|
|
JWT_ALGORITHM: str = "HS256"
|
|
JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
|
JWT_REFRESH_TOKEN_EXPIRE_DAYS: int = 30
|
|
|
|
STRIPE_SECRET_KEY: str = ""
|
|
STRIPE_WEBHOOK_SECRET: str = ""
|
|
|
|
S3_BUCKET: str = ""
|
|
S3_REGION: str = "us-east-1"
|
|
AWS_ACCESS_KEY_ID: str = ""
|
|
AWS_SECRET_ACCESS_KEY: str = ""
|
|
|
|
OPENAI_API_KEY: str = ""
|
|
|
|
CORS_ORIGINS: list[str] = ["app://.", "http://localhost:3000", "http://localhost:5173"]
|
|
|
|
ENV: Literal["dev", "prod"] = "dev"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
|
|
|
|
settings = Settings()
|