대시보드 기능 추가

This commit is contained in:
skkim committed 2026-02-24 15:23:11 +09:00
1 parent 1398546dac
commit b0cebb97ef
22 files changed
+2700 -1

No files matched your search

+30
View File
@@ -12,6 +12,7 @@ from app.database.session import engine
from app.user.models import User, RefreshToken # noqa: F401
from app.archive.api.routers.v1.archive import router as archive_router
from app.dashboard.api.routers.v1.dashboard import router as dashboard_router
from app.home.api.routers.v1.home import router as home_router
from app.user.api.routers.v1.auth import router as auth_router, test_router as auth_test_router
from app.user.api.routers.v1.social_account import router as social_account_router
@@ -219,6 +220,34 @@ tags_metadata = [
- `processing`: 플랫폼에서 처리 중
- `completed`: 업로드 완료
- `failed`: 업로드 실패
""",
},
{
"name": "Dashboard",
"description": """YouTube Analytics 대시보드 API
## 주요 기능
- `GET /dashboard/stats` - YouTube 영상 성과 통계 조회
## 제공 데이터
- **KPI 지표**: 총 조회수, 참여율, 시청 시간, 평균 시청 시간
- **월별 추이**: 최근 12개월 vs 이전 12개월 비교
- **인기 영상**: 조회수 TOP 10
- **시청자 분석**: 연령/성별/지역 분포
- **플랫폼 메트릭**: 구독자 증감
## 성능 최적화
- 6개 YouTube Analytics API 병렬 호출
- Redis 캐싱 (TTL: 1시간)
- 최근 30개 업로드 영상 기준 분석
## 사전 조건
- YouTube 계정이 연동되어 있어야 합니다
- 최소 1개 이상의 영상이 업로드되어 있어야 합니다
""",
},
{
@@ -361,6 +390,7 @@ app.include_router(archive_router) # Archive API 라우터 추가
app.include_router(social_oauth_router, prefix="/social") # Social OAuth 라우터 추가
app.include_router(social_upload_router, prefix="/social") # Social Upload 라우터 추가
app.include_router(sns_router) # SNS API 라우터 추가
app.include_router(dashboard_router) # Dashboard API 라우터 추가
# DEBUG 모드에서만 테스트 라우터 등록
if prj_settings.DEBUG: