Automated Action bad5cc0eba Build complete SaaS invoicing application with FastAPI
Features:
- JWT authentication with user registration and login
- Customer management with full CRUD operations
- Invoice management with automatic calculations
- Multi-tenant data isolation by user
- SQLite database with Alembic migrations
- RESTful API with comprehensive documentation
- Tax calculations and invoice status tracking
- Code formatted with Ruff linting
2025-06-20 09:52:34 +00:00

23 lines
555 B
Python

import os
from pathlib import Path
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
SECRET_KEY: str = os.getenv("SECRET_KEY", "your-secret-key-change-in-production")
ALGORITHM: str = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
DB_DIR: Path = Path("/app/storage/db")
def __init__(self):
super().__init__()
self.DB_DIR.mkdir(parents=True, exist_ok=True)
@property
def SQLALCHEMY_DATABASE_URL(self) -> str:
return f"sqlite:///{self.DB_DIR}/db.sqlite"
settings = Settings()