Scaffold backend (FastAPI/uv) and frontend (SvelteKit/bun)

Backend: FastAPI app with health check, AppError hierarchy, stderr
logging via LOG_LEVEL, ruff+pyright(strict) config, pytest passing.

Frontend: SvelteKit (TS) with prettier, eslint, vitest (unit +
component), adapter-node for self-hosted deployment on Zeus.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Tim Otlik 2026-07-17 22:12:44 +02:00
parent 06df9df339
commit e5b4f54cd8
33 changed files with 517 additions and 4 deletions

View file

@ -0,0 +1,25 @@
"""Logging setup for the backend.
Follows the project's output contract: all log output goes to stderr,
level controlled via the LOG_LEVEL env var (default INFO). This is server
logging, not the request/response payload that stays in FastAPI's
responses.
"""
from __future__ import annotations
import logging
import os
import sys
def configure_logging() -> None:
level_name = os.environ.get("LOG_LEVEL", "INFO").upper()
level = getattr(logging, level_name, logging.INFO)
handler = logging.StreamHandler(sys.stderr)
handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)-5s %(name)s: %(message)s"))
root = logging.getLogger()
root.setLevel(level)
root.handlers = [handler]