Files
FabledCurator/backend/app/__init__.py
T
bvandeusen fd8cf83003 feat(fc2a): add /api/gallery endpoints (scroll, timeline, jump, image detail)
Thin Quart blueprint that delegates to GalleryService. Cursor-based scroll
returns images + a date_groups summary so the SPA can render year-month
headers without re-grouping client-side. Timeline returns year-month
buckets for the sidebar jump nav. Jump returns a cursor positioned at a
specific year-month so the gallery can scroll to historical periods.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 12:09:44 -04:00

25 lines
515 B
Python

"""Quart app factory."""
import logging
from quart import Quart
from .api import all_blueprints
from .config import get_config
from .frontend import frontend_bp
def create_app() -> Quart:
cfg = get_config()
logging.basicConfig(level=cfg.log_level)
app = Quart(__name__)
app.secret_key = cfg.secret_key
for bp in all_blueprints():
app.register_blueprint(bp)
# Registered last so /api/* routes win over the SPA catch-all.
app.register_blueprint(frontend_bp)
return app