34d30e3134
Media model + migration; an ObjectStore interface with an S3/MinIO (boto3) implementation behind the service layer. Upload (multipart) stores bytes in object storage + a metadata row (checksum, size, content-type, optional attach to person/event/source); list returns presigned URLs; delete is soft. Editor-gated, privacy-filtered, audited. 24 tests pass (object store faked). Introduces the worker container (same image, 'python -m app.worker'): its first job is the scheduled 30-day soft-delete purge across tables + media object cleanup. Compose gains worker + S3 env on backend/worker; dev override builds the worker too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Justin Paul <justin@jpaul.me>
27 lines
643 B
Python
27 lines
643 B
Python
"""Versioned API surface. Mounts under /api/v1."""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from app.api.v1 import (
|
|
auth,
|
|
citations,
|
|
events,
|
|
media,
|
|
persons,
|
|
relationships,
|
|
sources,
|
|
trees,
|
|
users,
|
|
)
|
|
|
|
api_router = APIRouter(prefix="/api/v1")
|
|
api_router.include_router(auth.router)
|
|
api_router.include_router(users.router)
|
|
api_router.include_router(trees.router)
|
|
api_router.include_router(persons.router)
|
|
api_router.include_router(events.router)
|
|
api_router.include_router(relationships.router)
|
|
api_router.include_router(sources.router)
|
|
api_router.include_router(citations.router)
|
|
api_router.include_router(media.router)
|