"""Export Bank Statement — extractor service. A thin, stateless FastAPI wrapper over the proven extraction engine: PDF in -> reconciled statement data out. No storage, no auth (the web app's API layer owns quota/auth/billing); this service only extracts. """ from __future__ import annotations from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api.convert import router as convert_router from app.core.config import ALLOWED_ORIGINS app = FastAPI(title="Export Bank Statement — Extractor", version="0.1.0") app.add_middleware( CORSMiddleware, allow_origins=ALLOWED_ORIGINS, allow_methods=["GET", "POST", "OPTIONS"], allow_headers=["*"], ) app.include_router(convert_router) @app.get("/health") def health() -> dict: return {"ok": True, "service": "extractor", "version": "0.1.0"}