- FastAPI app with lifespan, CORS, health endpoint - SQLAlchemy 2.0 async with aiosqlite, Base/UUIDMixin/TenantMixin/TimestampMixin - Tenant and User models with multi-tenant isolation - Auth: register (creates tenant+user), login, /me endpoint - JWT HS256 tokens, bcrypt password hashing - Alembic async setup with initial migration - 6 passing tests (register, login, wrong password, me, no token, health) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
423 B
Python
16 lines
423 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env")
|
|
|
|
SECRET_KEY: str = "dev-secret-change-me"
|
|
DATABASE_URL: str = "sqlite+aiosqlite:///./data/roaauto.db"
|
|
ACCESS_TOKEN_EXPIRE_DAYS: int = 30
|
|
TRIAL_DAYS: int = 30
|
|
SMSAPI_TOKEN: str = ""
|
|
CORS_ORIGINS: str = "http://localhost:5173"
|
|
|
|
|
|
settings = Settings()
|