"""실적(쇼핑몰 통합 매출) 모듈. 네 영역을 분리해 둔다(쇼핑몰 하나를 추가할 때 어댑터 파일 하나만 늘어나게). ① 쇼핑몰 API 수집 adapters/ (쇼핑몰별 어댑터) + sync.py (공통 동기화 서비스) ② 인증정보·보안 security/ (AES-256-GCM, 비밀값 가리기) + credentials.py ③ 매출 계산/저장 calc.py (기간·수수료·집계) + db.py (performance_db) ④ 대시보드/UI dashboard.py (화면 데이터 조립) + router.py + templates/performance/ 데이터 저장은 performance_db 전용이다. PERFORMANCE_DB_URL 미설정 시 build_performance_store 는 None 을 반환하고 라우터가 "설정 필요" 안내를 보여 준다(앱은 죽지 않음). """ from typing import Any from .router import router __all__ = ["router", "build_performance_store"] def build_performance_store(*, dsn: str | None) -> Any: if not dsn: return None from .db import PerformanceDBStore # 지연 import (개발 환경 deps 없을 수 있음) return PerformanceDBStore(dsn)