feat: 다른 사이트에 붙이는 날씨각 위젯 — 누구나 붙이는 카드(/embed/card, 기본형·상세형, 배경 3종)와 사용 방법 페이지(/widget, 스크립트·iframe 코드)

- 카드: 군산각 카드를 옮겨 그림, 토끼 로딩, 실패하면 '날씨각에서 날씨 보기' 링크, 8초 제한, nginx 대체 화면, '자세히 보기' 버튼만 링크
- 크기: 폭은 자리에 맞춰 자동, 높이는 폭에 따라 비율대로(기본형 245~320px, 상세형 400~520px)
- 부하: 지역별 카드 데이터 5분 저장, 저장분이 비면 지역마다 한 요청만 새로 만듦, 노출 수는 Redis 에 쌓았다가 관리자 조회 때 DB(widget_view_daily)로 옮김
- 사용 방법 페이지: 지역(앱 지역은 바꾸지 않음)·모양·배경 고르기, 미리보기, 코드 복사. 들어오는 길은 문의 창 버튼(토스에서는 숨김)과 검색
- GA: 위젯_안내_보기, 위젯_옵션_고름, 위젯_코드_복사
- 문서: docs/위젯_운영.md, 백엔드 테스트 실행법(CLAUDE.md)
This commit is contained in:
skkim committed 2026-11-26 13:03:29 +09:00
1 parent 1a98adc155
commit dc8201e5f5
38 files changed
+4219 -28

No files matched your search

+12
View File
@@ -22,3 +22,15 @@ class Res_AdminUsers(Res_WebPacketProtocol):
total: int = 0
counts: dict[int, int] = Field({}, description="가입 경로(AuthProvider)별 인원")
items: list[AdminUser] = []
class WidgetViewData(WebPacketProtocol):
host: str = Field(description="부른 사이트 호스트(소문자), (알 수 없음), (기타)")
views_7d: int = Field(description="오늘 포함 최근 7일(한국 날짜) 노출 수")
views_30d: int = Field(description="오늘 포함 최근 30일(한국 날짜) 노출 수")
class Res_WidgetViews(Res_WebPacketProtocol):
items: list[WidgetViewData] = Field([], description="views_30d 많은 순 (같으면 호스트 이름순)")
total_7d: int = Field(0, description="최근 7일 노출 수 합")
total_30d: int = Field(0, description="최근 30일 노출 수 합")