diff --git a/.claude/commands/seo-daily.md b/.claude/commands/seo-daily.md new file mode 100644 index 0000000..19ea781 --- /dev/null +++ b/.claude/commands/seo-daily.md @@ -0,0 +1,44 @@ +--- +description: 날씨각(weather.o2o.kr) 구글·네이버 검색 노출 매일 점검 + 다음 할 일 제안 +--- + +weather.o2o.kr 검색 노출을 점검하고, 어제와 비교해 다음 할 일을 제안한다. + +## 1. 검색어 + +날씨각 · 오늘 날씨 · 분당구 오늘 날씨 · 분당 날씨 · 성남 오늘 날씨 · 마포구 오늘 날씨 · 마포구 날씨 · 강남구 오늘 날씨 · 세차하기 좋은 날 · 빨래하기 좋은 날 · 오늘 노을 시간 · 이번 주말 날씨 · 세차각 + +$ARGUMENTS 가 있으면 위 목록에 더한다. + +## 2. 구글 (Chrome 확장) + +- google.com 탭을 하나 열고, 그 탭에서 `fetch('/search?hl=ko&gl=kr&num=20&q=…')`로 검색어마다 결과 HTML을 받는다. 요청 사이 1.5초 쉰다. +- `a h3`의 링크를 순서대로 모아 google 도메인을 빼고, 같은 호스트는 한 번만 센다. weather.o2o.kr이 몇 번째 사이트인지, 어느 주소·제목으로 잡혔는지 적는다. +- '날씨각' 결과는 사이트 이름(링크 위 이름)도 적는다. 지금은 '에이아이오투오'로 나온다. +- `site:weather.o2o.kr` 결과의 주소 목록도 적는다. +- 끝나면 연 탭을 닫는다. + +## 3. 네이버 (curl) + +- 브라우저 UA로 `https://search.naver.com/search.naver?query=…`를 받는다. 요청 사이 3초 이상 쉰다. +- 응답이 30KB 안팎이고 본문이 비어 있으면 네이버가 막은 것이다. 그 검색어는 "차단"으로 적고 다시 시도하지 않는다. +- 외부 링크 호스트를 순서대로 중복 없이 세서 weather.o2o.kr 순서를 적는다(http/https 같은 사이트는 하나로). +- `query=site:weather.o2o.kr&where=web`으로 색인된 주소 목록을 적는다. + +## 4. 기록 + +- `docs/검색노출_기록.md` 표 맨 아래에 오늘 날짜 행을 더한다. 형식은 파일 안 표를 따른다. +- 어제 행과 비교해 바뀐 것(새로 잡힘·빠짐·순위 변화·색인 주소 수)을 뽑는다. + +## 5. 다음 할 일 제안 + +- 근거는 공식 문서만 쓴다: `docs/구글_검색_정책_리서치.md`, 구글 Search Central, 네이버 서치어드바이저 가이드. 문서에 없는 건 "문서에 없음"이라 쓰고, 판단·추정은 따로 표시한다. +- 같은 페이지를 매일 수집 요청하지 않는다(네이버: 반영에 1일~몇 주, 매일 반복 불필요). +- 바꾼 뒤 결과는 몇 주 단위로 본다(구글: 변경 반영에 몇 시간~몇 달). 하루 변화로 원인을 단정하지 않는다. +- 코드·문구 수정이 필요하면 고치지 말고 제안만 하고, 결정이 필요한 건 `TODO.md`에 적는다. + +## 6. 보고 (채팅, 짧게) + +- 바뀐 것 3줄 이내 +- 검색어별 구글/네이버 순서 (없음·차단 포함) +- 다음 할 일 1~3개 (근거 출처 포함) diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c4ce26c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +# 저장소 루트를 빌드 대상으로 쓰는 건 frontend 이미지뿐이라 frontend·shared·루트 package 파일만 넘긴다 +* +!package.json +!package-lock.json +!frontend +!shared +!mobile/package.json +**/node_modules +**/dist +**/*.log +**/.DS_Store +**/dist-toss +**/*.ait +**/.env.toss diff --git a/.env.example b/.env.example index 65bb5ac..748ceef 100644 --- a/.env.example +++ b/.env.example @@ -13,6 +13,11 @@ INSTAGRAM_USER_ID= # 인스타가 카드 이미지를 받아 갈 공개 주소 PUBLIC_BASE_URL=https://weather.o2o.kr IMAGE_PROXY_HOSTS=tong.visitkorea.or.kr,www.culture.go.kr,culture.seoul.go.kr +# 오늘 화면 쇼츠 줄 (YouTube Data API v3 키, console.cloud.google.com/apis/credentials 에서 발급·YouTube Data API v3 만 허용). +# 비우면 채널 쇼츠를 자동으로 못 받고 YOUTUBE_SHORTS(영상 ID, 쉼표로 구분, 최신순)만 보여 준다. 둘 다 비우면 기본값(영상 3개) +YOUTUBE_API_KEY= +YOUTUBE_CHANNEL_ID=UCWdesmwvHFsnjMUWNcDaA9w +YOUTUBE_SHORTS= # ── 백엔드: DB·Redis (네이티브 실행 기준. compose 안에서는 compose.yaml 이 host·port 를 덮어쓴다) DB_HOST=localhost @@ -32,6 +37,13 @@ GOOGLE_CLIENT_ID= JWT_ACCESS_SECRET= JWT_REFRESH_SECRET= +# ── 백엔드: 앱인토스 토스 로그인. 인증서·키는 저장소 최상위 secrets/toss/ 에 두고(커밋 안 함) 컨테이너 안 경로를 적는다 +# compose 는 secrets/toss 를 backend 의 /run/secrets/toss 에 읽기 전용으로 붙인다 +TOSS_MTLS_CERT=/run/secrets/toss/nalssigak_public.crt +TOSS_MTLS_KEY=/run/secrets/toss/nalssigak_private.key +# 연결 끊기 콜백 Basic Auth "아이디:비밀번호" — 콘솔에 넣은 값과 같게. 비우면 콜백을 모두 거절한다 +TOSS_UNLINK_AUTH= + # ── 배포(compose): 비우면 로컬 기본값. 킹서버 예: FRONT_PORT=30040, API_BIND=127.0.0.1:9810, PG_BIND=127.0.0.1:5440, REDIS_BIND=127.0.0.1:6390 FRONT_PORT= API_BIND= diff --git a/.gitignore b/.gitignore index 827cf98..4f8c2f5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ .env.* !.env.example +# npm workspaces 의존성 (frontend·mobile·shared 가 루트 하나를 같이 쓴다) +node_modules/ + # Python 바이트코드/캐시 __pycache__/ *.py[cod] @@ -23,4 +26,9 @@ backend/uploads/ # 디자인 도구(impeccable) 캐시 .impeccable/ -/zzz \ No newline at end of file +/zzz +# 인증서·키: 서버와 각자 PC 에만 둔다 (토스 mTLS 등) +secrets/ +*.pem +*.key +*.crt diff --git a/TODO.md b/TODO.md index 6826989..3c6bc5a 100644 --- a/TODO.md +++ b/TODO.md @@ -59,6 +59,10 @@ | [ ] | 단풍 지도 '첫 단풍'은 절정 14일 전부터로 추정(발표에 시작일 없음). 예측 지점이 아닌 명소 32곳은 가장 가까운 예측 지점 날짜를 빌림(예: 남산공원·창덕궁 ← 수리산). 실제 관측과 다를 수 있음 | 사용자 결정 10/21 | `frontend/seo/foliage_2026.json` | | [ ] | 토스 미니앱 최신 버전 재등록 — 웹이 바뀌면 자동 반영 안 됨 | 10/21 회의 | | | [ ] | 유튜브 숏폼 자동화 진행 방안 협의 (김성경, 10/22) | 10/21 회의 | | +| [ ] | 오늘 화면 쇼츠 줄 — YouTube Data API 키(`YOUTUBE_API_KEY`) 발급해 운영 .env 에 넣기. 없으면 `youtube_shorts`(영상 ID 3개 고정)만 나와 새 쇼츠가 자동으로 안 붙음 (https://console.cloud.google.com/apis/library/youtube.googleapis.com) | 채널 RSS가 404라 키 없이 채널 목록을 못 받음 | `backend/config/settings.py`, `backend/services/shorts_service.py` | +| [ ] | **[결정 필요]** 쇼츠 문구 검토: '소리 켜기'/'소리 끄기' (줄 제목은 없앰) | 화면 문구 규칙 | `frontend/src/b/Shorts.tsx` | +| [ ] | 쇼츠를 올린 직후 목록 갱신(`ShortsService.refresh`) 부르기 — 지금은 워커가 07·12·18시 10분에만 받아 18시 넘어 올리면 다음 날 아침에 뜸. 자동 업로드면 끝난 뒤 호출, 손으로 올리면 관리자 갱신 API | 올리는 방식 확인 필요 | `backend/services/shorts_service.py`, `backend/worker_main.py` | +| [ ] | 쇼츠 자동재생 아이폰 사파리 실기기 확인 — 소리 꺼도 자동재생을 막는다는 보고 있음 | 헤드리스 크롬에서만 확인 | `frontend/src/b/Shorts.tsx` | | [ ] | 인스타 운영 관리자 페이지(자동 게시 전 승인 메일) + 초기 이야기형 피드(각 100개·빨래각·소맥각·점수 산정법) | 10/21 회의 | | | [ ] | 레이어 공유 아이디어 — 사용자 사진 위에 날씨각 정보를 얹어 공유(캐시워크식), 앱 기능으로 | 10/21 회의 (황 본부장 의견, 대표 방향) | | | [ ] | iOS 개발자 계정 — 소장에게 기존 계정 확인, 어려우면 회사 계정 새로 만들기. 안드로이드 앱 계속 준비 | 10/21 회의 결정 | | @@ -207,6 +211,15 @@ | [x] | 좋아요·댓글이 전국 공통 — 포스트가 (날짜, 자리) 하나로 전국에 하나뿐이라, 구마다 내용이 다른 카드(오늘 날씨·각 1~3위·노을·미세먼지·행사)도 댓글·좋아요를 전국이 같이 씀. 예: 강남의 "1위 산책각"과 부산의 "1위 빨래각"이 같은 댓글창. 안: 지역 데이터 카드만 시도(17) 단위로 나누고 계절·상식·명언은 전국 공통 유지 | 사용자 질문 (10/8) | `backend/postgres-init/init.sql` (`uq_post_feed`), `backend/services/feed_service.py` (`build_day`, `_gak`) | | [ ] | **[결정 필요]** 포스트 시도 단위가 17이 아니라 16 — `region.code` 앞 2자리에서 광주·전남이 둘 다 `12`(전남광주통합특별시)라 같은 댓글창을 씀. 그대로 둘지, 이름 앞머리로 광주·전남을 나눌지 | 포스트 시도 나누기 (10/8) | `backend/services/feed_service.py` (`sido_of`), `backend/seed/region.csv` | | [ ] | 광주·전남 구는 행사가 안 잡힐 수 있음 — 구 코드 시도는 `12`인데 행사 수집·`event.sido_code`는 `29`(광주)·`46`(전남). 좌표 없는 행사는 `is_nearby`·`nearby_sidos`에서 빠짐 | 포스트 시도 나누기 중 발견 (10/8) | `backend/services/week_service.py:125,144`, `backend/services/external/culture_api.py:28` | +| [ ] | **[결정 필요]** 앱인토스 입점 여부 — 검토안은 "웹 출시 후 보기 전용 토스판으로 시험, 첫 달 포인트·알림 20~30만 원, 5주차에 포인트 없는 주의 7일 재방문율 20%를 기준으로 계속/중단" (https://claude.ai/artifact/QgA7iq3CCesTRYcFyZck71) | 앱인토스 검토 | | +| [ ] | **[결정 필요]** 토스판 광고 — 앱인토스 수익은 토스 광고·인앱결제뿐인데 웹은 '광고 없음'으로 정함. 안 붙이면 토스판은 비용만 드는 홍보 채널 | 앱인토스 검토 | | +| [ ] | 앱인토스 사전 확인 — 시간대별 밤 배경이 '라이트 모드' 규칙에 걸리는지, 네이버 지도 링크가 '단순 정보 확인' 예외인지 채널톡 문의 | 앱인토스 검토 | `frontend/src/b/BLayout.tsx`, `frontend/src/b/ui.tsx` | +| [ ] | **[결정 필요]** 각 34개 정리 — 계절 밖 각(10월 물놀이·냉면) 노출 막기(각별 '보여 줄 달'), 나쁜 일 예고 각(택시대란·배달폭주·김서림·화장붕괴)을 순위에서 빼고 '조심' 카드로, 날씨 관계 약한 재미 각(공부·넷플릭스·짬뽕·막걸리·뜨아·군밤·집콕) 축소 또는 '재미' 표시 (https://claude.ai/artifact/4WgpUjdNqdSNnMN4ASB4BB) | 토스판 전략 검토 | `backend/seed/index_definition.json`, `backend/services/index_service.py` | +| [ ] | 글 재고 부족 — 25편(한 문장 8·시 3·상식 4·계절 9)이라 매일 보면 1~2주 안에 반복, 계절 글은 10월분뿐. 기획의 'AI 주 1회 생성'이 스케줄러에 없음. 8주치 재고 또는 생성·검토 파이프라인 | 토스판 전략 검토 | `backend/seed/article.json`, `backend/scheduler/jobs.py` | +| [ ] | **[결정 필요]** 노을 알림 재검토 — 10/2에 제외했지만 토스 알림은 정보성만 허용돼 "오늘 노을 좋음"이 가장 맞는 알림. 토스판 핵심 후보 | 토스판 전략 검토 | | +| [ ] | **[결정 필요]** 히어로 숫자 5개(기온·체감·불쾌지수·날씨 점수·1위 각 점수) — 불쾌지수 여름만, 날씨 점수 유지 여부 | 토스판 전략 검토 | `frontend/src/b/TodayPage.tsx` | +| [x] | 토스판 방식 — WebView로 결정(10/12). 별도 프로젝트 없이 `frontend/`에 토스 빌드 모드 추가, RN은 독립 앱만 | 토스판 전략 검토 | `frontend/` | +| [x] | 앱인토스 appName 정식 이름으로 교체 — 콘솔 앱 `nalssigak`으로 맞춤(10/13). 정식 앱 등록 후 두 곳을 같이 바꾸고 `npm run build:toss` 다시 실행 | 콘솔 테스트 앱으로 먼저 등록 | `frontend/apps-in-toss.config.ts`, `frontend/src/lib/platform.ts` | | [x] | 전체 날씨 점수 기준 강화 — 100점은 '1년에 하루' 수준으로만 → 각과 같은 계산에 기준만 좁힘(체감 21±0.5°·습도 45~55%·해 90%↑·바람 1m/s↓·초미세먼지 10↓, 사용자 결정 '기준만 좁히기'). 실제 연 몇 번 나오는지는 미확인 (`docs/점수_계산식.md` 3) | 10/8 회의 결정 | `backend/services/index_service.py:203` | | [x] | 각 점수를 아침·낮·저녁·밤 시간대별로 → 지금 구간 점수로 순위, 안 겹치는 각은 순위·피드에서 빼고 스토리·전체엔 '지금 아님'. 히어로는 '지금 날씨 점수'(지금 구간). 운영 DB에 `index_score.slots` 칸 추가 필요(배포 때 `init.sql`의 ALTER) | 10/8 회의 결정 | `backend/services/calc/index_calc.py:297` | | [x] | 히어로에 습도·불쾌지수 항상 표시 → 4칸(지금·습도·불쾌지수·상황 1칸, 사용자 결정). 불쾌지수 75 이상이면 경고 색, 상황 칸 후보에서 불쾌지수 뺌 | 10/8 회의 결정 | `frontend/src/b/TodayPage.tsx` (`HeroStat`) | @@ -218,6 +231,13 @@ | [ ] | **[결정 필요]** 각 순위가 점수 순이 아니라 보임 — 순위가 점수 × 중요도라 환기각 92점(하)이 5위, 골프각 89점이 3위, 빨래각 83점이 2위. 각 탭 받침대·스토리에서 높은 점수가 뒤에 있어 어색함. 점수를 순위대로 보여줄지, 중요도 가중을 줄일지 | 화면 직접 확인 중 발견 (10/12) | `backend/services/calc/index_calc.py` (`PRIORITY_WEIGHT`), `frontend/src/b/GakPage.tsx` | | [x] | 노을 점수 29점(잿빛)인데 결론 '나가 볼 만해요' — 결론이 구름 분포만 보고 공기 보정(가시거리·습도)을 안 봤음 → 공기 보정 0.7배 미만이면 결론 한 단계 낮추고 이유에 공기 표시, '해 질 무렵(N시) 예보 기준' 표시. 운영 DB에 `sky_score.air` 칸 추가 필요(배포 때 `init.sql`의 ALTER) | 사용자 지적 (10/12, 분당구) | `backend/services/sky_service.py` (`day_verdict`, `build_plan`), `backend/services/calc/sky_score.py` (`air_note`) | | [x] | 노을 탭 다시 짜기 → 시안 A(사용자 선택): 히어로 '오늘은 애매해요 / 18:10쯤 가장 붉어요 / 쉬운 이유', 내일 안내 바로 아래, 숫자는 '자세히', 시간표에 가장 붉을 때 — 처음 보면 '그래서 가?'에서 멈춤: 히어로 18:00이 무슨 시각인지 없음, 결론 카드가 좋은 말·나쁜 말을 섞음, 구름 %·예보 모델 수 같은 전문 용어, '가장 붉을 때'가 시간표에 없음, '내일이 더 나아요'가 맨 아래. 시안 먼저 보고 결정 | 사용자 지적 (10/12) | `frontend/src/b/SkyPage.tsx`, `backend/services/calc/sky_score.py` (`reason`) | +| [ ] | 토스 로그인 운영 설정 — 서버 `secrets/toss/` 인증서·키, `.env` `TOSS_*` 세 줄은 넣음(10/14). 남은 것: 정산정보 등록(대표님), 배포, 콘솔 약관 링크·콜백, `4050 인증서버에 등록된 미니앱이 아닙니다` 재확인 | 토스 로그인 구현(10/14) | `compose.yaml`, `.env.example`, `backend/config/settings.py` | +| [ ] | 토스 번들 다시 만들기 — 로그인(4050) 풀린 뒤 `npm run build:toss`로 한 번에. 지금 콘솔 번들엔 로그인·GA `platform` 값이 없음. 로그인 실패 상태로 검수 올리면 반려 위험 | 로그인 미완성이라 미룸(10/14) | `frontend/` | +| [ ] | **[결정 필요]** 토스 연결 끊기 처리 — 지금은 UNLINK·탈퇴 모두 토큰만 무효로 함. 토스 탈퇴(`WITHDRAWAL_TOSS`·`WITHDRAWAL_TERMS`) 때 계정·댓글을 지울지 | 토스 로그인 구현(10/14) | `backend/services/auth_service.py` | +| [ ] | 토스 로그인 문구 검토 — '토스로 로그인', '토스로 로그인했어요', '토스 로그인을 마치지 못했어요. 한 번 더 눌러 주세요.', 기본 닉네임 '토스1234'(userKey 끝 4자리), 로그인 창 '날씨각 로그인'·'로그인하면 동네 이야기를 쓰고 내 각을 저장할 수 있어요', 인트로 '오늘 날씨에 맞는 일을 점수로 알려 줘요'·'세차·빨래·러닝 각 점수'·'오늘 노을이 예쁜 시간'·'이번 주말 가까운 행사'·'시작하기'(10/24) | 토스 로그인 구현(10/14) | `frontend/src/b/Sheets.tsx`, `backend/services/auth_service.py` | +| [ ] | 토스판 첫 실행에 인트로와 위치 권한 창이 같이 뜸 — 위치 권한은 앱이 뜨자마자 물어서 인트로 위에 겹칠 수 있음. '시작하기' 뒤로 미룰지 토스 앱에서 확인 | 인트로 추가 (10/24) | `frontend/src/b/region.tsx`, `frontend/src/b/tossIntro.tsx` | +| [ ] | 메뉴의 '로그인하면 좋아요·댓글을 쓸 수 있어요' — 좋아요·댓글은 로그인 없이 됨(10/21 결정)이라 문구가 틀림 | 인트로 추가 중 발견 (10/24) | `frontend/src/b/Sheets.tsx:1117` | +| [ ] | 댓글 신고·차단 — 앱인토스 필수 아님(신고·차단 필수는 채팅·만남·중고거래만, 서비스 오픈 정책·서비스별 주의사항). 만들지 않기로 함(10/14). 검수에서 요청이 오면 만든다 | 토스 로그인 구현(10/14) | | | [x] | 각 늘리기 53→68 — 리서치로 고른 8개(한강·놀이공원·데이트·곱슬머리·보일러·선크림·모기·테니스) + 감성 7개(효도·감사·선물·파티·게임·셀카·센치), 아이콘 15개(Codex) | 사용자 요청 (10/20, 리서치 https://claude.ai/artifact/3ZQbtGKRLVZViRRC5voBzY) | `backend/seed/index_definition.json`, `frontend/public/icons/`, `frontend/src/b/lib.ts` | | [ ] | **[결정 필요]** 한강각·놀이공원각이 강·놀이공원 없는 동네에도 나옴 — 각을 지역별로 가려 보여 주는 기능이 없음(한강밤바람각도 같음). 서울·한강 인접 구만 보일지 | 새 각 추가 중 발견 (10/20) | `backend/seed/index_definition.json`, `backend/services/index_service.py` | | [ ] | **[결정 필요]** 기존 각과 겹침 — 센치↔감성노래, 게임↔넷플릭스·집콕, 곱슬머리↔화장붕괴, 효도↔트로트, 셀카↔사진산책. 둘 다 둘지 합칠지 | 새 각 추가 중 발견 (10/20) | `backend/seed/index_definition.json` | @@ -279,3 +299,47 @@ | [ ] | `npm run card`가 크롬 멈춤에 시간 제한이 없음 — 10/24 소개 카드 7번 장에서 헤드리스 크롬이 75분 멈춰 있었음(`--virtual-time-budget`만으론 안 끝남). `execFileSync`에 `timeout`(예: 60초) 주고 실패 시 그 장만 재시도 | 10/24 렌더 중 발견 | `admin/scripts/card.mjs` | | [x] | 10/25 건강·운동 타로(킹서버 카드 7→포스트 3960, 인스타 https://www.instagram.com/p/De5iLg4AS_M/)·꾸안꾸 코디는 처음 올린 카드 8→포스트 3961(인스타 De58VfXINy0)이 40대~ 옷이 20-30대와 같아 숨기고, 40대~ 옷을 새로 써서 카드 9→포스트 3962(인스타 De5-8gboL-c)로 재게시했으나 40대 여자 그림에 롱가디건이 끼고 전체가 여름 옷으로 보여 다시 숨김. 일교차 8도 이상이면 겉옷을 5번째 옷으로 넣게 고쳐 카드 10→포스트 3963(인스타 De6B2gwIMXF)으로 올렸으나 그림 배치와 이름표 자리가 어긋나 숨김. 프롬프트에 옷 자리를 적고 다시 그려 카드 11→포스트 3964, 인스타 https://www.instagram.com/p/De6JRIkoKbT/ 로 최종 게시. 07:52 예약(세션 크론)이 세션 종료로 안 돌아 09:46 수동 실행. 코디는 사용자 결정으로 사람 구분을 20-30대·40대~ 4장으로 바꿈(f30·m30 그림 파일 8장은 남아 있으나 미사용). 새 그림 8장(러닝각·자전거각·warm 꾸안꾸 6) | 사용자 요청 (10/24) | `admin/image-prompts/ootd.json`, `admin/scripts/card.mjs` | +## 앱(React Native) 마이그레이션 + +| 상태 | 할 일 | 이유 | 관련 파일 | +|---|---|---|---| +| [x] | 1단계: 웹·앱 공통 코드 `shared/`(`@nalssigak/shared`) 분리, 루트 npm workspaces, 웹 Docker 빌드 대상을 루트로 | 앱과 API 클라이언트·로직 공유 | `package.json`, `shared/`, `frontend/Dockerfile`, `compose.yaml`, `.dockerignore` | +| [x] | 2단계: 앱에 react-query·Uniwind 설정 + Metro가 `react`를 `mobile/node_modules`(19.2.3) 것만 쓰게 설정 — 루트에는 웹용 react 19.3.0이 있고 RN 렌더러는 19.2.3에서만 돌아감 | 앱 시작 준비 | `mobile/metro.config.js`, `mobile/src/app/_layout.tsx`, `mobile/src/lib/query-client.ts` | +| [x] | 앱 토큰 저장소 `expo-secure-store`로 `configureApi` 연결, API 주소는 `EXPO_PUBLIC_API_BASE_URL` | 웹은 localStorage | `mobile/src/lib/api.ts`, `mobile/.env.example` | +| [x] | 안드로이드 에뮬레이터(Expo Go)에서 확인: 오늘 화면 실데이터, 위치 권한 창, 탭 이동, 각 근거 시트 | | `mobile/` | +| [x] | 안드로이드 개발 빌드에서 가입·로그인(아바타 표시)·좋아요·이미지 공유·위치로 지역 찾기 확인 | | `mobile/` | +| [ ] | 안드로이드 댓글 쓰기·내 정보 바꾸기·로그아웃 확인 | 아직 안 눌러 봄 | `mobile/src/components/sheets/` | +| [x] | 출시 빌드 설정: `eas.json`(production 은 운영 API·사이트 주소, 빌드 번호 자동 증가), iOS 수출 규정 암호화 없음, 안드로이드 권한은 대략 위치만(정밀 위치·저장소·다른 앱 위에 그리기 뺌) | | `mobile/eas.json`, `mobile/app.json` | +| [ ] | 출시 빌드 전 준비(사용자): Apple Developer·Google Play Console·Expo 계정, 스토어 스크린샷·설명·데이터 안전 양식 | 서명·제출에 필요 | | +| [x] | 회원 탈퇴(스토어 심사 필수): `DELETE /v1/auth/me` — 계정·댓글·좋아요·저장 모두 삭제, 게시물·댓글 수 맞춤. 웹·앱 내 정보 시트 '탈퇴하기'(한 번 더 확인) | Apple 5.1.1(v), Google Play 계정 삭제 정책 | `backend/crud/user_crud.py`, `backend/services/auth_service.py`, `frontend/src/b/Sheets.tsx`, `mobile/src/components/sheets/me.tsx` | +| [ ] | 운영 배포 때 탈퇴 API 같이 나감 — 배포 전 웹 내 정보 시트 '탈퇴하기' 화면 확인 (앱은 안드로이드에서 확인, 웹은 빌드·린트만) | | `frontend/src/b/Sheets.tsx` | +| [ ] | 백엔드 테스트 3개가 날짜 때문에 실패 (10/19): `test_feed`(제철 각 수 42≠40), `test_watch`, `test_weather_today`(10월 하순 18시가 일몰 뒤라 'sunset' 아이콘 아님) — 탈퇴 작업과 무관 | 기대값을 날짜에 안 묶이게 고쳐야 함 | `backend/tests/` | +| [ ] | Xcode 설치 후 iOS 시뮬레이터에서 전체 확인 | | `mobile/` | +| [x] | 안드로이드 개발 빌드(`expo run:android`) 설치 확인: 홈 화면 해 아이콘·'날씨각' 이름, 실데이터 화면 | | `mobile/` | +| [x] | 앱 ID: 안드로이드 패키지 `kr.o2o.nalssigak` — Play Console 기존 '날씨각'(Wear OS 트랙에 워치 앱 있음)에 휴대전화 앱으로 추가하려면 패키지명이 같아야 함. iOS 번들 ID는 미정 | 스토어에 올리면 못 바꿈 | `mobile/app.json` | +| [x] | Play 제출: 휴대전화 versionCode 1000부터 (10/23 `app.json` versionCode 1000, 로컬 빌드)(워치가 1 사용) — `eas login` 후 `eas build:version:set -p android` | 같은 앱 안에서 versionCode 겹치면 안 됨 | `mobile/eas.json` | +| [x] | Play 제출: 워치 앱과 같은 업로드 키 (10/23 로컬 빌드로 서명 확인, SHA-1 D3:51…44:79. 비밀번호는 ~/.gradle/gradle.properties `NALSSIGAK_UPLOAD_*`)(.jks)를 `eas credentials -p android`로 등록 (사용자: 키 파일·비밀번호 준비, 분실 시 Play Console에서 업로드 키 재설정) | EAS는 안 넣으면 새 키를 만듦 | | +| [ ] | 출시 aab 서명 설정이 생성 폴더 `mobile/android/app/build.gradle`에만 있음 — `expo prebuild --clean` 하면 지워지니 다시 넣거나 config plugin으로 옮기기 | `android/`는 gitignore·재생성 | `mobile/android/app/build.gradle` | +| [ ] | 앱 구글 로그인 기기 확인: 네이티브 다시 빌드 → 구글 계정 로그인된 에뮬레이터(Play 서비스 이미지)에서 구글로 계속하기 | 새 네이티브 모듈이라 지금 설치된 개발 빌드엔 없음. Android 클라이언트(개발·Play SHA-1)는 콘솔에 등록됨 | `mobile/src/components/sheets/google.tsx` | +| [ ] | 운영 서버 `.env`에 `GOOGLE_CLIENT_ID`(웹 클라이언트 ID) 넣고 구글 로그인 백엔드 배포 | 비어 있으면 `/v1/auth/config`가 ID를 안 줘서 앱·웹 구글 버튼이 숨음 | `backend/config/settings.py` | +| [ ] | Play 제출(사용자): 휴대전화 스크린샷 2장+, 개인정보처리방침 URL, 계정 삭제 URL(웹 '탈퇴하기' 운영 배포 후), 데이터 보안 양식(대략 위치·계정 정보·댓글), 콘텐츠 등급, 앱 액세스용 심사 테스트 계정. 개인 계정(2023.11 이후)이면 비공개 테스트 12명·14일 | | | +| [x] | Play UGC 정책(댓글): 처음 댓글 쓸 때 이용약관 동의(`POST /v1/auth/terms`), 남의 댓글 ⋯ → 신고(이유 4가지, 신고한 사람에겐 바로 숨김, 3건이면 모두에게 숨김) / 이 사람 차단, 내 정보 '차단한 사람'·풀기, 운영 조치 `scripts/moderate.py`(숨김·되살림·정지), 탈퇴 때 신고·차단도 삭제 | Play 'User Generated Content' 정책 | `backend/`, `frontend/src/b/Sheets.tsx`, `frontend/public/terms.html`, `mobile/src/components/sheets/` | +| [ ] | 운영 DB 반영: `init.sql`의 `users.terms_agreed_at`, `comment.report_count`·`is_hidden`, `comment_report`, `user_block` (ALTER·CREATE IF NOT EXISTS) — 코드 배포 전에 먼저 | 새 코드가 이 칼럼을 읽음 | `backend/postgres-init/init.sql` | +| [ ] | **[검토 필요]** 이용약관 초안 문구 검토 | 법무 문구라 확인 필요 | `frontend/public/terms.html` | +| [ ] | 개인정보처리방침에 휴대전화 앱·댓글·신고·차단 기록 추가 (지금은 웹·워치 앱만 적혀 있음) | Play 데이터 보안 양식과 맞아야 함 | `frontend/public/privacy.html` | +| [x] | 앱 신고·차단·약관 화면 안드로이드 확인: ⋯ 메뉴, 차단 확인·안내·목록에서 빠짐, 약관 동의 후 바로 게시, 내 정보 '차단한 사람' 풀기 (신고 흐름은 백엔드 테스트로만). 새 패키지 `kr.o2o.nalssigak` 개발 빌드로 다시 설치함 | | `mobile/` | +| [ ] | 오늘 날씨 칸(3시·6시 등)이 '?' — 백엔드가 며칠 꺼져 있다 켜지면 최신 발표(예: 8시, 9시부터 예보)만 받아 새벽 칸 행이 없음. 0시 재수신(`_midnight_missing`)은 0시에 묵은 값이 있으면 안 돎. 운영은 늘 켜져 있어 드묾 — 고칠 땐 오늘 칸 중 비거나 묵은 칸이 있으면 다시 받기 | 10/19 로컬(9811)에서 확인, 앱·웹 버그 아님 | `backend/services/weather_service.py` (`today`, `ensure_vilage`, `_midnight_missing`) | +| [x] | 앱 아이콘 3D 해 그림(600px 원본)으로: iOS 1024, 안드로이드 적응형(앞·뒤·단색), 스플래시. Expo Go 에선 안 보이고 개발 빌드부터 보임. 스토어용으로는 1024px 이상 원본이 있으면 더 선명 | | `mobile/assets/images/` | +| [x] | 3단계-1: 탭 5개 구조·위 막대·하늘 배경·밤 테마(Uniwind dark), Today 히어로·각 순위·행사/TOP5/계절 띠 | | `mobile/src/app/`, `mobile/src/components/` | +| [x] | Today 게시물 카드(슬라이드 7종·넘기기·좋아요·댓글·텍스트 공유), 3·6·9번째 글 뒤 띠 | | `mobile/src/components/post/`, `mobile/src/app/index.tsx` | +| [x] | 시트 7종(각 근거·읽을거리·댓글·이번 주 특집·로그인/가입·내 정보·지역 고르기)을 RN `Modal`로, 위 막대 로그인/아바타 | 새 패키지 없이 | `mobile/src/components/sheets/`, `mobile/src/components/top-bar.tsx` | +| [x] | 고른 지역 저장 (SecureStore) | | `mobile/src/lib/region.tsx` | +| [x] | 위치로 지역 찾기(`expo-location`): 처음 켠 사람은 가장 가까운 구로, 지역 시트 '지금 위치로 찾기' | 웹과 같게 | `mobile/src/lib/region.tsx`, `mobile/src/components/sheets/region.tsx` | +| [x] | 움직임: 해·구름 떨어지기/둥둥, 비·눈, 스켈레톤 깜빡임, 첫 로딩 덮개, 하늘색 서서히 바뀜, 밤 별 반짝임 ('동작 줄이기' 켜면 멈춤) | | `mobile/src/components/today/hero.tsx`, `first-load.tsx`, `sky-bg.tsx` | +| [x] | 나머지 탭(각·노을·주말·행사·계절·상식) 옮기기 | | `mobile/src/app/`, `mobile/src/components/{gak,sky,week,season}/` | +| [x] | 이미지로 공유(`react-native-view-shot` + `expo-sharing`): 게시물은 보고 있는 슬라이드, 주말은 고른 날 추천 카드 | 웹 스토리 이미지(머리말·주소 붙인 9:16)와는 다름 | `mobile/src/lib/share-image.ts` | +| [x] | 웹과 다른 작은 것들 맞춤: 좋아요 튀는 하트·토스트, 밤 별똥별, 단풍잎 떨어짐, 시 구절 고운바탕, 실패·빈 안내 높이 유지(hold), 시트 배경은 제자리 페이드 | | `mobile/src/` | +| [ ] | 공유 이미지를 웹처럼 9:16 스토리(머리말·사이트 주소)로 — 지금은 화면 그대로 찍음. 좋아요 효과는 카드 안에만 뜸(RN에 portal 없음) | 남은 차이 | `mobile/src/lib/share-image.ts`, `mobile/src/components/post/` | +| [x] | `mobile/` 템플릿 예제 화면·`.vscode`·`LICENSE`·README 지움, `AGENTS.md`·`.claude`는 둠 | 사용자 결정 | `mobile/` | +| [ ] | `frontend-dev` 개발 컨테이너 실제로 띄워 확인 (이미지 빌드만 확인, 5173이 사용 중이라 실행은 못 함) | 볼륨 경로 바뀜 | `compose.yaml` | +| [ ] | 운영 서버가 git pull 뒤 루트 `package-lock.json`으로 빌드되는지 배포 때 확인 | 빌드 대상이 `./frontend` → `.` | `deploy.sh`, `compose.yaml` | diff --git a/backend/common/database/model/models.py b/backend/common/database/model/models.py index e672d23..b2eb5be 100644 --- a/backend/common/database/model/models.py +++ b/backend/common/database/model/models.py @@ -360,6 +360,7 @@ class User(Base): color: Mapped[str] = mapped_column(String(20), default="orange") mood: Mapped[Optional[str]] = mapped_column(String(20), nullable=True) status: Mapped[int] = mapped_column(SmallInteger, default=1) + terms_agreed_at: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), nullable=True) token_version: Mapped[int] = mapped_column(SmallInteger, default=1) created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now()) updated_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now()) @@ -400,10 +401,29 @@ class Comment(Base): region_name: Mapped[Optional[str]] = mapped_column(String(20), nullable=True) body: Mapped[str] = mapped_column(String(60)) like_count: Mapped[int] = mapped_column(Integer, default=0) + report_count: Mapped[int] = mapped_column(Integer, default=0) + is_hidden: Mapped[bool] = mapped_column(Boolean, default=False) created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now()) deleted: Mapped[bool] = mapped_column(Boolean, default=False) +class CommentReport(Base): + __tablename__ = "comment_report" + + comment_id: Mapped[int] = mapped_column(BigInteger, primary_key=True) + user_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True) + reason: Mapped[int] = mapped_column(SmallInteger) + created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now()) + + +class UserBlock(Base): + __tablename__ = "user_block" + + user_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True) + blocked_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True) + created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now()) + + class CommentLike(Base): __tablename__ = "comment_like" @@ -472,9 +492,3 @@ class TalkReport(Base): created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now()) -class UserBlock(Base): - __tablename__ = "user_block" - - user_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True) - blocked_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True) - created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now()) diff --git a/backend/common/enums.py b/backend/common/enums.py index 682e973..7af3e4f 100644 --- a/backend/common/enums.py +++ b/backend/common/enums.py @@ -25,6 +25,7 @@ class ErrorType(Enum): AUTH_FAILED = 4002 AUTH_DUPLICATE_ID = 4003 AUTH_TOKEN_INVALID = 4004 + TERMS_REQUIRED = 4005 class Sky(CodeEnum): @@ -191,3 +192,11 @@ class CardStatus(CodeEnum): class AuthProvider(CodeEnum): LOCAL = 1 GOOGLE = 2 + TOSS = 3 + + +class ReportReason(CodeEnum): + ABUSE = 1 + AD = 2 + PRIVACY = 3 + OTHER = 4 diff --git a/backend/config/settings.py b/backend/config/settings.py index 929d559..99093f3 100644 --- a/backend/config/settings.py +++ b/backend/config/settings.py @@ -51,6 +51,11 @@ class Settings(BaseSettings): azure_blob_base_url: str = "" azure_blob_sas_token: str = "" + # 오늘 화면 쇼츠 줄. API 키가 있으면 채널의 쇼츠를 받고, 없으면 youtube_shorts(영상 ID, 쉼표로 구분, 최신순)를 보여 준다 + youtube_api_key: str = "" + youtube_channel_id: str = "UCWdesmwvHFsnjMUWNcDaA9w" + youtube_shorts: str = "kpp6WFEi4Nk,Wdv-e_DdQFY,WmbOEhi91IM" + # 구글 로그인 OAuth 클라이언트 ID (공개값). 비면 구글 로그인을 받지 않는다 google_client_id: str = "" @@ -59,6 +64,13 @@ class Settings(BaseSettings): jwt_access_minutes: int = 60 jwt_refresh_days: int = 30 + # 앱인토스 토스 로그인. 인증서·키는 저장소 밖(secrets/toss)에 두고 경로만 받는다 + toss_api_base: str = "https://apps-in-toss-api.toss.im" + toss_mtls_cert: str = "" + toss_mtls_key: str = "" + # 연결 끊기 콜백의 Basic Auth 값 "아이디:비밀번호". 콘솔에 넣은 값과 같아야 한다 + toss_unlink_auth: str = "" + @field_validator("data_go_kr_service_key") @classmethod def _decode_service_key(cls, v: str) -> str: diff --git a/backend/crud/reaction_crud.py b/backend/crud/reaction_crud.py index 5defe41..3fe9001 100644 --- a/backend/crud/reaction_crud.py +++ b/backend/crud/reaction_crud.py @@ -2,13 +2,15 @@ import uuid from datetime import datetime from typing import Optional -from sqlalchemy import delete, func, select, update +from sqlalchemy import delete, func, or_, select, update from sqlalchemy.dialects.postgresql import insert from sqlalchemy.ext.asyncio import AsyncSession -from common.database.model.models import Comment, CommentLike, CommentLikeAnon, Post, PostLike, PostLikeAnon, PostSave, User +from common.database.model.models import Comment, CommentLike, CommentLikeAnon, CommentReport, Post, PostLike, PostLikeAnon, PostSave, User, UserBlock from common.liker import Liker +HIDE_AT = 3 # 신고가 이만큼 쌓이면 모두에게서 숨긴다 + async def toggle_like_row(s: AsyncSession, who: Liker, member: type, anon: type, id_name: str, id_value: int, on: bool) -> bool: """로그인했으면 member 표에 user_id 로, 아니면 anon 표에 ip_hash 로 넣거나 지운다. 실제로 바뀌었으면 True.""" @@ -52,9 +54,16 @@ class ReactionCRUD: stmt = stmt.where(Post.post_id < cursor) return list((await s.execute(stmt.order_by(Post.post_id.desc()).limit(limit))).all()) - async def comments(self, s: AsyncSession, post_id: int, cursor: Optional[int], limit: int) -> list[tuple[Comment, Optional[str], Optional[str], Optional[str], Optional[str]]]: - """로그인 없이 쓴 댓글은 User 칸이 모두 None 이다.""" - stmt = select(Comment, User.nickname, User.character, User.color, User.mood).outerjoin(User, User.user_id == Comment.user_id).where(Comment.post_id == post_id, Comment.deleted.is_(False)) + async def comments(self, s: AsyncSession, post_id: int, viewer: Optional[uuid.UUID], cursor: Optional[int], limit: int) -> list[tuple[Comment, Optional[str], Optional[str], Optional[str], Optional[str]]]: + """로그인 없이 쓴 댓글은 User 칸이 모두 None 이다. 숨긴 댓글은 빼고, 보는 사람이 신고한 댓글·차단한 사람의 댓글도 뺀다.""" + stmt = select(Comment, User.nickname, User.character, User.color, User.mood).outerjoin(User, User.user_id == Comment.user_id).where( + Comment.post_id == post_id, Comment.deleted.is_(False), Comment.is_hidden.is_(False) + ) + if viewer is not None: + stmt = stmt.where( + Comment.comment_id.not_in(select(CommentReport.comment_id).where(CommentReport.user_id == viewer)), + or_(Comment.user_id.is_(None), Comment.user_id.not_in(select(UserBlock.blocked_id).where(UserBlock.user_id == viewer))), + ) if cursor is not None: stmt = stmt.where(Comment.comment_id > cursor) return list((await s.execute(stmt.order_by(Comment.comment_id).limit(limit))).all()) @@ -81,18 +90,61 @@ class ReactionCRUD: owner = Comment.user_id == who.user_id if who.user_id is not None else (Comment.user_id.is_(None) & (Comment.ip_hash == who.ip_hash)) res = await s.execute( update(Comment).where(Comment.comment_id == comment_id, owner, Comment.deleted.is_(False)) - .values(deleted=True).returning(Comment.post_id) + .values(deleted=True).returning(Comment.post_id, Comment.is_hidden) ) - post_id = res.scalar() - if post_id is None: + row = res.first() + if row is None: return False - await s.execute(update(Post).where(Post.post_id == post_id).values(comment_count=Post.comment_count - 1)) + # 숨긴 댓글은 이미 댓글 수에서 빠져 있다 + if not row.is_hidden: + await s.execute(update(Post).where(Post.post_id == row.post_id).values(comment_count=Post.comment_count - 1)) return True async def toggle_comment_like(self, s: AsyncSession, comment_id: int, who: Liker, on: bool) -> Optional[int]: - exists = await s.scalar(select(Comment.comment_id).where(Comment.comment_id == comment_id, Comment.deleted.is_(False))) + exists = await s.scalar(select(Comment.comment_id).where(Comment.comment_id == comment_id, Comment.deleted.is_(False), Comment.is_hidden.is_(False))) if exists is None: return None if await toggle_like_row(s, who, CommentLike, CommentLikeAnon, "comment_id", comment_id, on): await s.execute(update(Comment).where(Comment.comment_id == comment_id).values(like_count=Comment.like_count + (1 if on else -1))) return await s.scalar(select(Comment.like_count).where(Comment.comment_id == comment_id)) + + async def comment_author(self, s: AsyncSession, comment_id: int): + """지금 보이는 댓글이면 (comment_id, user_id) 행, 없으면 None. 로그인 없이 쓴 댓글은 user_id 가 None.""" + return (await s.execute(select(Comment.comment_id, Comment.user_id).where(Comment.comment_id == comment_id, Comment.deleted.is_(False), Comment.is_hidden.is_(False)))).first() + + async def report_comment(self, s: AsyncSession, comment_id: int, user_id: uuid.UUID, reason: int) -> None: + """같은 사람이 두 번 신고해도 한 번만 센다. HIDE_AT 건이 되면 숨기고 댓글 수에서 뺀다.""" + res = await s.execute(insert(CommentReport).values(comment_id=comment_id, user_id=user_id, reason=reason).on_conflict_do_nothing().returning(CommentReport.comment_id)) + if res.first() is None: + return + await s.execute(update(Comment).where(Comment.comment_id == comment_id).values(report_count=Comment.report_count + 1)) + res = await s.execute( + update(Comment).where(Comment.comment_id == comment_id, Comment.report_count >= HIDE_AT, Comment.is_hidden.is_(False), Comment.deleted.is_(False)) + .values(is_hidden=True).returning(Comment.post_id) + ) + post_id = res.scalar() + if post_id is not None: + await s.execute(update(Post).where(Post.post_id == post_id).values(comment_count=Post.comment_count - 1)) + + async def set_hidden(self, s: AsyncSession, comment_id: int, hidden: bool) -> bool: + """운영자가 댓글을 숨기거나 되살린다. 실제로 바뀌었을 때만 댓글 수를 고친다.""" + res = await s.execute( + update(Comment).where(Comment.comment_id == comment_id, Comment.is_hidden.is_(not hidden), Comment.deleted.is_(False)) + .values(is_hidden=hidden).returning(Comment.post_id) + ) + post_id = res.scalar() + if post_id is None: + return False + await s.execute(update(Post).where(Post.post_id == post_id).values(comment_count=Post.comment_count + (-1 if hidden else 1))) + return True + + async def block(self, s: AsyncSession, user_id: uuid.UUID, blocked_id: uuid.UUID) -> None: + await s.execute(insert(UserBlock).values(user_id=user_id, blocked_id=blocked_id).on_conflict_do_nothing()) + + async def unblock(self, s: AsyncSession, user_id: uuid.UUID, blocked_id: uuid.UUID) -> bool: + res = await s.execute(delete(UserBlock).where(UserBlock.user_id == user_id, UserBlock.blocked_id == blocked_id).returning(UserBlock.blocked_id)) + return res.first() is not None + + async def blocked(self, s: AsyncSession, user_id: uuid.UUID) -> list[User]: + stmt = select(User).join(UserBlock, UserBlock.blocked_id == User.user_id).where(UserBlock.user_id == user_id).order_by(UserBlock.created_at.desc()) + return list((await s.scalars(stmt)).all()) diff --git a/backend/crud/user_crud.py b/backend/crud/user_crud.py index efc683a..0ba5f7e 100644 --- a/backend/crud/user_crud.py +++ b/backend/crud/user_crud.py @@ -1,17 +1,21 @@ import uuid +from collections import Counter from datetime import datetime, timezone from typing import Optional -from sqlalchemy import select +from sqlalchemy import delete, select, update from sqlalchemy.ext.asyncio import AsyncSession -from common.database.model.models import User +from common.database.model.models import Comment, CommentLike, CommentReport, Post, PostLike, PostSave, User, UserBlock class UserCRUD: async def by_login_id(self, s: AsyncSession, login_id: str) -> Optional[User]: return await s.scalar(select(User).where(User.login_id == login_id, User.deleted.is_(False))) + async def by_provider_uid(self, s: AsyncSession, provider: int, provider_uid: str) -> Optional[User]: + return await s.scalar(select(User).where(User.provider == provider, User.provider_uid == provider_uid, User.deleted.is_(False))) + async def get(self, s: AsyncSession, user_id: uuid.UUID) -> Optional[User]: user = await s.get(User, user_id) return user if user is not None and not user.deleted else None @@ -22,6 +26,12 @@ class UserCRUD: await s.flush() return user + async def create_social(self, s: AsyncSession, provider: int, provider_uid: str, login_id: str, nickname: str) -> User: + user = User(login_id=login_id, password=None, provider_uid=provider_uid, nickname=nickname, provider=provider) + s.add(user) + await s.flush() + return user + async def create_google(self, s: AsyncSession, sub: str, nickname: str) -> User: user = User(login_id=f"google_{sub}", provider_uid=sub, nickname=nickname, provider=2) s.add(user) @@ -37,3 +47,29 @@ class UserCRUD: user.updated_at = datetime.now(timezone.utc) await s.flush() return user + + async def agree_terms(self, s: AsyncSession, user_id: uuid.UUID) -> None: + await s.execute(update(User).where(User.user_id == user_id, User.terms_agreed_at.is_(None)).values(terms_agreed_at=datetime.now(timezone.utc))) + + async def withdraw(self, s: AsyncSession, user_id: uuid.UUID) -> None: + """계정과 그 사람이 남긴 좋아요·저장·댓글·신고·차단을 모두 지우고, 게시물·댓글에 쌓인 수를 그만큼 줄인다.""" + liked_posts = (await s.scalars(delete(PostLike).where(PostLike.user_id == user_id).returning(PostLike.post_id))).all() + if liked_posts: + await s.execute(update(Post).where(Post.post_id.in_(liked_posts)).values(like_count=Post.like_count - 1)) + liked_comments = (await s.scalars(delete(CommentLike).where(CommentLike.user_id == user_id).returning(CommentLike.comment_id))).all() + if liked_comments: + await s.execute(update(Comment).where(Comment.comment_id.in_(liked_comments)).values(like_count=Comment.like_count - 1)) + await s.execute(delete(PostSave).where(PostSave.user_id == user_id)) + reported = (await s.scalars(delete(CommentReport).where(CommentReport.user_id == user_id).returning(CommentReport.comment_id))).all() + if reported: + await s.execute(update(Comment).where(Comment.comment_id.in_(reported)).values(report_count=Comment.report_count - 1)) + await s.execute(delete(UserBlock).where((UserBlock.user_id == user_id) | (UserBlock.blocked_id == user_id))) + mine = (await s.execute(delete(Comment).where(Comment.user_id == user_id).returning(Comment.comment_id, Comment.post_id, Comment.deleted, Comment.is_hidden))).all() + if mine: + ids = [c for c, _, _, _ in mine] + await s.execute(delete(CommentLike).where(CommentLike.comment_id.in_(ids))) + await s.execute(delete(CommentReport).where(CommentReport.comment_id.in_(ids))) + # 이미 지웠거나 숨긴 댓글은 댓글 수에서 빠져 있다 + for post_id, n in Counter(p for _, p, deleted, hidden in mine if not deleted and not hidden).items(): + await s.execute(update(Post).where(Post.post_id == post_id).values(comment_count=Post.comment_count - n)) + await s.execute(delete(User).where(User.user_id == user_id)) diff --git a/backend/postgres-init/init.sql b/backend/postgres-init/init.sql index 69bf6cc..5ef7a02 100644 --- a/backend/postgres-init/init.sql +++ b/backend/postgres-init/init.sql @@ -206,18 +206,19 @@ CREATE TABLE IF NOT EXISTS public.card_image ( -- 사람·반응 (좋아요·저장·댓글은 로그인 필요, 보내기는 누구나) --- 사용자. 일반(아이디·비밀번호) 또는 구글 로그인. 이름·전화번호는 받지 않는다. +-- 사용자. 일반(아이디·비밀번호), 구글, 토스(앱인토스) 로그인. 이름·전화번호는 받지 않는다. CREATE TABLE IF NOT EXISTS public.users ( user_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), - provider SMALLINT NOT NULL DEFAULT 1, -- AuthProvider: 1=일반 2=구글 - login_id VARCHAR(64) NOT NULL, -- 일반은 아이디, 구글은 google_ + provider SMALLINT NOT NULL DEFAULT 1, -- AuthProvider: 1=일반 2=구글 3=토스 + login_id VARCHAR(64) NOT NULL, -- 일반은 아이디, 구글은 google_, 토스는 toss_ password VARCHAR(255) NULL, -- bcrypt 해시. 구글 계정은 NULL - provider_uid VARCHAR(255) NULL, -- 구글 sub. 일반 계정은 NULL + provider_uid VARCHAR(255) NULL, -- 구글 sub 또는 토스 userKey. 일반 계정은 NULL nickname VARCHAR(30) NOT NULL, -- 댓글에 보이는 이름 character VARCHAR(20) NOT NULL DEFAULT 'rabbit', -- 프로필 캐릭터: rabbit·bear·dog·sun·moon·cloud color VARCHAR(20) NOT NULL DEFAULT 'orange', -- 프로필 배경색: orange·blue·green·purple·pink·brown mood VARCHAR(20) NULL, -- 오늘 기분: clear·partly·cloudy·rain·thunder·snow·fog·rainbow. NULL = 안 고름 status SMALLINT NOT NULL DEFAULT 1, -- UserStatus: 1=정상 2=정지 + terms_agreed_at TIMESTAMPTZ NULL, -- 이용약관 동의 시각. NULL 이면 댓글을 못 쓴다 token_version SMALLINT NOT NULL DEFAULT 1, -- 올리면 이전 refresh 토큰이 모두 무효 created_at TIMESTAMPTZ NOT NULL DEFAULT now(), updated_at TIMESTAMPTZ NOT NULL DEFAULT now(), @@ -225,6 +226,7 @@ CREATE TABLE IF NOT EXISTS public.users ( ); CREATE UNIQUE INDEX IF NOT EXISTS uq_users_login_id ON public.users (login_id) WHERE deleted = FALSE; CREATE UNIQUE INDEX IF NOT EXISTS uq_users_google ON public.users (provider_uid) WHERE provider = 2 AND deleted = FALSE; +CREATE UNIQUE INDEX IF NOT EXISTS uq_users_toss ON public.users (provider_uid) WHERE provider = 3 AND deleted = FALSE; CREATE TABLE IF NOT EXISTS public.post_like ( post_id BIGINT NOT NULL, @@ -265,16 +267,28 @@ ALTER TABLE public.comment ADD COLUMN IF NOT EXISTS ip_hash VARCHAR(64) NULL; ALTER TABLE public.comment ADD COLUMN IF NOT EXISTS region_name VARCHAR(20) NULL; CREATE INDEX IF NOT EXISTS idx_comment_ip ON public.comment (ip_hash, created_at) WHERE user_id IS NULL; --- 댓글 신고 (보류) --- ALTER TABLE public.comment ADD COLUMN report_count INTEGER NOT NULL DEFAULT 0; --- ALTER TABLE public.comment ADD COLUMN is_hidden BOOLEAN NOT NULL DEFAULT FALSE; --- CREATE TABLE IF NOT EXISTS public.comment_report ( --- comment_id BIGINT NOT NULL, --- user_id UUID NOT NULL, --- reason SMALLINT NOT NULL, -- ReportReason: 1=욕설·비하 2=광고 3=개인정보 노출 4=기타 --- created_at TIMESTAMPTZ NOT NULL DEFAULT now(), --- PRIMARY KEY (comment_id, user_id) --- ); +ALTER TABLE public.users ADD COLUMN IF NOT EXISTS terms_agreed_at TIMESTAMPTZ NULL; +ALTER TABLE public.comment ADD COLUMN IF NOT EXISTS report_count INTEGER NOT NULL DEFAULT 0; +ALTER TABLE public.comment ADD COLUMN IF NOT EXISTS is_hidden BOOLEAN NOT NULL DEFAULT FALSE; -- 신고 3건이면 숨김. 숨긴 댓글은 댓글 수에서 빠진다 + +-- 댓글 신고. 신고한 사람에게는 그 댓글이 바로 안 보인다 +CREATE TABLE IF NOT EXISTS public.comment_report ( + comment_id BIGINT NOT NULL, + user_id UUID NOT NULL, + reason SMALLINT NOT NULL, -- ReportReason: 1=욕설·비하 2=광고 3=개인정보 노출 4=기타 + created_at TIMESTAMPTZ NOT NULL DEFAULT now(), + PRIMARY KEY (comment_id, user_id) +); +CREATE INDEX IF NOT EXISTS idx_comment_report_user ON public.comment_report (user_id); + +-- 사용자 차단. 차단한 사람의 댓글·동네 이야기 글이 내게 안 보인다 +CREATE TABLE IF NOT EXISTS public.user_block ( + user_id UUID NOT NULL, -- 차단한 사람 + blocked_id UUID NOT NULL, -- 차단당한 사람 + created_at TIMESTAMPTZ NOT NULL DEFAULT now(), + PRIMARY KEY (user_id, blocked_id) +); +CREATE INDEX IF NOT EXISTS idx_user_block_blocked ON public.user_block (blocked_id); CREATE TABLE IF NOT EXISTS public.comment_like ( comment_id BIGINT NOT NULL, @@ -342,14 +356,6 @@ CREATE TABLE IF NOT EXISTS public.talk_report ( PRIMARY KEY (talk_id, user_id) ); --- 이 사람 글 안 보기 -CREATE TABLE IF NOT EXISTS public.user_block ( - user_id UUID NOT NULL, - blocked_id UUID NOT NULL, - created_at TIMESTAMPTZ NOT NULL DEFAULT now(), - PRIMARY KEY (user_id, blocked_id) -); - -- 직접 넣는 내용 (처음 값은 저장소의 시드 파일에서 불러온다) -- 구 목록. diff --git a/backend/router/router.py b/backend/router/router.py index 7067797..e35be0a 100644 --- a/backend/router/router.py +++ b/backend/router/router.py @@ -18,6 +18,7 @@ from router.v1.reaction.reaction import router as reaction_router from router.v1.region.region import router as region_router from router.v1.season.season import router as season_router from router.v1.seo.seo import router as seo_router +from router.v1.shorts.shorts import router as shorts_router from router.v1.sky.sky import router as sky_router from router.v1.talk.talk import router as talk_router from router.v1.watch.watch import router as watch_router @@ -53,6 +54,7 @@ app.include_router(image_router) app.include_router(seo_router) app.include_router(card_router) app.include_router(reel_router) +app.include_router(shorts_router) class Res_Health(Res_WebPacketProtocol): diff --git a/backend/router/v1/auth/account.py b/backend/router/v1/auth/account.py index 2320dd9..92ac35d 100644 --- a/backend/router/v1/auth/account.py +++ b/backend/router/v1/auth/account.py @@ -1,18 +1,24 @@ -from fastapi import APIRouter, Depends +import base64 +import binascii +import secrets +from typing import Optional + +from fastapi import APIRouter, Depends, Header, HTTPException from common.auth import current_user from common.database.model.models import User from common.enums import AuthProvider, ErrorType +from common.logger import LOG from common.models.errors import error_info from config.settings import settings -from router.v1.auth.protocol import Me, Req_Google, Req_Login, Req_Refresh, Req_Signup, Req_UpdateMe, Res_Auth, Res_AuthConfig, Res_Logout, Res_Me +from router.v1.auth.protocol import Me, Req_Google, Req_Login, Req_Refresh, Req_Signup, Req_TossLogin, Req_TossUnlink, Req_UpdateMe, Res_Auth, Res_AuthConfig, Res_Logout, Res_Me, Res_TossUnlink, Res_Withdraw from services.auth_service import AuthService router = APIRouter(prefix="/v1/auth", tags=["auth"]) def _me(u: User) -> Me: - return Me(login_id=u.login_id, nickname=u.nickname, character=u.character, color=u.color, mood=u.mood, provider=AuthProvider(u.provider)) + return Me(login_id=u.login_id, nickname=u.nickname, character=u.character, color=u.color, mood=u.mood, provider=AuthProvider(u.provider), terms_agreed=u.terms_agreed_at is not None) def _auth(err: ErrorType, user, service: AuthService) -> Res_Auth: @@ -34,6 +40,32 @@ async def login(req: Req_Login, service: AuthService = Depends()) -> Res_Auth: return _auth(err, user, service) +@router.post("/toss", response_model=Res_Auth, response_model_exclude_none=True, summary="토스 로그인 (앱인토스 TossAuth.login 의 authorizationCode·referrer)") +async def toss(req: Req_TossLogin, service: AuthService = Depends()) -> Res_Auth: + err, user = await service.toss_login(req.authorization_code, req.referrer) + return _auth(err, user, service) + + +def _check_toss_basic(authorization: Optional[str]) -> None: + """콘솔에 넣은 "아이디:비밀번호" 와 같은지 본다. 값이 비어 있으면 모두 거절한다.""" + given = "" + if authorization and authorization.startswith("Basic "): + try: + given = base64.b64decode(authorization.removeprefix("Basic "), validate=True).decode() + except (binascii.Error, UnicodeDecodeError): + given = "" + if not settings.toss_unlink_auth or not secrets.compare_digest(given.encode(), settings.toss_unlink_auth.encode()): + raise HTTPException(status_code=401, detail=ErrorType.AUTH_FAILED.name) + + +@router.post("/toss/unlink", response_model=Res_TossUnlink, response_model_exclude_none=True, summary="토스 연결 끊기 콜백 (토스 서버가 Basic Auth 로 부름)") +async def toss_unlink(req: Req_TossUnlink, authorization: Optional[str] = Header(None), service: AuthService = Depends()) -> Res_TossUnlink: + _check_toss_basic(authorization) + LOG.info(f"[auth] toss unlink: {req.referrer}") + err = await service.toss_unlink(str(req.userKey)) + return Res_TossUnlink() if err is ErrorType.SUCCESS else Res_TossUnlink(result=error_info(err)) + + @router.post("/google", response_model=Res_Auth, response_model_exclude_none=True, summary="구글 로그인 (처음이면 자동 닉네임으로 가입)") async def google_login(req: Req_Google, service: AuthService = Depends()) -> Res_Auth: err, user = await service.google(req.credential) @@ -68,3 +100,17 @@ async def update_me(req: Req_UpdateMe, user: User = Depends(current_user), servi if err is not ErrorType.SUCCESS: return Res_Me(result=error_info(err)) return Res_Me(me=_me(updated)) + + +@router.post("/terms", response_model=Res_Me, response_model_exclude_none=True, summary="이용약관 동의 (댓글 쓰기 전에 한 번)") +async def agree_terms(user: User = Depends(current_user), service: AuthService = Depends()) -> Res_Me: + err, updated = await service.agree_terms(user) + if err is not ErrorType.SUCCESS: + return Res_Me(result=error_info(err)) + return Res_Me(me=_me(updated)) + + +@router.delete("/me", response_model=Res_Withdraw, response_model_exclude_none=True, summary="탈퇴 (계정과 남긴 댓글·좋아요를 모두 지운다)") +async def withdraw(user: User = Depends(current_user), service: AuthService = Depends()) -> Res_Withdraw: + err = await service.withdraw(user) + return Res_Withdraw() if err is ErrorType.SUCCESS else Res_Withdraw(result=error_info(err)) diff --git a/backend/router/v1/auth/protocol.py b/backend/router/v1/auth/protocol.py index b8a3550..5c34c84 100644 --- a/backend/router/v1/auth/protocol.py +++ b/backend/router/v1/auth/protocol.py @@ -17,6 +17,15 @@ class Req_Login(Req_WebPacketProtocol): password: str +class Req_TossLogin(Req_WebPacketProtocol): + authorization_code: str + referrer: str + + +class Req_TossUnlink(Req_WebPacketProtocol): + """토스가 보내는 모양 그대로 (camelCase)""" + userKey: int + referrer: str class Req_Google(Req_WebPacketProtocol): credential: str = Field(min_length=20, max_length=4096, description="구글 로그인 버튼이 준 ID 토큰") @@ -39,6 +48,7 @@ class Me(WebPacketProtocol): color: str mood: Optional[str] = None provider: AuthProvider + terms_agreed: bool = False class Res_Auth(Res_WebPacketProtocol): @@ -47,10 +57,18 @@ class Res_Auth(Res_WebPacketProtocol): me: Optional[Me] = None +class Res_TossUnlink(Res_WebPacketProtocol): + pass + + class Res_Logout(Res_WebPacketProtocol): pass +class Res_Withdraw(Res_WebPacketProtocol): + pass + + class Res_Me(Res_WebPacketProtocol): me: Optional[Me] = None diff --git a/backend/router/v1/reaction/protocol.py b/backend/router/v1/reaction/protocol.py index 411fb5c..25dd97b 100644 --- a/backend/router/v1/reaction/protocol.py +++ b/backend/router/v1/reaction/protocol.py @@ -1,9 +1,10 @@ +import uuid from datetime import date, datetime from typing import Optional from pydantic import Field -from common.enums import PostType +from common.enums import PostType, ReportReason from common.models.gmodel import Req_WebPacketProtocol, Res_WebPacketProtocol, WebPacketProtocol @@ -58,3 +59,18 @@ class Res_Comment(Res_WebPacketProtocol): class Res_CommentLike(Res_WebPacketProtocol): liked: Optional[bool] = None like_count: Optional[int] = None + + +class Req_Report(Req_WebPacketProtocol): + reason: ReportReason + + +class BlockedUser(WebPacketProtocol): + user_id: uuid.UUID + nickname: str + character: str + color: str + + +class Res_BlockedList(Res_WebPacketProtocol): + users: list[BlockedUser] = [] diff --git a/backend/router/v1/reaction/reaction.py b/backend/router/v1/reaction/reaction.py index 302cc61..2647f24 100644 --- a/backend/router/v1/reaction/reaction.py +++ b/backend/router/v1/reaction/reaction.py @@ -1,3 +1,4 @@ +import uuid from typing import Optional from fastapi import APIRouter, Depends, Path, Query @@ -10,7 +11,8 @@ from common.models.errors import error_info from common.models.gmodel import Res_WebPacketProtocol from common.utils.kma_time import KST from router.v1.reaction.protocol import ( - CommentData, Req_Comment, Res_Comment, Res_CommentLike, Res_CommentList, Res_PostLike, Res_PostSave, Res_SavedList, SavedPost, + BlockedUser, CommentData, Req_Comment, Req_Report, Res_BlockedList, Res_Comment, Res_CommentLike, Res_CommentList, Res_PostLike, Res_PostSave, + Res_SavedList, SavedPost, ) from services.reaction_service import PAGE, CommentView, ReactionService @@ -69,7 +71,7 @@ async def list_comments( return Res_CommentList(comments=[_comment(v) for v in items], next_cursor=items[-1].comment.comment_id if len(items) == PAGE else None) -@router.post("/post/{post_id}/comment", response_model=Res_Comment, response_model_exclude_none=True, summary="댓글 쓰기 (60자, 로그인 없으면 '동네 익명'으로 IP 당 하루 20개)") +@router.post("/post/{post_id}/comment", response_model=Res_Comment, response_model_exclude_none=True, summary="댓글 쓰기 (60자, 로그인 없으면 '동네 익명'으로 IP 당 하루 20개, 로그인했는데 이용약관 동의 전이면 TERMS_REQUIRED)") async def add_comment( post_id: int = Path(...), req: Req_Comment = ..., user: Optional[User] = Depends(optional_user), who: Liker = Depends(liker), service: ReactionService = Depends(), ) -> Res_Comment: @@ -95,3 +97,26 @@ async def like_comment(comment_id: int = Path(...), who: Liker = Depends(liker), @router.delete("/comment/{comment_id}/like", response_model=Res_CommentLike, response_model_exclude_none=True, summary="댓글 좋아요 취소") async def unlike_comment(comment_id: int = Path(...), who: Liker = Depends(liker), service: ReactionService = Depends()) -> Res_CommentLike: return await _clike(comment_id, who, False, service) + + +@router.post("/comment/{comment_id}/report", response_model=Res_WebPacketProtocol, response_model_exclude_none=True, summary="남의 댓글 신고 (신고한 사람에겐 바로 안 보이고, 3건이면 모두에게 숨김)") +async def report_comment(comment_id: int = Path(...), req: Req_Report = ..., user: User = Depends(current_user), service: ReactionService = Depends()) -> Res_WebPacketProtocol: + return Res_WebPacketProtocol(result=error_info(await service.report_comment(comment_id, user, req.reason))) + + +@router.post("/comment/{comment_id}/block", response_model=Res_WebPacketProtocol, response_model_exclude_none=True, summary="이 댓글 쓴 사람 차단 (그 사람 댓글이 내게 안 보임)") +async def block_author(comment_id: int = Path(...), user: User = Depends(current_user), service: ReactionService = Depends()) -> Res_WebPacketProtocol: + return Res_WebPacketProtocol(result=error_info(await service.block_author(comment_id, user))) + + +@router.get("/block/list", response_model=Res_BlockedList, response_model_exclude_none=True, summary="내가 차단한 사람") +async def list_blocked(user: User = Depends(current_user), service: ReactionService = Depends()) -> Res_BlockedList: + err, users = await service.blocked(user) + if err is not ErrorType.SUCCESS: + return Res_BlockedList(result=error_info(err)) + return Res_BlockedList(users=[BlockedUser(user_id=u.user_id, nickname=u.nickname, character=u.character, color=u.color) for u in users]) + + +@router.delete("/block/{user_id}", response_model=Res_WebPacketProtocol, response_model_exclude_none=True, summary="차단 풀기") +async def unblock(user_id: uuid.UUID = Path(...), user: User = Depends(current_user), service: ReactionService = Depends()) -> Res_WebPacketProtocol: + return Res_WebPacketProtocol(result=error_info(await service.unblock(user, user_id))) diff --git a/backend/router/v1/shorts/__init__.py b/backend/router/v1/shorts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/router/v1/shorts/protocol.py b/backend/router/v1/shorts/protocol.py new file mode 100644 index 0000000..d49b344 --- /dev/null +++ b/backend/router/v1/shorts/protocol.py @@ -0,0 +1,10 @@ +from common.models.gmodel import Res_WebPacketProtocol, WebPacketProtocol + + +class ShortItem(WebPacketProtocol): + id: str # 유튜브 영상 ID + title: str + + +class Res_ShortList(Res_WebPacketProtocol): + items: list[ShortItem] = [] diff --git a/backend/router/v1/shorts/shorts.py b/backend/router/v1/shorts/shorts.py new file mode 100644 index 0000000..1a2edbd --- /dev/null +++ b/backend/router/v1/shorts/shorts.py @@ -0,0 +1,16 @@ +from fastapi import APIRouter, Depends + +from common.enums import ErrorType +from common.models.errors import error_info +from router.v1.shorts.protocol import Res_ShortList, ShortItem +from services.shorts_service import ShortsService + +router = APIRouter(prefix="/v1/shorts", tags=["shorts"]) + + +@router.get("", response_model=Res_ShortList, response_model_exclude_none=True, summary="오늘 화면 쇼츠 줄: 날씨각 유튜브 채널의 쇼츠, 최신순") +async def list_shorts(service: ShortsService = Depends()) -> Res_ShortList: + err, items = await service.items() + if err is not ErrorType.SUCCESS: + return Res_ShortList(result=error_info(err)) + return Res_ShortList(items=[ShortItem(**i) for i in items]) diff --git a/backend/scheduler/jobs.py b/backend/scheduler/jobs.py index 1a76ea3..8c83898 100644 --- a/backend/scheduler/jobs.py +++ b/backend/scheduler/jobs.py @@ -21,6 +21,7 @@ from services.external.culture_api import SIDO_NAME from services.external.data_go_kr import DataGoKrNotConfigured, DataGoKrRequestFailed from services.external.open_meteo import OpenMeteoRequestFailed, fetch_weather, parse_weather from services.feed_service import build_feed_day, clear_feed_cache +from services.shorts_service import ShortsService from services.week_service import collect_events, drop_known from services.weekend_rank import WeekendRank @@ -188,3 +189,10 @@ async def refresh_events(only_if_missing: bool = False) -> ErrorType: LOG.error(f"[scheduler] refresh_events done mark: {e}") LOG.info(f"[scheduler] refresh_events: {detail}") return ErrorType.SUCCESS if ok else ErrorType.EXTERNAL_API_ERROR + + +async def refresh_shorts() -> ErrorType: + """오늘 화면 쇼츠 줄 목록을 유튜브에서 새로 받아 둔다.""" + err, items = await ShortsService().refresh() + LOG.info(f"[scheduler] refresh_shorts: {len(items)}개 {err.name}") + return err diff --git a/backend/scripts/moderate.py b/backend/scripts/moderate.py new file mode 100644 index 0000000..c71187d --- /dev/null +++ b/backend/scripts/moderate.py @@ -0,0 +1,64 @@ +"""운영자용 댓글·사용자 조치. + + python scripts/moderate.py reports 신고 받은 댓글 (많은 순 30개) + python scripts/moderate.py hide 댓글 숨김 + python scripts/moderate.py show 숨긴 댓글 되살림 + python scripts/moderate.py suspend 이용 정지 (로그인·토큰 막힘) + python scripts/moderate.py resume 정지 풀기 +""" +import asyncio +import os +import sys + +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from sqlalchemy import select, update # noqa: E402 + +from common.database.db_session_manager import DB_SESSION_MNG # noqa: E402 +from common.database.model.models import Comment, User # noqa: E402 +from common.enums import ErrorType # noqa: E402 +from crud.reaction_crud import ReactionCRUD # noqa: E402 + + +async def _reports(s): + stmt = ( + select(Comment.comment_id, Comment.report_count, Comment.is_hidden, User.login_id, Comment.body) + .join(User, User.user_id == Comment.user_id) + .where(Comment.report_count > 0, Comment.deleted.is_(False)) + .order_by(Comment.report_count.desc(), Comment.comment_id.desc()) + .limit(30) + ) + return (await s.execute(stmt)).all() + + +async def _set_status(s, login_id: str, status: int) -> bool: + res = await s.execute( + update(User).where(User.login_id == login_id, User.deleted.is_(False)).values(status=status, token_version=User.token_version + 1).returning(User.user_id) + ) + return res.first() is not None + + +async def main(argv: list[str]) -> int: + if len(argv) < 1 or argv[0] not in {"reports", "hide", "show", "suspend", "resume"} or (argv[0] != "reports" and len(argv) != 2): + print(__doc__) + return 2 + cmd = argv[0] + if cmd == "reports": + err, rows = await DB_SESSION_MNG.execute_lambda(_reports) + for comment_id, count, hidden, login_id, body in rows or []: + print(f"{comment_id}\t신고 {count}\t{'숨김' if hidden else '보임'}\t{login_id}\t{body}") + elif cmd in {"hide", "show"}: + err, ok = await DB_SESSION_MNG.execute_lambda_write(lambda s: ReactionCRUD().set_hidden(s, int(argv[1]), cmd == "hide")) + print("바뀜" if ok else "그대로 (없는 댓글이거나 이미 그 상태)") + else: + err, ok = await DB_SESSION_MNG.execute_lambda_write(lambda s: _set_status(s, argv[1], 2 if cmd == "suspend" else 1)) + print("바뀜" if ok else "없는 아이디") + await DB_SESSION_MNG.stop() + if err is not ErrorType.SUCCESS: + print(err.name) + return 1 + return 0 + + +if __name__ == "__main__": + sys.exit(asyncio.run(main(sys.argv[1:]))) diff --git a/backend/services/auth_service.py b/backend/services/auth_service.py index f2ac119..f2cc309 100644 --- a/backend/services/auth_service.py +++ b/backend/services/auth_service.py @@ -9,9 +9,11 @@ from common.auth import PASSWORD_MAX_BYTES, decode, hash_password, issue_tokens, from common.database.db_session_manager import DB_SESSION_MNG from common.google_id import verify as verify_google from common.database.model.models import User -from common.enums import ErrorType +from common.enums import AuthProvider, ErrorType +from common.logger import LOG from config.settings import settings from crud.user_crud import UserCRUD +from services.external import toss_login LOGIN_ID = re.compile(r"^[a-z0-9_]{4,20}$") PASSWORD_MIN = 8 @@ -19,6 +21,7 @@ NICKNAME = re.compile(r"^\S.{0,10}\S$") CHARACTERS = ("rabbit", "bear", "dog", "sun", "moon", "cloud") COLORS = ("orange", "blue", "green", "purple", "pink", "brown") MOODS = ("clear", "partly", "cloudy", "rain", "thunder", "snow", "fog", "rainbow") +TOSS_REFERRERS = ("DEFAULT", "SANDBOX") _NICK_WORDS = ("맑은", "포근한", "산들", "반짝", "느긋한", "보슬", "선선한", "따끈한") @@ -58,6 +61,32 @@ class AuthService: return ErrorType.AUTH_FAILED, None return ErrorType.SUCCESS, user + async def toss_login(self, authorization_code: str, referrer: str) -> tuple[ErrorType, Optional[User]]: + """토스 userKey 로 계정을 찾고, 없으면 만든다. 이름·전화번호 같은 개인정보는 받지 않는다.""" + if not authorization_code or referrer not in TOSS_REFERRERS: + return ErrorType.INVALID_INPUT, None + try: + key = str(await toss_login.user_key(authorization_code, referrer)) + except toss_login.TossLoginError as e: + LOG.error(f"[auth] toss login: {e}") + return ErrorType.AUTH_FAILED, None + provider = AuthProvider.TOSS.value + err, user = await DB_SESSION_MNG.execute_lambda(lambda s: self.crud.by_provider_uid(s, provider, key)) + if err is not ErrorType.SUCCESS: + return err, None + if user is None: + err, user = await DB_SESSION_MNG.execute_lambda_write( + lambda s: self.crud.create_social(s, provider, key, f"toss_{key}", f"토스{key[-4:]}") + ) + if err is not ErrorType.SUCCESS: + # 같은 사람이 동시에 두 번 들어온 경우 먼저 만든 계정을 쓴다 + err, user = await DB_SESSION_MNG.execute_lambda(lambda s: self.crud.by_provider_uid(s, provider, key)) + if err is not ErrorType.SUCCESS or user is None: + return err if err is not ErrorType.SUCCESS else ErrorType.DB_ERROR, None + if user.status != 1: + return ErrorType.AUTH_FAILED, None + return ErrorType.SUCCESS, user + async def google(self, credential: str) -> tuple[ErrorType, Optional[User]]: """구글 ID 토큰으로 로그인. 처음이면 자동 닉네임으로 계정을 만든다. 구글 이름·이메일은 저장하지 않는다.""" sub = await verify_google(credential) @@ -78,6 +107,13 @@ class AuthService: return ErrorType.AUTH_FAILED, None return ErrorType.SUCCESS, user + async def toss_unlink(self, user_key: str) -> ErrorType: + """토스에서 연결을 끊으면 그 계정의 모든 토큰을 무효로 만든다. 계정이 없어도 성공으로 본다.""" + err, user = await DB_SESSION_MNG.execute_lambda(lambda s: self.crud.by_provider_uid(s, AuthProvider.TOSS.value, user_key)) + if err is not ErrorType.SUCCESS or user is None: + return err + return await self.logout(user) + async def refresh(self, refresh_token: str) -> tuple[ErrorType, Optional[User]]: claims = decode(refresh_token, settings.jwt_refresh_secret, "refresh") if claims is None: @@ -91,6 +127,16 @@ class AuthService: """이 사용자의 모든 기기 토큰을 무효로 만든다.""" return await DB_SESSION_MNG.execute_lambda_run([lambda s: self.crud.update(s, user.user_id, {"token_version": user.token_version + 1})]) + async def agree_terms(self, user: User) -> tuple[ErrorType, Optional[User]]: + err = await DB_SESSION_MNG.execute_lambda_run([lambda s: self.crud.agree_terms(s, user.user_id)]) + if err is not ErrorType.SUCCESS: + return err, None + return await DB_SESSION_MNG.execute_lambda(lambda s: self.crud.get(s, user.user_id)) + + async def withdraw(self, user: User) -> ErrorType: + """탈퇴: 계정과 남긴 댓글·좋아요를 한 번에 지운다. 계정이 없어지니 가진 토큰도 바로 못 쓴다.""" + return await DB_SESSION_MNG.execute_lambda_run([lambda s: self.crud.withdraw(s, user.user_id)]) + async def update_me(self, user: User, nickname: Optional[str], character: Optional[str], color: Optional[str] = None, mood: Optional[str] = None) -> tuple[ErrorType, Optional[User]]: """닉네임·캐릭터·배경색·기분 중 보낸 것만 바꾼다. 기분을 빈 문자열로 보내면 지운다.""" values: dict = {} diff --git a/backend/services/external/toss_login.py b/backend/services/external/toss_login.py new file mode 100644 index 0000000..f39c902 --- /dev/null +++ b/backend/services/external/toss_login.py @@ -0,0 +1,52 @@ +import ssl +from functools import lru_cache + +import httpx + +from common.logger import LOG +from config.settings import settings + +TIMEOUT_SEC = 10.0 +_PATH = "/api-partner/v1/apps-in-toss/user/oauth2" + + +class TossLoginError(Exception): + pass + + +@lru_cache(maxsize=1) +def _mtls() -> ssl.SSLContext: + if not settings.toss_mtls_cert or not settings.toss_mtls_key: + raise TossLoginError("TOSS_MTLS_CERT / TOSS_MTLS_KEY is empty") + ctx = ssl.create_default_context() + ctx.load_cert_chain(settings.toss_mtls_cert, settings.toss_mtls_key) + return ctx + + +def _success(res: httpx.Response, step: str) -> dict: + """토스는 업무 오류도 HTTP 200 + resultType=FAIL 로 준다. 로그에 토큰·개인정보를 남기지 않는다.""" + res.raise_for_status() + body = res.json() + if body.get("resultType") != "SUCCESS": + err = body.get("error") + code = err.get("errorCode") if isinstance(err, dict) else err + raise TossLoginError(f"{step} failed: {code}") + return body["success"] + + +async def user_key(authorization_code: str, referrer: str) -> int: + """앱에서 받은 인가 코드로 토스 토큰을 받고, 그 토큰으로 이 앱 전용 사용자 키(userKey)만 읽는다.""" + try: + async with httpx.AsyncClient(base_url=settings.toss_api_base, verify=_mtls(), timeout=TIMEOUT_SEC, follow_redirects=False) as client: + token = _success( + await client.post(f"{_PATH}/generate-token", json={"authorizationCode": authorization_code, "referrer": referrer}), + "generate-token", + ) + me = _success( + await client.get(f"{_PATH}/login-me", headers={"Authorization": f"Bearer {token['accessToken']}"}), + "login-me", + ) + return int(me["userKey"]) + except (httpx.HTTPError, ssl.SSLError, OSError, KeyError, ValueError) as e: + LOG.error(f"[toss] login failed: {type(e).__name__}") + raise TossLoginError(type(e).__name__) from None diff --git a/backend/services/external/youtube.py b/backend/services/external/youtube.py new file mode 100644 index 0000000..b7999c7 --- /dev/null +++ b/backend/services/external/youtube.py @@ -0,0 +1,55 @@ +import re +from typing import Optional + +import httpx + +# YouTube Data API v3 (API 키). 채널 업로드 목록 → 영상 정보로 쇼츠만 고른다 +API_URL = "https://www.googleapis.com/youtube/v3" +# 키 없이 영상 제목만 받을 때 +OEMBED_URL = "https://www.youtube.com/oembed" +SHORT_MAX_SEC = 180 # 쇼츠는 3분 이하 + +_DURATION = re.compile(r"^PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?$") + + +def seconds(iso: str) -> Optional[int]: + """ISO 8601 길이("PT1M5S") → 초. 형식이 다르면 None.""" + m = _DURATION.match(iso or "") + if not m: + return None + h, mi, s = (int(g or 0) for g in m.groups()) + return h * 3600 + mi * 60 + s + + +async def channel_shorts(client: httpx.AsyncClient, key: str, channel_id: str, limit: int) -> list[dict]: + """채널의 공개·퍼가기 허용 쇼츠 [{id, title, published}], 최신순.""" + res = await client.get(f"{API_URL}/channels", params={"part": "contentDetails", "id": channel_id, "key": key}) + res.raise_for_status() + channels = res.json().get("items") or [] + if not channels: + return [] + uploads = channels[0]["contentDetails"]["relatedPlaylists"]["uploads"] + res = await client.get(f"{API_URL}/playlistItems", params={"part": "contentDetails", "playlistId": uploads, "maxResults": 50, "key": key}) + res.raise_for_status() + ids = [i["contentDetails"]["videoId"] for i in res.json().get("items") or []] + if not ids: + return [] + res = await client.get(f"{API_URL}/videos", params={"part": "snippet,contentDetails,status", "id": ",".join(ids), "key": key}) + res.raise_for_status() + found = [] + for v in res.json().get("items") or []: + status, sec = v.get("status", {}), seconds(v["contentDetails"].get("duration", "")) + if status.get("privacyStatus") != "public" or not status.get("embeddable") or sec is None or sec > SHORT_MAX_SEC: + continue + found.append({"id": v["id"], "title": v["snippet"]["title"], "published": v["snippet"]["publishedAt"]}) + found.sort(key=lambda x: x["published"], reverse=True) + return found[:limit] + + +async def video_title(client: httpx.AsyncClient, video_id: str) -> Optional[str]: + """영상 제목. 없거나 퍼가기가 막힌 영상이면 None.""" + res = await client.get(OEMBED_URL, params={"url": f"https://www.youtube.com/shorts/{video_id}", "format": "json"}) + if res.status_code in (401, 403, 404): + return None + res.raise_for_status() + return res.json().get("title") diff --git a/backend/services/reaction_service.py b/backend/services/reaction_service.py index a0e7454..f651ef6 100644 --- a/backend/services/reaction_service.py +++ b/backend/services/reaction_service.py @@ -1,3 +1,4 @@ +import uuid from dataclasses import dataclass from datetime import datetime from typing import Optional @@ -6,7 +7,7 @@ from fastapi import Depends from common.database.db_session_manager import DB_SESSION_MNG from common.database.model.models import Comment, Post, User -from common.enums import ErrorType +from common.enums import ErrorType, ReportReason from common.liker import Liker from common.utils.kma_time import kst_midnight, now_kst from crud.feed_crud import FeedCRUD @@ -92,7 +93,7 @@ class ReactionService: return CommentView(comment=c, nickname=nickname or "", character=character or ANON_CHARACTER, color=color or ANON_COLOR, mood=mood, liked=liked, mine=c.user_id == who.user_id) async def comments(self, post_id: int, user: Optional[User], ip_hash: str, cursor: Optional[int]) -> tuple[ErrorType, list[CommentView]]: - err, rows = await DB_SESSION_MNG.execute_lambda(lambda s: self.crud.comments(s, post_id, cursor, PAGE)) + err, rows = await DB_SESSION_MNG.execute_lambda(lambda s: self.crud.comments(s, post_id, user.user_id if user else None, cursor, PAGE)) if err is not ErrorType.SUCCESS: return err, [] liked: set[int] = set() @@ -109,6 +110,8 @@ class ReactionService: body = body.strip() if not body or len(body) > COMMENT_MAX: return ErrorType.INVALID_INPUT, None + if user is not None and user.terms_agreed_at is None: + return ErrorType.TERMS_REQUIRED, None err = await self._post_exists(post_id) if err is not ErrorType.SUCCESS: return err, None @@ -145,3 +148,37 @@ class ReactionService: if err is not ErrorType.SUCCESS: return err, None return (ErrorType.NOT_FOUND, None) if count is None else (ErrorType.SUCCESS, count) + + async def _others_comment(self, comment_id: int, user: User) -> tuple[ErrorType, Optional[uuid.UUID]]: + """남이 쓴, 지금 보이는 댓글의 작성자. 내 댓글이면 INVALID_INPUT, 로그인 없이 쓴 댓글이면 작성자는 None.""" + err, author = await DB_SESSION_MNG.execute_lambda(lambda s: self.crud.comment_author(s, comment_id)) + if err is not ErrorType.SUCCESS: + return err, None + if author is None: + return ErrorType.NOT_FOUND, None + return (ErrorType.INVALID_INPUT, None) if author.user_id == user.user_id else (ErrorType.SUCCESS, author.user_id) + + async def report_comment(self, comment_id: int, user: User, reason: ReportReason) -> ErrorType: + err, _ = await self._others_comment(comment_id, user) + if err is not ErrorType.SUCCESS: + return err + return await DB_SESSION_MNG.execute_lambda_run([lambda s: self.crud.report_comment(s, comment_id, user.user_id, reason.value)]) + + async def block_author(self, comment_id: int, user: User) -> ErrorType: + err, author = await self._others_comment(comment_id, user) + if err is not ErrorType.SUCCESS: + return err + # 로그인 없이 쓴 댓글은 차단할 사람이 없어 신고만 받는다 + if author is None: + return ErrorType.INVALID_INPUT + return await DB_SESSION_MNG.execute_lambda_run([lambda s: self.crud.block(s, user.user_id, author)]) + + async def unblock(self, user: User, blocked_id: uuid.UUID) -> ErrorType: + err, ok = await DB_SESSION_MNG.execute_lambda_write(lambda s: self.crud.unblock(s, user.user_id, blocked_id)) + if err is not ErrorType.SUCCESS: + return err + return ErrorType.SUCCESS if ok else ErrorType.NOT_FOUND + + async def blocked(self, user: User) -> tuple[ErrorType, list[User]]: + err, users = await DB_SESSION_MNG.execute_lambda(lambda s: self.crud.blocked(s, user.user_id)) + return err, users or [] diff --git a/backend/services/shorts_service.py b/backend/services/shorts_service.py new file mode 100644 index 0000000..30f27ea --- /dev/null +++ b/backend/services/shorts_service.py @@ -0,0 +1,51 @@ +import asyncio +import json + +import httpx +from redis.exceptions import RedisError + +from common.cache.redis_client import REDIS +from common.enums import ErrorType +from common.logger import LOG +from config.settings import settings +from services.external import youtube + +CACHE_KEY = "shorts:list" +# 워커가 하루 3번(07·12·18시 10분) 새로 받는다. 한 번 실패해도 다음 회차까지 이전 목록을 쓰게 넉넉히 둔다 +CACHE_SEC = 2 * 86400 +MAX_ITEMS = 10 + + +class ShortsService: + async def items(self) -> tuple[ErrorType, list[dict]]: + """오늘 화면 쇼츠 줄 [{id, title}]. 워커가 받아 둔 목록을 읽고, 없을 때만(처음 켰을 때) 바로 받는다.""" + try: + cached = await REDIS.conn.get(CACHE_KEY) + except RedisError as e: + LOG.error(f"[shorts] cache get: {e}") + cached = None + if cached: + return ErrorType.SUCCESS, json.loads(cached) + return await self.refresh() + + async def refresh(self) -> tuple[ErrorType, list[dict]]: + """유튜브에서 새로 받아 캐시에 둔다. API 키가 있으면 채널에서, 없으면 설정의 영상 ID 목록으로.""" + try: + async with httpx.AsyncClient(timeout=10) as client: + items = await self._fetch(client) + except (httpx.HTTPError, KeyError, ValueError) as e: + LOG.error(f"[shorts] fetch: {e}") + return ErrorType.EXTERNAL_API_ERROR, [] + try: + await REDIS.conn.set(CACHE_KEY, json.dumps(items, ensure_ascii=False), ex=CACHE_SEC) + except RedisError as e: + LOG.error(f"[shorts] cache set: {e}") + return ErrorType.SUCCESS, items + + async def _fetch(self, client: httpx.AsyncClient) -> list[dict]: + if settings.youtube_api_key: + found = await youtube.channel_shorts(client, settings.youtube_api_key, settings.youtube_channel_id, MAX_ITEMS) + return [{"id": v["id"], "title": v["title"]} for v in found] + ids = [i.strip() for i in settings.youtube_shorts.split(",") if i.strip()][:MAX_ITEMS] + titles = await asyncio.gather(*(youtube.video_title(client, i) for i in ids)) + return [{"id": i, "title": t} for i, t in zip(ids, titles) if t] diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py index 2791b02..b51c635 100644 --- a/backend/tests/conftest.py +++ b/backend/tests/conftest.py @@ -43,7 +43,7 @@ def anyio_backend(): _VOLATILE = ( "weather_hourly", "weather_daily", "cloud_hourly", "openmeteo_hourly", "air_station", "air_quality", "weather_warning", "sun_time", - "sky_score", "index_score", "post", "post_like", "post_like_anon", "post_save", "comment", "comment_like", "comment_like_anon", "holiday", "solar_term", "users", "card_set", "card_image", "reel", + "sky_score", "index_score", "post", "post_like", "post_like_anon", "post_save", "comment", "comment_like", "comment_like_anon", "comment_report", "user_block", "holiday", "solar_term", "users", "card_set", "card_image", "reel", ) diff --git a/backend/tests/test_anon_like.py b/backend/tests/test_anon_like.py index 98072bb..2edf9d2 100644 --- a/backend/tests/test_anon_like.py +++ b/backend/tests/test_anon_like.py @@ -14,7 +14,9 @@ def client(): async def _login(c, login_id: str) -> dict: body = (await c.post("/v1/auth/signup", json={"login_id": login_id, "password": "password1", "nickname": login_id})).json() - return {"Authorization": f"Bearer {body['access_token']}"} + h = {"Authorization": f"Bearer {body['access_token']}"} + await c.post("/v1/auth/terms", headers=h) # 로그인한 사람은 약관에 동의해야 댓글을 쓴다 + return h @pytest.mark.anyio @@ -147,3 +149,26 @@ async def test_hero_tomorrow_and_tomorrow_slots(offline): assert set(hero["tomorrow"]["weather_slots"]) <= {"morning", "day", "evening", "night"} res = (await c.get("/v1/weather/today", params={"region": REGION, "day": "tomorrow"})).json() assert res["day"] == hero["tomorrow"]["day"] + + +@pytest.mark.anyio +async def test_anon_comment_can_be_reported_not_blocked(offline): + """로그인 없이 쓴 댓글도 신고는 되고(신고한 사람에겐 숨김), 차단할 사람이 없어 차단은 안 된다. 다른 사람을 차단해도 익명 댓글은 그대로 보인다.""" + async with client() as c: + post_id = (await c.get("/v1/feed", params={"region": REGION})).json()["posts"][0]["post_id"] + url = f"/v1/reaction/post/{post_id}/comment" + listing = f"{url}/list" + anon_id = (await c.post(url, headers=IP_A, json={"body": "익명 댓글"})).json()["comment"]["comment_id"] + writer = await _login(c, "anon_mod_01") + writer_id = (await c.post(url, headers=writer, json={"body": "회원 댓글"})).json()["comment"]["comment_id"] + viewer = await _login(c, "anon_mod_02") + + blocked = (await c.post(f"/v1/reaction/comment/{writer_id}/block", headers=viewer)).json() + assert blocked["result"]["success"] is True + ids = [x["comment_id"] for x in (await c.get(listing, headers=viewer)).json()["comments"]] + assert anon_id in ids and writer_id not in ids + + assert (await c.post(f"/v1/reaction/comment/{anon_id}/block", headers=viewer)).json()["result"]["desc"] == "INVALID_INPUT" + assert (await c.post(f"/v1/reaction/comment/{anon_id}/report", headers=viewer, json={"reason": 1})).json()["result"]["success"] is True + assert anon_id not in [x["comment_id"] for x in (await c.get(listing, headers=viewer)).json()["comments"]] + assert anon_id in [x["comment_id"] for x in (await c.get(listing, headers=IP_B)).json()["comments"]] diff --git a/backend/tests/test_auth_reaction.py b/backend/tests/test_auth_reaction.py index 50ba209..1cbd838 100644 --- a/backend/tests/test_auth_reaction.py +++ b/backend/tests/test_auth_reaction.py @@ -10,8 +10,12 @@ def client(): return AsyncClient(transport=ASGITransport(app=app), base_url="http://test") -async def _signup(c, login_id="mina_01", nickname="망원동주민"): - return (await c.post("/v1/auth/signup", json={"login_id": login_id, "password": "password1", "nickname": nickname})).json() +async def _signup(c, login_id="mina_01", nickname="망원동주민", agree=True): + """가입하고, 댓글을 쓸 수 있게 이용약관에도 동의한다 (agree=False 면 안 함).""" + body = (await c.post("/v1/auth/signup", json={"login_id": login_id, "password": "password1", "nickname": nickname})).json() + if agree and body.get("access_token"): + await c.post("/v1/auth/terms", headers={"Authorization": f"Bearer {body['access_token']}"}) + return body @pytest.mark.anyio @@ -122,3 +126,118 @@ async def test_logout_invalidates_access_and_refresh_tokens(): assert (await c.post("/v1/auth/refresh", json={"refresh_token": body["refresh_token"]})).json()["result"]["desc"] == "AUTH_TOKEN_INVALID" again = (await c.post("/v1/auth/login", json={"login_id": "mina_out", "password": "password1"})).json() assert (await c.get("/v1/auth/me", headers={"Authorization": f"Bearer {again['access_token']}"})).status_code == 200 + + +@pytest.mark.anyio +async def test_withdraw_deletes_account_and_reactions(offline): + async with client() as c: + body = await _signup(c, login_id="mina_bye") + h = {"Authorization": f"Bearer {body['access_token']}"} + other = {"Authorization": f"Bearer {(await _signup(c, 'other_bye', '남는사람'))['access_token']}"} + post_id = (await c.get("/v1/feed", params={"region": REGION})).json()["posts"][0]["post_id"] + await c.post(f"/v1/reaction/post/{post_id}/like", headers=h) + await c.post(f"/v1/reaction/post/{post_id}/save", headers=h) + mine = (await c.post(f"/v1/reaction/post/{post_id}/comment", headers=h, json={"body": "곧 떠나요"})).json()["comment"] + kept = (await c.post(f"/v1/reaction/post/{post_id}/comment", headers=other, json={"body": "남아요"})).json()["comment"] + await c.post(f"/v1/reaction/comment/{kept['comment_id']}/like", headers=h) + await c.post(f"/v1/reaction/comment/{mine['comment_id']}/like", headers=other) + + assert (await c.delete("/v1/auth/me")).status_code == 401 + assert (await c.delete("/v1/auth/me", headers=h)).json()["result"]["success"] is True + + assert (await c.get("/v1/auth/me", headers=h)).status_code == 401 + assert (await c.post("/v1/auth/refresh", json={"refresh_token": body["refresh_token"]})).json()["result"]["desc"] == "AUTH_TOKEN_INVALID" + assert (await c.post("/v1/auth/login", json={"login_id": "mina_bye", "password": "password1"})).json()["result"]["desc"] == "AUTH_FAILED" + comments = (await c.get(f"/v1/reaction/post/{post_id}/comment/list")).json()["comments"] + assert [x["body"] for x in comments] == ["남아요"] and comments[0]["like_count"] == 0 + p = next(x for x in (await c.get("/v1/feed", params={"region": REGION})).json()["posts"] if x["post_id"] == post_id) + assert p["like_count"] == 0 and p["comment_count"] == 1 + # 같은 아이디로 다시 가입할 수 있다 + assert (await _signup(c, login_id="mina_bye"))["result"]["success"] is True + + +def _h(body): + return {"Authorization": f"Bearer {body['access_token']}"} + + +async def _comment(c, post_id, h, text): + return (await c.post(f"/v1/reaction/post/{post_id}/comment", headers=h, json={"body": text})).json() + + +async def _bodies(c, post_id, h=None): + return [x["body"] for x in (await c.get(f"/v1/reaction/post/{post_id}/comment/list", headers=h or {})).json()["comments"]] + + +@pytest.mark.anyio +async def test_comment_needs_terms_agreement(offline): + async with client() as c: + h = _h(await _signup(c, agree=False)) + post_id = (await c.get("/v1/feed", params={"region": REGION})).json()["posts"][0]["post_id"] + assert (await c.get("/v1/auth/me", headers=h)).json()["me"]["terms_agreed"] is False + assert (await _comment(c, post_id, h, "안녕"))["result"]["desc"] == "TERMS_REQUIRED" + assert (await c.post("/v1/auth/terms", headers=h)).json()["me"]["terms_agreed"] is True + assert (await _comment(c, post_id, h, "안녕"))["comment"]["body"] == "안녕" + + +@pytest.mark.anyio +async def test_report_hides_for_reporter_then_for_all_at_three(offline): + async with client() as c: + writer = _h(await _signup(c, "writer_1", "쓴사람")) + r = [_h(await _signup(c, f"reporter_{i}", f"신고자{i}")) for i in range(3)] + post_id = (await c.get("/v1/feed", params={"region": REGION})).json()["posts"][0]["post_id"] + bad = (await _comment(c, post_id, writer, "광고입니다"))["comment"] + url = f"/v1/reaction/comment/{bad['comment_id']}/report" + + assert (await c.post(url, headers=writer, json={"reason": 2})).json()["result"]["desc"] == "INVALID_INPUT" + assert (await c.post(url, headers=r[0], json={"reason": 9})).status_code == 422 + assert (await c.post(url, headers=r[0], json={"reason": 2})).json()["result"]["success"] is True + assert (await c.post(url, headers=r[0], json={"reason": 2})).json()["result"]["success"] is True # 두 번 신고해도 한 번 + assert await _bodies(c, post_id, r[0]) == [] and await _bodies(c, post_id, r[1]) == ["광고입니다"] + + await c.post(url, headers=r[1], json={"reason": 1}) + assert await _bodies(c, post_id) == ["광고입니다"] + await c.post(url, headers=r[2], json={"reason": 1}) + assert await _bodies(c, post_id) == [] and await _bodies(c, post_id, writer) == [] + p = next(x for x in (await c.get("/v1/feed", params={"region": REGION})).json()["posts"] if x["post_id"] == post_id) + assert p["comment_count"] == 0 + # 숨긴 댓글을 지워도 댓글 수가 한 번 더 줄지 않는다 + assert (await c.delete(f"/v1/reaction/comment/{bad['comment_id']}", headers=writer)).json()["result"]["success"] is True + p = next(x for x in (await c.get("/v1/feed", params={"region": REGION})).json()["posts"] if x["post_id"] == post_id) + assert p["comment_count"] == 0 + + +@pytest.mark.anyio +async def test_block_hides_author_comments_and_can_be_undone(offline): + async with client() as c: + me = _h(await _signup(c)) + other = _h(await _signup(c, "rude_1", "무례한")) + post_id = (await c.get("/v1/feed", params={"region": REGION})).json()["posts"][0]["post_id"] + rude = (await _comment(c, post_id, other, "흥"))["comment"] + mine = (await _comment(c, post_id, me, "좋아요"))["comment"] + + assert (await c.post(f"/v1/reaction/comment/{mine['comment_id']}/block", headers=me)).json()["result"]["desc"] == "INVALID_INPUT" + assert (await c.post(f"/v1/reaction/comment/{rude['comment_id']}/block")).status_code == 401 + assert (await c.post(f"/v1/reaction/comment/{rude['comment_id']}/block", headers=me)).json()["result"]["success"] is True + assert await _bodies(c, post_id, me) == ["좋아요"] and await _bodies(c, post_id) == ["흥", "좋아요"] + + blocked = (await c.get("/v1/reaction/block/list", headers=me)).json()["users"] + assert [u["nickname"] for u in blocked] == ["무례한"] + assert (await c.delete(f"/v1/reaction/block/{blocked[0]['user_id']}", headers=me)).json()["result"]["success"] is True + assert (await c.delete(f"/v1/reaction/block/{blocked[0]['user_id']}", headers=me)).json()["result"]["desc"] == "NOT_FOUND" + assert await _bodies(c, post_id, me) == ["흥", "좋아요"] + + +@pytest.mark.anyio +async def test_withdraw_removes_reports_and_blocks(offline): + async with client() as c: + leaver = _h(await _signup(c, "leaver_1", "떠날사람")) + stay = _h(await _signup(c, "stay_1", "남는사람")) + post_id = (await c.get("/v1/feed", params={"region": REGION})).json()["posts"][0]["post_id"] + kept = (await _comment(c, post_id, stay, "남아요"))["comment"] + gone = (await _comment(c, post_id, leaver, "떠나요"))["comment"] + await c.post(f"/v1/reaction/comment/{kept['comment_id']}/report", headers=leaver, json={"reason": 4}) + await c.post(f"/v1/reaction/comment/{kept['comment_id']}/block", headers=leaver) + await c.post(f"/v1/reaction/comment/{gone['comment_id']}/block", headers=stay) + assert (await c.delete("/v1/auth/me", headers=leaver)).json()["result"]["success"] is True + assert (await c.get("/v1/reaction/block/list", headers=stay)).json()["users"] == [] + assert await _bodies(c, post_id, stay) == ["남아요"] diff --git a/backend/tests/test_auth_toss.py b/backend/tests/test_auth_toss.py new file mode 100644 index 0000000..78587b8 --- /dev/null +++ b/backend/tests/test_auth_toss.py @@ -0,0 +1,87 @@ +import base64 + +import httpx +import pytest +from httpx import ASGITransport, AsyncClient + +from config.settings import settings +from router.router import app +from services.external import toss_login + + +def client(): + return AsyncClient(transport=ASGITransport(app=app), base_url="http://test") + + +@pytest.fixture +def toss(monkeypatch): + """토스 서버 대신 코드별로 정해 둔 userKey 를 돌려준다.""" + keys = {"code-a": 1234567, "code-b": 7654321} + + async def fake_user_key(code: str, referrer: str) -> int: + if code not in keys: + raise toss_login.TossLoginError("generate-token failed: invalid_grant") + return keys[code] + + monkeypatch.setattr(toss_login, "user_key", fake_user_key) + monkeypatch.setattr(settings, "toss_unlink_auth", "toss:unlink-secret") + + +def _basic(value: str) -> dict: + return {"Authorization": "Basic " + base64.b64encode(value.encode()).decode()} + + +@pytest.mark.anyio +async def test_toss_login_creates_once_and_reuses(toss): + async with client() as c: + first = (await c.post("/v1/auth/toss", json={"authorization_code": "code-a", "referrer": "SANDBOX"})).json() + again = (await c.post("/v1/auth/toss", json={"authorization_code": "code-a", "referrer": "DEFAULT"})).json() + other = (await c.post("/v1/auth/toss", json={"authorization_code": "code-b", "referrer": "DEFAULT"})).json() + me = (await c.get("/v1/auth/me", headers={"Authorization": f"Bearer {first['access_token']}"})).json() + assert first["result"]["success"] is True and first["me"]["provider"] == 3 + assert first["me"]["login_id"] == again["me"]["login_id"] == "toss_1234567" + assert other["me"]["login_id"] == "toss_7654321" + assert me["me"]["login_id"] == "toss_1234567" + + +@pytest.mark.anyio +async def test_toss_login_rejects_bad_code_and_referrer(toss): + async with client() as c: + bad_code = (await c.post("/v1/auth/toss", json={"authorization_code": "nope", "referrer": "DEFAULT"})).json() + bad_ref = (await c.post("/v1/auth/toss", json={"authorization_code": "code-a", "referrer": "WEB"})).json() + assert bad_code["result"]["desc"] == "AUTH_FAILED" + assert bad_ref["result"]["desc"] == "INVALID_INPUT" + + +@pytest.mark.anyio +async def test_toss_unlink_needs_basic_auth_and_kills_tokens(toss): + async with client() as c: + login = (await c.post("/v1/auth/toss", json={"authorization_code": "code-a", "referrer": "DEFAULT"})).json() + body = {"userKey": 1234567, "referrer": "UNLINK"} + assert (await c.post("/v1/auth/toss/unlink", json=body)).status_code == 401 + assert (await c.post("/v1/auth/toss/unlink", json=body, headers=_basic("toss:wrong"))).status_code == 401 + ok = await c.post("/v1/auth/toss/unlink", json=body, headers=_basic("toss:unlink-secret")) + unknown = await c.post("/v1/auth/toss/unlink", json={"userKey": 1, "referrer": "WITHDRAWAL_TOSS"}, headers=_basic("toss:unlink-secret")) + me = await c.get("/v1/auth/me", headers={"Authorization": f"Bearer {login['access_token']}"}) + assert ok.status_code == 200 and ok.json()["result"]["success"] is True + assert unknown.status_code == 200 + assert me.status_code == 401 + + +@pytest.mark.anyio +async def test_toss_unlink_rejects_all_when_not_configured(toss, monkeypatch): + monkeypatch.setattr(settings, "toss_unlink_auth", "") + async with client() as c: + r = await c.post("/v1/auth/toss/unlink", json={"userKey": 1, "referrer": "UNLINK"}, headers=_basic(":")) + assert r.status_code == 401 + + +def test_success_reads_toss_wrapper(): + ok = httpx.Response(200, json={"resultType": "SUCCESS", "success": {"userKey": 1}}, request=httpx.Request("GET", "https://x")) + fail = httpx.Response(200, json={"resultType": "FAIL", "error": {"errorCode": "4050", "reason": "x"}}, request=httpx.Request("GET", "https://x")) + grant = httpx.Response(200, json={"error": "invalid_grant"}, request=httpx.Request("GET", "https://x")) + assert toss_login._success(ok, "login-me") == {"userKey": 1} + with pytest.raises(toss_login.TossLoginError, match="4050"): + toss_login._success(fail, "login-me") + with pytest.raises(toss_login.TossLoginError, match="invalid_grant"): + toss_login._success(grant, "generate-token") diff --git a/backend/tests/test_post_scope.py b/backend/tests/test_post_scope.py index e981c46..14df053 100644 --- a/backend/tests/test_post_scope.py +++ b/backend/tests/test_post_scope.py @@ -84,6 +84,7 @@ async def test_like_in_one_sido_not_seen_in_another(offline): async with client() as c: token = (await c.post("/v1/auth/signup", json={"login_id": "scope_01", "password": "password1", "nickname": "시도테스트"})).json()["access_token"] h = {"Authorization": f"Bearer {token}"} + await c.post("/v1/auth/terms", headers=h) seoul = (await c.get("/v1/feed", params={"region": SEOUL_A}, headers=h)).json() post_id = next(p["post_id"] for p in seoul["posts"] if p["post_type"] == PostType.WEATHER.value) assert (await c.post(f"/v1/reaction/post/{post_id}/like", headers=h)).json()["like_count"] == 1 diff --git a/backend/tests/test_shorts.py b/backend/tests/test_shorts.py new file mode 100644 index 0000000..111bf7a --- /dev/null +++ b/backend/tests/test_shorts.py @@ -0,0 +1,73 @@ +import json + +import httpx +import pytest + +from common.cache.redis_client import REDIS +from common.enums import ErrorType +from services import shorts_service +from services.external.youtube import channel_shorts, seconds, video_title +from services.shorts_service import CACHE_KEY, ShortsService + + +def test_seconds_parses_iso_duration(): + assert seconds("PT45S") == 45 + assert seconds("PT1M5S") == 65 + assert seconds("PT1H") == 3600 + assert seconds("P1D") is None + + +def _api(videos: list[dict]) -> httpx.MockTransport: + def handle(req: httpx.Request) -> httpx.Response: + if req.url.path.endswith("/channels"): + return httpx.Response(200, json={"items": [{"contentDetails": {"relatedPlaylists": {"uploads": "UUtest"}}}]}) + if req.url.path.endswith("/playlistItems"): + assert req.url.params["playlistId"] == "UUtest" + return httpx.Response(200, json={"items": [{"contentDetails": {"videoId": v["id"]}} for v in videos]}) + return httpx.Response(200, json={"items": videos}) + return httpx.MockTransport(handle) + + +def _video(vid: str, duration: str, published: str, embeddable: bool = True, privacy: str = "public") -> dict: + return {"id": vid, "snippet": {"title": f"제목 {vid}", "publishedAt": published}, "contentDetails": {"duration": duration}, + "status": {"embeddable": embeddable, "privacyStatus": privacy}} + + +@pytest.mark.anyio +async def test_channel_shorts_keeps_public_embeddable_short_videos_newest_first(): + videos = [ + _video("old", "PT30S", "2026-10-20T00:00:00Z"), + _video("new", "PT58S", "2026-10-26T00:00:00Z"), + _video("long", "PT10M", "2026-10-25T00:00:00Z"), + _video("noembed", "PT20S", "2026-10-24T00:00:00Z", embeddable=False), + _video("private", "PT20S", "2026-10-23T00:00:00Z", privacy="unlisted"), + ] + async with httpx.AsyncClient(transport=_api(videos)) as client: + found = await channel_shorts(client, "key", "UCtest", 10) + assert [v["id"] for v in found] == ["new", "old"] + + +@pytest.mark.anyio +async def test_video_title_none_when_embedding_blocked(): + def handle(req: httpx.Request) -> httpx.Response: + if "blocked" in req.url.params["url"]: + return httpx.Response(401) + return httpx.Response(200, content=json.dumps({"title": "오늘 자전거각"})) + async with httpx.AsyncClient(transport=httpx.MockTransport(handle)) as client: + assert await video_title(client, "ok") == "오늘 자전거각" + assert await video_title(client, "blocked") is None + + +@pytest.mark.anyio +async def test_items_reads_cache_and_fetches_only_when_missing(monkeypatch): + calls = [] + + async def fake_fetch(self, client): + calls.append(1) + return [{"id": "abc", "title": "오늘 자전거각"}] + + monkeypatch.setattr(shorts_service.ShortsService, "_fetch", fake_fetch) + await REDIS.conn.delete(CACHE_KEY) + assert await ShortsService().items() == (ErrorType.SUCCESS, [{"id": "abc", "title": "오늘 자전거각"}]) + assert await ShortsService().items() == (ErrorType.SUCCESS, [{"id": "abc", "title": "오늘 자전거각"}]) + assert len(calls) == 1 diff --git a/backend/worker_main.py b/backend/worker_main.py index b8649d8..28122f4 100644 --- a/backend/worker_main.py +++ b/backend/worker_main.py @@ -5,7 +5,7 @@ from apscheduler.schedulers.asyncio import AsyncIOScheduler from common.database.db_session_manager import DB_SESSION_MNG from common.logger import LOG -from scheduler.jobs import build_today_feed, cleanup_old_rows, refresh_air_stations, refresh_events, refresh_openmeteo_weather, refresh_weekend_rank +from scheduler.jobs import build_today_feed, cleanup_old_rows, refresh_air_stations, refresh_events, refresh_openmeteo_weather, refresh_shorts, refresh_weekend_rank async def daily() -> None: @@ -24,8 +24,11 @@ async def main() -> None: scheduler.add_job(refresh_events, "cron", day_of_week="mon", hour=4, minute=0, max_instances=1, coalesce=True) scheduler.add_job(refresh_events, kwargs={"only_if_missing": True}, max_instances=1) scheduler.add_job(refresh_openmeteo_weather, "cron", hour="3,9,15,21", minute=10, max_instances=1, coalesce=True) + # 오늘 화면 쇼츠 줄: 하루 1~2개 올라오니 하루 3번이면 충분하다. 켤 때도 한 번. + scheduler.add_job(refresh_shorts, "cron", hour="7,12,18", minute=10, max_instances=1, coalesce=True) + scheduler.add_job(refresh_shorts, max_instances=1) scheduler.start() - LOG.info("[worker] started, daily job at 03:00 KST, weekend rank at 06:40·18:40 KST, events on Mon 04:00 KST, openmeteo job at 03·09·15·21:10 KST") + LOG.info("[worker] started, daily job at 03:00 KST, weekend rank at 06:40·18:40 KST, events on Mon 04:00 KST, openmeteo job at 03·09·15·21:10 KST, shorts at 07·12·18:10 KST") stop = asyncio.Event() loop = asyncio.get_running_loop() diff --git a/compose.yaml b/compose.yaml index 1d73674..b18c2a8 100644 --- a/compose.yaml +++ b/compose.yaml @@ -4,7 +4,8 @@ services: # 운영형: docker compose up --build → http://localhost:8080 frontend: build: - context: ./frontend + context: . + dockerfile: frontend/Dockerfile target: prod args: # 비우면 같은 주소의 /v1 로 부르고 nginx 가 backend 로 넘긴다 @@ -19,13 +20,16 @@ services: frontend-dev: profiles: ["dev"] build: - context: ./frontend + context: . + dockerfile: frontend/Dockerfile target: dev ports: - "5173:5173" volumes: - - ./frontend:/app + - ./frontend:/app/frontend + - ./shared:/app/shared - /app/node_modules + - /app/frontend/node_modules environment: - CHOKIDAR_USEPOLLING=true - VITE_SITE_URL=${VITE_SITE_URL:-https://weather.o2o.kr} @@ -44,6 +48,7 @@ services: ports: - "${API_BIND:-9810}:9800" volumes: + - ./secrets/toss:/run/secrets/toss:ro - uploads:/app/uploads # 사람 글 사진 depends_on: postgres: diff --git a/docs/구글_검색_정책_리서치.md b/docs/구글_검색_정책_리서치.md new file mode 100644 index 0000000..f5ababc --- /dev/null +++ b/docs/구글_검색_정책_리서치.md @@ -0,0 +1,186 @@ +# 구글 검색 정책 리서치 + +조사일: 2026-10-19 (사이트 이름, 방문자 수·광고와 순위는 2026-10-20 추가) +원칙: 공식 문서에 적힌 것만 쓴다. 문장 끝 `[번호]`는 맨 아래 출처 번호다. 문서에 없는 건 "문서에 없음"으로 따로 적었다. + +## 0. 채널별로 어떤 규칙을 따르나 + +날씨각은 채널마다 사용자가 찾아오는 곳과 순위를 정하는 주체가 다르다. 이 문서의 1~5장(구글 검색 정책)은 **웹** 칸에만 해당한다. + +| 채널 | 사용자가 찾는 곳 | 순위·노출을 정하는 것 (공식 문서) | 구글 검색 정책 적용 | +|---|---|---|---| +| 웹 (weather.o2o.kr, 지역 페이지 `/today/…`) | 구글 검색 | 의미·관련성·품질·사용성·맥락(위치) [2]. 링크와 sitemap으로 페이지를 찾는다 [1] | 적용 (1~5장) | +| 안드로이드 앱 · Wear OS 워치 앱/워치 페이스 (`watch/`) | Google Play 검색 | 평점·리뷰·다운로드 수 등 여러 요인이 함께 작용한다. 비중은 공개하지 않는다 [8] | 앱 안의 화면은 웹이 아니다. 앱 화면이 **내가 가진 웹페이지와 대응하고** Android App Links(딥링크 + 웹사이트 소유 확인)를 설정하면, 구글 검색 결과에서 앱으로 바로 열 수 있다 [9] | +| 토스 인앱 (앱인토스 미니앱) | 토스 앱 안 검색, 공유 링크, 미니앱 스토어·전체탭 | 출시 → 추천 → 부스팅 3단계. 추천은 UX·실사용 지표(재방문율·전환율)·리뷰·성능 네 가지를 모두 충족해야 하고, 검색 결과에서 우선 노출된다 [10] | 미니앱이 구글 검색에 색인되는지는 **문서에 없음** [10][11] | +| 알림 (앱 푸시 등) | 검색으로 찾는 대상이 아님 | — | 구글 검색은 웹페이지를 크롤링·색인한다 [1]. 알림 정책은 각 앱 플랫폼(Play, 토스) 문서를 따로 봐야 하며, 이 문서에서는 조사하지 않았다 | + +- 앱인토스 노출 정책 시행일은 "10월 22일"로만 적혀 있고 연도는 없다. [10] +- 토스 미니앱 검색 키워드가 순위를 어떻게 정하는지는 문서에 없다. 추천 미니앱이 "검색 결과에서 우선 노출"된다는 문장만 있다. [10] +- 구글 Play 문서는 제목을 고유하고 앱 내용을 분명히 보여 주게 쓰라고 권하지만, 제목이 순위 요인이라고 적지는 않았다. [8] + +## 1. 구글 검색이 동작하는 단계 + +- 구글은 크롤링 → 색인 → 검색 결과 제공의 세 단계로 동작한다. [1] +- 크롤링: Googlebot이 페이지를 찾아 내려받는다. 찾은 페이지를 모두 크롤링하지는 않는다. [1] +- 색인: 페이지 내용을 분석하고, 거의 같은 페이지는 묶어서 대표 페이지(canonical)를 정한다. 색인된다는 보장은 없다. [1] +- 검색 결과 제공: 색인에서 가장 관련 있고 품질 높다고 판단한 페이지를 보여 준다. [1] +- 구글은 페이지를 두 가지 방법으로 찾는다. 이미 아는 페이지의 **링크**를 따라가거나, 사이트 주인이 낸 **sitemap**을 읽는다. [1] +- 돈을 받고 더 자주 크롤링하거나 순위를 올려 주지 않는다. 순위는 프로그램이 정한다. [1] + +## 2. 순위를 정할 때 보는 신호 + +검색어에 따라 각 신호의 비중이 달라진다. [2] + +| 신호 | 내용 | +|---|---| +| 의미 | 검색어의 의도를 파악한다. 오타 교정, 비슷한 말 처리 포함 [2] | +| 관련성 | 페이지의 제목·본문이 검색어와 맞는지 본다 [2] | +| 품질 | 전문성·권위·신뢰를 본다. 다른 유명 사이트가 링크를 거는지가 예시로 나온다 [2] | +| 사용성 | 다른 조건이 비슷하면 모바일에서 잘 보이고 빠른 페이지가 유리할 수 있다 [2] | +| 맥락 | 위치, 언어, 검색 기록, 설정으로 결과를 맞춘다 [2] | + +### 위치 + +- 구글은 사용자 위치 같은 정보로 무엇이 가장 관련 있는지 정한다. [2] +- 많은 검색어에 지역 의도가 있음을 알아본다. 예: '피자'를 치면 근처 배달 가게, 런던에서 'football'을 치면 축구 결과. [2] +- 같은 검색어도 사용자 위치·언어·기기에 따라 결과가 다르다. 예: '자전거 수리점'은 파리와 홍콩에서 결과가 다르다. [1] + +### 날씨 + +- **한국과 일본에서는 구글 날씨 예보를 제공하지 않는다.** [6] +- 다른 나라에서 구글 날씨 예보는 각국 기상기관(NOAA, ECMWF, Met Office 등)의 모델과 관측을 쓰는 구글 자체 예보 시스템으로 만든다. [6] + +### 광고비를 내면 순위가 오르나 → 아니다 + +- "검색 결과는 검색어만으로 정해지고, 기업·개인·단체가 광고를 사는지에 영향받지 않는다." [2] +- "검색 알고리즘이 순위를 매길 때 광고주를 특별 대우하지 않으며, 누구도 그렇게 해 달라고 돈을 낼 수 없다." [2] +- 검색 목록에 넣어 주는 데 돈을 받지 않는다. 광고나 관계없는 사업 제휴 같은 개인적·금전적 관계로 순위를 올려 주지 않는다. [13] +- "구글 검색 결과는 구글 광고 프로그램과 독립돼 있다." [14] +- 정리: 구글 광고(Google Ads)를 하면 광고 칸에 따로 뜰 뿐, 그 아래 일반 검색 결과 순위는 오르지 않는다. + +### 방문자가 많으면 순위가 오르나 → 문서에 그런 말은 없다 + +- 사이트 방문자 수(트래픽)를 순위 신호로 쓴다는 문장은 공식 문서에 없다. +- 문서에 있는 것: "검색 결과가 검색어와 관련 있는지 평가하려고, 모아서 익명 처리한 상호작용 데이터를 쓴다." [2] 검색 결과에서 사람들이 어떻게 반응하는지를 관련성 평가에 쓴다는 말이고, 방문자 수를 그대로 순위에 쓴다는 말은 아니다. +- 인기와 가까운 신호로 문서에 나오는 것은 링크다: 품질을 볼 때 "다른 유명 사이트가 그 콘텐츠를 링크하거나 언급하는지"를 본다. [2] 링크로 페이지가 무엇에 대한 것인지·얼마나 도움이 되는지 판단한다. [3] + +### 그럼 상위에 오르는 건 무엇으로 정해지나 (문서 기준) + +- 검색어 의도에 맞는지(의미), 제목·본문에 검색어와 같은 말이 있는지(관련성), 도움이 되는 내용인지·다른 사이트가 링크·언급하는지(품질), 보기 쉬운지(사용성), 검색한 사람 위치·언어(맥락). 검색어마다 비중이 다르다. [2] +- 검색 결과 다른 페이지들과 비교해 충분한 가치를 주는지, 자기만의 정보가 있는지를 스스로 점검하라고 한다. [15] +- 판단(우리에게 적용): '분당구 오늘 날씨'는 제목·본문에 '분당구'가 있는 구 주소가 있어야 관련성에서 경쟁할 수 있다(10/20 구 주소 39장 배포). 그다음은 각 점수처럼 다른 날씨 사이트에 없는 정보, 그리고 다른 사이트의 링크·언급이다. 광고비나 방문자 수로 올리는 길은 문서상 없다. + +## 3. 구글이 공개한 순위 시스템 + +[3]에 나온 것 중 우리와 관련 있는 것만 적었다. + +| 시스템 | 내용 | +|---|---| +| BERT, RankBrain, Neural matching | 검색어와 페이지의 뜻을 이해한다. 검색어 단어가 그대로 없어도 관련 페이지를 찾는다 [3] | +| Passage ranking | 페이지의 개별 구간도 따로 평가한다 [3] | +| Freshness | 최신 내용이 필요한 검색어에는 새 내용을 보여 준다 [3] | +| Link analysis, PageRank | 페이지끼리의 링크로 무엇에 대한 페이지인지, 얼마나 도움이 되는지 판단한다 [3] | +| Exact match domain | 검색어와 똑같이 만든 도메인에 주는 점수를 제한한다 [3] | +| Reliable information | 권위 있는 페이지를 올리고 품질 낮은 내용을 내린다 [3] | +| Original content | 원본 내용을 인용만 한 페이지보다 우선한다 [3] | +| Site diversity | 상위 결과에 같은 사이트는 보통 2개까지만 보여 준다 [3] | +| Deduplication | 매우 비슷한 페이지가 많으면 가장 관련 있는 것만 보여 준다 [3] | +| Spam detection (SpamBrain) | 스팸을 찾는다. 정기적으로 업데이트된다 [3] | +| Helpful content | 2024년 3월부터 핵심 순위 시스템에 포함됐다 [3] | + +## 4. 스팸 정책 (우리와 관련 있는 것) + +### 관문 페이지 (Doorway abuse) + +- 정의: 비슷한 특정 검색어로 순위를 얻으려고 만든 사이트나 페이지. [4] +- 예시: 특정 지역이나 도시를 노린 도메인·페이지를 여러 개 만들어 한 페이지로 몰아가는 것. [4] + +### 대량 생성 (Scaled content abuse) + +- 정의: 주로 검색 순위를 조작하려고 많은 페이지를 만드는 것. [4] +- 예시: 생성형 AI 같은 도구로 사용자에게 가치를 더하지 않는 페이지를 많이 만드는 것. [4] + +### 숨긴 텍스트·링크 (Hidden text and link abuse) + +- 정의: 검색엔진만을 위해 페이지에 내용을 넣는 것. [4] +- 예시: 흰 배경에 흰 글씨, 이미지 뒤에 숨기기, CSS로 화면 밖에 두기, 글자 크기나 투명도를 0으로, 작은 글자 하나에만 링크 걸기. [4] +- 위반이 아닌 것: 탭·아코디언처럼 눌러서 펼치는 내용, 슬라이드, 마우스를 올리면 나오는 툴팁, 스크린리더 전용 텍스트. [4] +- 고치는 방법: URL 검사 도구로 구글에는 보이고 사람에게는 안 보이는 내용을 찾아, 사람과 크롤러가 똑같이 볼 수 있게 지우거나 스타일을 바꾼다. [5] + +### 위반했을 때 + +- 정책을 위반한 사이트는 순위가 내려가거나 검색 결과에 아예 나오지 않을 수 있다. [4] +- 구글은 자동 시스템과, 필요하면 사람 검토로 위반을 찾는다. 사람 검토는 수동 조치로 이어질 수 있다. [4] +- 수동 조치: 구글 직원이 정책 위반이라고 판단해 내리는 조치다. [5] + - 알림: 서치 콘솔의 "수동 조치" 보고서와 메시지 센터로 온다. [5] + - 범위: 일부 페이지 또는 사이트 전체. [5] + - 결과: 순위가 내려가거나 결과에서 빠진다. 사용자에게는 아무 표시가 없다. [5] + - 일부 페이지만 고치면 일부만 복구되지 않는다. [5] + - 복구: 해당 페이지를 모두 고친 뒤 "검토 요청"을 보낸다. 검토에 며칠에서 몇 주 걸린다. 검토 중에는 다시 보내지 않는다. [5] + +## 5. 지도·지역 업체 순위 (참고) + +웹페이지가 아니라 Google 비즈니스 프로필(지도의 가게 목록) 기준이다. + +- 관련성: 프로필이 검색어와 얼마나 맞는지. [7] +- 거리: 검색하는 사람과 업체 사이의 거리. 위치를 공유하지 않았으면 구글이 아는 위치 정보를 쓴다. [7] +- 인지도: 얼마나 잘 알려졌는지. 다른 사이트의 링크, 리뷰 수와 평점이 포함된다. [7] + +## 6. 사이트 이름 (검색 결과에 링크 위에 붙는 이름) + +- 사이트 이름은 구글이 자동으로 정한다. 홈페이지 내용과 웹에서 그 사이트를 가리키는 언급을 함께 본다. [12] +- 구글이 보는 곳: 홈의 `WebSite` 구조화 데이터, `og:site_name`, ``, 제목 태그(h1 등) 등. [12] +- 도메인(o2o.kr)과 서브도메인(weather.o2o.kr) 단위로 각각 정할 수 있다. 하위 경로(o2o.kr/weather) 단위는 안 된다. [12] +- 서브도메인 홈에 구조화 데이터가 없으면, 상위 도메인의 사이트 이름을 대신 쓸 수 있다. [12] +- `WebSite` 구조화 데이터는 홈에 있어야 한다. 필수는 `name`, `url`. `alternateName`은 선택이고 여러 개를 선호 순서대로 적을 수 있다. [12] +- 구글은 자동으로 정한 이름을 사람이 직접 바꿔 주지 않는다. [12] +- 원하는 이름이 안 나올 때 문서가 권하는 것: [12] + - 구조화 데이터와 홈의 다른 이름 표기(제목, og 등)가 서로 맞는지 확인 + - 리디렉션, http·https 버전 모두 같은 이름인지 확인 + - 서치 콘솔에서 홈 재크롤링 요청. 반영까지 며칠에서 몇 주. + - 그래도 안 되면 `alternateName`에 도메인 이름(소문자)을 넣어 대체 이름으로 둔다. 도메인 이름을 대표 이름으로 쓰는 건 마지막 수단. +- 사이트 이름이 순위에 영향을 주는지는 문서에 없다. 문서에 적힌 목적은 "각 결과의 출처를 잘 나타내는 것"뿐이다. [12] + +### 우리 상황 (2026-10-20 확인) + +- 구글 '날씨각' 검색 결과에 weather.o2o.kr 사이트 이름이 '날씨각'이 아니라 '에이아이오투오'로 나온다. +- weather.o2o.kr 홈: `WebSite` 구조화 데이터 `name` "날씨각", `alternateName` "날씨 각"·"Nalssigak", `og:site_name` "날씨각", `<title>` "날씨각 · …"으로 모두 같다. +- o2o.kr 홈의 `<title>`은 "에이아이오투오"다. +- 판단(문서에 없는 추정): 구글이 weather.o2o.kr의 이름을 아직 정하지 못해 상위 도메인 o2o.kr 이름을 쓰고 있을 가능성이 크다. 확인 방법은 서치 콘솔 URL 검사로 홈의 구조화 데이터가 인식됐는지 보는 것. +- 판단: 순위 영향은 문서에 없다. 다만 '날씨각'을 검색한 사람에게 다른 이름이 보이면 우리 사이트인지 알아보기 어렵다. 할 일은 서치 콘솔에서 홈 재크롤링 요청 후 몇 주 지켜보는 것. + +## 7. 공식 문서에 없는 것 + +- 앱(JS)이 뜨면서 화면에서 사라지는 첫 HTML 속 링크·텍스트가 숨긴 텍스트 위반인지는 문서에 없다. 위반 예시에도, 예외에도 없다. +- '오늘 날씨' 같은 검색어에 구글이 사용자 위치를 어떻게 붙여 검색하는지 구체적인 방식은 문서에 없다. 문서에는 "위치를 쓴다", "지역 의도를 알아본다"까지만 있다. [2] +- 새 페이지가 순위에 오르기까지 걸리는 기간은 문서에 없다. +- 사이트 이름이 순위에 영향을 주는지는 문서에 없다. [12] +- 사이트 방문자 수가 순위에 영향을 주는지는 문서에 없다. 있는 건 검색 결과에 대한 상호작용 데이터를 관련성 평가에 쓴다는 문장뿐이다. [2] + +## 8. 직접 확인한 검색 결과 (2026-10-19, 구글, 한국어·한국 설정) + +공식 문서가 아니라 한 번 직접 검색해 본 결과다. 사람·위치·시간마다 다를 수 있다. + +- '날씨각': weather.o2o.kr 홈이 3위. 1위는 성남 AccuWeather(검색한 위치가 성남으로 잡힘), 2위는 기상청. +- `site:weather.o2o.kr`: 홈, `/week`, `/gak`, `/season`과 지역 페이지 일부(광주 남구, 서울 중구, 동해, 이천, 완도, 영동)가 색인돼 있음. +- '성남 날씨각', '완도 날씨각': 10위 안에 없음. 두 검색 모두 결과에 "누락된 검색어: 각"이 표시됨. +- 2026-10-20 재확인: '날씨각' 3위 그대로, 사이트 이름은 '에이아이오투오'. '마포구 오늘 날씨'·'마포구 날씨'·'강남구 오늘 날씨'·'오늘 날씨'·'세차하기 좋은 날'·'오늘 노을 시간'은 20위 안에 없음. +- 서버 로그(지난 7일): Googlebot이 지역 페이지 235개 중 39개를 가져감. sitemap은 2번 가져감. + +## 출처 + +1. [How Google Search works — Google Search Central](https://developers.google.com/search/docs/fundamentals/how-search-works) +2. [Ranking results — How Search Works](https://www.google.com/search/howsearchworks/how-search-works/ranking-results/) +3. [A guide to Google Search ranking systems — Google Search Central](https://developers.google.com/search/docs/appearance/ranking-systems-guide) +4. [Spam policies for Google web search — Google Search Central](https://developers.google.com/search/docs/essentials/spam-policies) +5. [Manual actions report — Search Console 도움말](https://support.google.com/webmasters/answer/9044175) +6. [Forecast information on Google Weather — Google 검색 도움말](https://support.google.com/websearch/answer/13687874) +7. [How Google determines local ranking — Google 비즈니스 프로필 도움말](https://support.google.com/business/answer/7091) +8. [Google Play에서 앱 검색·발견 — Play Console 도움말](https://support.google.com/googleplay/android-developer/answer/4448378?hl=ko) +9. [Enable app content for Google Search (App Links) — Android Developers](https://developer.android.com/training/app-indexing) +10. [미니앱 노출 정책 — 앱인토스 개발자 문서](https://developers-apps-in-toss.toss.im/guide/exposure) +11. [앱인토스란 — 앱인토스 개발자 문서](https://developers-apps-in-toss.toss.im/intro/overview.html) +12. [Provide a site name to Google Search — Google Search Central](https://developers.google.com/search/docs/appearance/site-names) (2025-12-10 갱신) +13. [Our approach to Search — How Search Works](https://www.google.com/search/howsearchworks/our-approach/) +14. [How Google search results differ from ads — Google Ads 도움말](https://support.google.com/google-ads/answer/1722080) +15. [Creating helpful, reliable, people-first content — Google Search Central](https://developers.google.com/search/docs/fundamentals/creating-helpful-content) (2026-10-05 갱신) diff --git a/docs/앱인토스_진행계획.md b/docs/앱인토스_진행계획.md new file mode 100644 index 0000000..4de61dc --- /dev/null +++ b/docs/앱인토스_진행계획.md @@ -0,0 +1,103 @@ +# 앱인토스 진행 계획 + +기준: 2026-10-12. 근거 문서는 [입점 검토](https://claude.ai/artifact/QgA7iq3CCesTRYcFyZck71), [토스판 전략](https://claude.ai/artifact/4WgpUjdNqdSNnMN4ASB4BB). + +## 정한 것 + +- 토스판은 **WebView**로 만든다. React Native(Granite)는 쓰지 않는다. RN은 토스와 무관한 독립 앱으로만 진행한다. +- 프로젝트를 따로 만들지 않는다. 지금 `frontend/` 하나에서 **웹 빌드**와 **토스 빌드** 두 가지를 낸다. +- 웹을 먼저 출시하고, 토스판은 그 뒤에 낸다. +- 토스판 1차부터 **토스 로그인**을 넣는다(10/14 결정). 좋아요·댓글도 웹과 같이 켠다. 아이디 로그인은 토스판에서 쓰지 않는다. + +## 구조 + +``` +frontend/ + apps-in-toss.config.ts 토스 앱 설정 (appName, brand, permissions, navigationBar, webBundleDir=dist-toss) + .env.toss 로컬 전용, 커밋 안 함. VITE_API_BASE_URL·VITE_SITE_URL=https://weather.o2o.kr + src/lib/platform.ts 웹/토스 차이를 모으는 유일한 곳 +``` + +- 빌드: 웹은 `npm run build`, 토스는 `npm run build:toss`. 토스 빌드는 `vite build --mode toss --outDir dist-toss`를 돌린 뒤 `ait build`로 `weather-gak-test.ait`를 만든다. 지금 appName은 테스트용 `weather-gak-test`다. 정식 앱으로 바꿀 때는 `apps-in-toss.config.ts`와 `src/lib/platform.ts`(`intoss://` 주소) 두 곳을 같이 고친다. +- SDK 3.x는 설정 파일이 `apps-in-toss.config.ts`다. 문서에 나오는 `granite.config.ts`는 2.x 방식이다. +- 토스 빌드에서 `.env.toss`에 HTTPS 주소가 없으면 `vite.config.ts`가 빌드를 멈춘다. +- `platform.ts`는 `import.meta.env.MODE === 'toss'`로 갈린다. SDK는 토스 모드에서만 동적으로 import하므로 웹 번들에는 들어가지 않는다. 웹 빌드 결과에 SDK 조각이 없는 것을 확인했다. +- 화면 코드는 `platform.ts`의 함수만 부른다. 화면 곳곳에 `if (토스)`를 두지 않는다. +- 백엔드는 고치지 않는다. CORS는 이미 전부 허용(`backend/router/router.py:34`)이고, API 주소는 `VITE_API_BASE_URL`로 받는다(`frontend/src/api/setup.ts:4`). + +## 웹과 토스가 다른 점 + +| 기능 | 웹 | 토스 | 파일 | +|---|---|---|---| +| 공유 | `navigator.share` (이미지 카드 + 링크) | 이미지는 기기에 저장(`File.saveBase64`), 링크는 `Share.createLink` + `Share.sendMessage`. SDK 공유는 글만 보낼 수 있다 | `frontend/src/b/Sheets.tsx` | +| 위치 | `navigator.geolocation` | `Device.getLocation`. 처음 들어올 때는 권한 창을 띄우지 않고, 이미 허용한 사람만 위치로 맞춘다. '내 위치' 버튼을 누를 때 권한 창을 띄운다 | `frontend/src/b/region.tsx` | +| 로그인 | 아이디·비밀번호 | 토스 로그인(`TossAuth.login` → `POST /v1/auth/toss`). 토스가 주는 개인정보는 받지 않고 `userKey`만 저장한다 | `frontend/src/b/Sheets.tsx` (`TossLoginSheet`), `backend/services/external/toss_login.py` | +| 좋아요·댓글 | 있음 | 있음. 신고·차단은 필수가 아니라 만들지 않는다(검수에서 요청하면 만든다) | `frontend/src/b/Post.tsx`, `frontend/src/b/Sheets.tsx` | +| 네이버 지도 링크 | 있음 | 장소 이름만 표시. Q4 답이 '예외 해당'이면 되돌린다 | `frontend/src/b/ui.tsx` (`MapLink`) | +| 밤 배경 | 어두운 남색 | Q3 답 보고 결정 | `frontend/src/b/BLayout.tsx` | +| GA4 | `index.html`에 태그 | Q2 답 보고 결정 | `frontend/index.html`, `frontend/src/lib/analytics.ts` | +| 라우터 | `BrowserRouter` | Q1 답 보고 결정 (안 되면 `HashRouter`) | `frontend/src/App.tsx` | +| AI 글 표시 | 없음 | 계절 소식 등에 표시 (문구는 검토받은 뒤) | 글 시트 | + +## 토스에 물어볼 것 (채널톡 · 개발자 커뮤니티) + +| # | 질문 | 답 | +|---|---|---| +| Q1 | WebView에서 `BrowserRouter`(주소 경로)로 화면을 나눠도 되는가 | | +| Q2 | 미니앱 안에서 GA4(`gtag.js`)를 써도 되는가 | | +| Q3 | 시간대에 따라 밤에 어두운 배경을 쓰면 '라이트 모드' 규칙에 걸리는가 | | +| Q4 | 장소 이름을 누르면 네이버 지도로 가는 링크가 '단순 정보 확인' 예외에 해당하는가 | | +| Q5 | 공유창으로 이미지 파일(공유 카드)을 보낼 수 있는가 | SDK 기준 불가(`Share.sendMessage`는 글만). 지금은 이미지를 저장하고 링크를 보낸다 | +| Q6 | TDS는 '강력 권장'인데 React 19 프로젝트도 TDS 없이 검수를 통과하는가 (TDS는 React 18 필요) | | +| Q7 | 카테고리 목록. '나들이·여가' 같은 분류가 있는가 | | + +## 단계 + +각 단계가 끝나면 확인을 받고 다음 단계로 간다. 작업 브랜치는 `feat/apps-in-toss`. + +### 0. 사전 준비 — 사람이 할 일 + +- [ ] 앱인토스 콘솔 가입, 앱 등록 → `appName` 확정 (https://apps-in-toss.toss.im) +- [ ] 사업자 정보 등록 (영업일 기준 약 1일) +- [ ] 위 Q1~Q7 문의 +- [ ] 샌드박스 앱을 테스트 폰에 설치 + +### 1. 토스 빌드 뼈대 + +- [x] `@apps-in-toss/web-framework@3.8.0` 설치 (버전 고정) +- [x] `apps-in-toss.config.ts`, `.env.toss`(로컬), `package.json`에 `build:toss` 추가 → `weather-gak-test.ait` 생성 확인 +- [ ] 샌드박스 앱에서 피드가 뜨는지 확인 — 콘솔 앱 등록·샌드박스 설치 뒤 + +완료 기준: 웹 빌드 결과가 바뀌지 않고, 샌드박스에서 피드가 열린다. + +### 2. 플랫폼 분기 + +- [x] `src/lib/platform.ts`: `IS_TOSS`, `SOCIAL`, `tossShare`, `tossLocation` +- [x] 공유·위치·지도 링크를 토스에서 분기 +- [x] 토스 로그인: 백엔드 `POST /v1/auth/toss`, 연결 끊기 콜백 `POST /v1/auth/toss/unlink`, 프론트 `TossLoginSheet` (10/14) +- [ ] 운영 서버에 mTLS 인증서 두기, `.env`에 `TOSS_MTLS_CERT`·`TOSS_MTLS_KEY`·`TOSS_UNLINK_AUTH`, compose 마운트 +- [ ] 콘솔: 토스 로그인 약관 동의·동의 항목·연결 끊기 콜백 등록 +- [ ] Q1~Q3 답에 따라 라우터·GA4·밤 배경을 처리한다 (지금은 웹과 같음) + +완료 기준: 웹은 지금과 똑같이 동작한다. 토스에서는 토스 로그인으로만 로그인한다. + +### 3. 토스판 피드 줄이기 — 결정 대기 + +TODO.md의 '각 34개 정리', '히어로 숫자 5개'가 결정되면 진행한다. 목표는 피드 8~10칸, 첫 화면에 한 줄 판정이다. 문구는 목록으로 검토받은 뒤 반영한다. + +### 4. 검증 + +- [x] `npm run lint`, `npm run build`, `npm run build:toss` 모두 통과 (10/12) +- [ ] 샌드박스 실기기 확인: 첫 화면 뒤로가기를 누르면 앱이 닫힌다, 진입하자마자 바텀시트가 뜨지 않는다, 상단 바 버튼이 1개다, 위치 권한을 거부해도 지역 선택으로 쓸 수 있다 +- [ ] [비게임 검수 체크리스트](https://developers-apps-in-toss.toss.im/checklist/app-nongame.md)와 항목별로 대조 +- [ ] 토스 공식 `project-validator` 스킬로 점검 (https://github.com/toss/apps-in-toss-skills) + +### 5. 출시 + +- [ ] 웹 출시가 끝났는지 확인 +- [ ] `.ait` 번들을 콘솔에 올리고 검수 요청 (3~5영업일, 반려 시 다시 3~5일) + +### 6. 출시 후 — 별도 결정 + +- 스마트 발송(알림): 금요일 주말 판정, 노을 좋은 날. 노을 알림은 TODO.md에서 결정 대기 중이다. +- 포인트: 출시 후 2주만 쓰고 끊는다. 포인트를 끊은 주의 재방문율로 계속할지 판단한다. diff --git a/docs/이벤트_추적.md b/docs/이벤트_추적.md index 411c8d8..9aec8c6 100644 --- a/docs/이벤트_추적.md +++ b/docs/이벤트_추적.md @@ -12,6 +12,7 @@ GA4 태그(`gtag.js`, 측정 ID `G-D378J4X373`)를 `index.html`에 심고, 화 ``` - 왜 GTM이 아니라 GA4 직접인가: 이벤트를 코드(`analytics.ts`)에서 정하므로, GTM을 쓰면 이벤트마다 트리거·태그를 한 번 더 만들어야 한다. 광고 픽셀도, 마케터가 직접 손볼 일도 아직 없다. +- 모든 이벤트에 `platform: 'web' | 'toss'`가 붙는다. `index.html`의 `gtag('config')`에서 빌드 모드(`%MODE%`)로 정한다. GA4에서 보려면 맞춤 측정기준(이벤트 범위, `platform`)을 한 번 등록한다. - 개발 서버(`npm run dev`)에서는 `track()`이 이벤트를 보내지 않는다. 단 `index.html`의 페이지 조회(`page_view`)는 개발 서버에서도 나가므로 GA4에서 `localhost`를 걸러 본다. - 이벤트 이름은 영어 snake_case. GA4 추천 이벤트(`share`, `login`, `sign_up`, `select_content`)는 이름을 그대로 써야 GA4 기본 보고서에 잡힌다. - 값은 사람이 읽을 수 있게 한글 그대로 둔다 (예: `gak_name: '야장각'`). @@ -25,7 +26,7 @@ GA4 태그(`gtag.js`, 측정 ID `G-D378J4X373`)를 `index.html`에 심고, 화 | `view_gak` | 각 상세 시트가 열려 데이터가 뜸 (같은 각은 한 번만) | `index_id`, `gak_name`, `score`, `rank` | `Sheets.tsx` `GakSheet` | | `select_content` | 글 시트가 열려 데이터가 뜸 (같은 글은 한 번만) | `content_type: 'article'`, `item_id`(글 번호), `category`(분류 이름) | `Sheets.tsx` `ArticleSheet` | | `share` | 공유창으로 보내기 성공, 또는 이미지 내려받기 | `content_type: 'image'`, `item_id`(공유 제목), `method: 'share_sheet' \| 'download'`, `ratio`(이미지 비율) | `Sheets.tsx` `ShareSheet` `send` | -| `login` | 로그인 성공 (구글로 처음 들어와 자동 가입된 경우도 `login`) | `method: 'id' \| 'google'` | `Sheets.tsx` `LoginSheet` `done` | +| `login` | 로그인 성공 (구글로 처음 들어와 자동 가입된 경우도 `login`) | `method: 'id' \| 'google' \| 'toss'`(앱인토스) | `Sheets.tsx` `LoginSheet` `done`, `TossLoginSheet` | | `sign_up` | 가입 성공 | `method: 'id'` | `Sheets.tsx` `LoginSheet` `done` | | `region_change` | 지역 목록에서 고름, 또는 위치로 가까운 구를 찾음 | `region_name`, `method: 'list' \| 'location'` | `Sheets.tsx` `RegionSheet`, `region.tsx` `findNearest` | | `install_banner_view` | 오늘 탭의 '홈 화면에 추가' 카드가 보임 (설치할 수 있는 곳에서, 닫은 지 2주 안 지났으면 안 보임) | 없음 | `installBanner.tsx` `InstallBanner` | diff --git a/frontend/.dockerignore b/frontend/.dockerignore deleted file mode 100644 index 8d0d500..0000000 --- a/frontend/.dockerignore +++ /dev/null @@ -1,7 +0,0 @@ -node_modules -dist -.git -*.log -.DS_Store -Dockerfile -.dockerignore diff --git a/frontend/.gitignore b/frontend/.gitignore index a547bf3..e2319c9 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -22,3 +22,6 @@ dist-ssr *.njsproj *.sln *.sw? + +dist-toss +*.ait diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 72f8135..7a4daee 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -2,13 +2,19 @@ # ---- deps: package.json이 바뀔 때만 다시 설치 ---- FROM node:24-alpine AS deps +# 빌드 대상은 저장소 루트(npm workspaces). 웹에 필요한 frontend·shared 만 설치한다 WORKDIR /app COPY package.json package-lock.json ./ -RUN npm ci +COPY frontend/package.json frontend/ +COPY shared/package.json shared/ +COPY mobile/package.json mobile/ +RUN npm ci -w frontend -w shared # ---- dev: 코드 수정이 바로 반영되는 개발 서버 ---- FROM deps AS dev -COPY . . +COPY shared shared +COPY frontend frontend +WORKDIR /app/frontend EXPOSE 5173 CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"] @@ -18,12 +24,14 @@ ARG VITE_API_BASE_URL="" ENV VITE_API_BASE_URL=$VITE_API_BASE_URL ARG VITE_SITE_URL="" ENV VITE_SITE_URL=$VITE_SITE_URL -COPY . . +COPY shared shared +COPY frontend frontend +WORKDIR /app/frontend RUN npm run build # ---- prod: nginx로 정적 파일 제공 ---- FROM nginx:1.29-alpine AS prod -COPY nginx.conf /etc/nginx/conf.d/default.conf -COPY --from=build /app/dist /usr/share/nginx/html +COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=build /app/frontend/dist /usr/share/nginx/html EXPOSE 80 HEALTHCHECK --interval=30s --timeout=3s CMD wget -q -O /dev/null http://127.0.0.1/ || exit 1 diff --git a/frontend/apps-in-toss.config.ts b/frontend/apps-in-toss.config.ts new file mode 100644 index 0000000..a1c2070 --- /dev/null +++ b/frontend/apps-in-toss.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from '@apps-in-toss/web-framework/config' + +// appName 은 앱인토스 콘솔에 등록한 이름과 같아야 한다 +export default defineConfig({ + appName: 'nalssigak', + brand: { primaryColor: '#ff7a45' }, + permissions: [{ name: 'geolocation', access: 'access' }], + navigationBar: { withBackButton: true, withHomeButton: true }, + webBundleDir: 'dist-toss', +}) diff --git a/frontend/index.html b/frontend/index.html index d9d64c4..0b4a8e9 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -8,7 +8,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-D378J4X373'); + gtag('config', 'G-D378J4X373', { platform: '%MODE%' === 'toss' ? 'toss' : 'web' }); </script> <script> // 이미 열었던 탭을 다시 열면 브라우저가 예전 HTML 을 다시 쓰고, 그 HTML 이 부르는 예전 빌드 파일은 배포로 지워져 첫 화면에서 멈춘다. diff --git a/frontend/openapi-ts.config.ts b/frontend/openapi-ts.config.ts index 2a866c2..99f9797 100644 --- a/frontend/openapi-ts.config.ts +++ b/frontend/openapi-ts.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from '@hey-api/openapi-ts' export default defineConfig({ input: process.env.OPENAPI_INPUT ?? 'http://localhost:9810/openapi.json', - output: 'src/api/client', + output: '../shared/api/client', parser: { patch: { // FastAPI operationId("get_feed_v1_feed_get")에서 "_v1_" 앞만 camelCase로 → getFeed / getFeedOptions / addCommentMutation diff --git a/frontend/package-lock.json b/frontend/package-lock.json deleted file mode 100644 index afaa20f..0000000 --- a/frontend/package-lock.json +++ /dev/null @@ -1,2691 +0,0 @@ -{ - "name": "frontend", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "frontend", - "version": "0.0.0", - "dependencies": { - "@tailwindcss/vite": "^4.3.3", - "@tanstack/react-query": "^5.104.0", - "embla-carousel-react": "^8.6.0", - "modern-screenshot": "^4.7.0", - "react": "^19.2.8", - "react-dom": "^19.2.8", - "react-router": "^8.4.0", - "tailwindcss": "^4.3.3" - }, - "devDependencies": { - "@hey-api/openapi-ts": "0.99.0", - "@types/node": "^24.13.3", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.7", - "@vitejs/plugin-react": "^6.1.1", - "oxlint": "^1.81.0", - "typescript": "~6.0.2", - "vite": "^8.3.0" - } - }, - "node_modules/@hey-api/codegen-core": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@hey-api/codegen-core/-/codegen-core-0.9.1.tgz", - "integrity": "sha512-s97jL1dgTMuiMHv2BZ1X4Tgd99Mf9GOvGdNqNcGwIMmnR+PgYNoraj4Zvp134MKsNCap/m7k0r0vKKnl56pj4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@hey-api/types": "0.1.4", - "ansi-colors": "4.1.3", - "c12": "3.3.4", - "color-support": "1.1.3" - }, - "engines": { - "node": ">=22.18.0" - }, - "funding": { - "url": "https://github.com/sponsors/hey-api" - } - }, - "node_modules/@hey-api/json-schema-ref-parser": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@hey-api/json-schema-ref-parser/-/json-schema-ref-parser-1.4.4.tgz", - "integrity": "sha512-otmd+zCxbYVBIp/mlMTnGkvlNYLkVKgs3VOIq0kSnenhB1+fRwLPQIeSwyWM6E51oXhUedkYjVsVpkVexeuJOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "7.1.3", - "@types/json-schema": "7.0.15", - "js-yaml": "4.2.0" - }, - "engines": { - "node": ">=22.18.0" - }, - "funding": { - "url": "https://github.com/sponsors/hey-api" - } - }, - "node_modules/@hey-api/openapi-ts": { - "version": "0.99.0", - "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.99.0.tgz", - "integrity": "sha512-SePU/5oEWWkvUBYmvzdYRctseoLuskyhs4ET0RvLIcmzc8yLQoA2R+KtBIQ8bPsoSUB0m4E5SmBnl6aGSA0szQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@hey-api/codegen-core": "0.9.1", - "@hey-api/json-schema-ref-parser": "1.4.4", - "@hey-api/shared": "0.5.0", - "@hey-api/spec-types": "0.2.0", - "@hey-api/types": "0.1.4", - "@lukeed/ms": "2.0.2", - "ansi-colors": "4.1.3", - "color-support": "1.1.3", - "commander": "15.0.0", - "get-tsconfig": "4.14.0" - }, - "bin": { - "openapi-ts": "bin/run.js" - }, - "engines": { - "node": ">=22.18.0" - }, - "funding": { - "url": "https://github.com/sponsors/hey-api" - }, - "peerDependencies": { - "typescript": ">=5.5.3 || >=6.0.0 || 6.0.1-rc" - } - }, - "node_modules/@hey-api/shared": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@hey-api/shared/-/shared-0.5.0.tgz", - "integrity": "sha512-JN/j4Ebh4cJGYIQ5cwWuqe7GeSUyQoz7oC51WqyhKOcrejK6DKZMDkshc5d1eKTRuRL+rjozuRcoUaZZn2DGPw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@hey-api/codegen-core": "0.9.1", - "@hey-api/json-schema-ref-parser": "1.4.4", - "@hey-api/spec-types": "0.2.0", - "@hey-api/types": "0.1.4", - "ansi-colors": "4.1.3", - "cross-spawn": "7.0.6", - "open": "11.0.0", - "semver": "7.8.4" - }, - "engines": { - "node": ">=22.18.0" - }, - "funding": { - "url": "https://github.com/sponsors/hey-api" - } - }, - "node_modules/@hey-api/spec-types": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@hey-api/spec-types/-/spec-types-0.2.0.tgz", - "integrity": "sha512-ibQ8Is7evMavzr8GNyJCcTg975d8DpaMUyLmOrQ85UBdy1l6t1KuRAwgChAbesJsIlNV6gjmlXruWyegDX18Fg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@hey-api/types": "0.1.4" - }, - "funding": { - "url": "https://github.com/sponsors/hey-api" - } - }, - "node_modules/@hey-api/types": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@hey-api/types/-/types-0.1.4.tgz", - "integrity": "sha512-thWfawrDIP7wSI9ioT13I5soaaqB5vAPIiZmgD8PbeEVKNrkonc0N/Sjj97ezl7oQgusZmaNphGdMKipPO6IBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", - "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@lukeed/ms": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@lukeed/ms/-/ms-2.0.2.tgz", - "integrity": "sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@oxc-project/types": { - "version": "0.151.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.151.0.tgz", - "integrity": "sha512-J1yXrIlNDZVzE3ada310xeAw7nH8yCAyLPuUIsjKatFPmfn5bS1oW+cM+QsGOtVWd5nhSpbwZWx/rue+r5Z+PA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/oxc-project" - } - }, - "node_modules/@oxlint/binding-android-arm-eabi": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.86.0.tgz", - "integrity": "sha512-63Ozq6yQn79B2UxjSZ9huJmI+3/ZPI7hxAe6TyFh9oQL447KnIMoffOdtog+h4KILbQr61ZRvFPW5gYbAUgpgQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-android-arm64": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.86.0.tgz", - "integrity": "sha512-JdLGp44phbf/0Du236Dt06yfK6Qw8xhTFeDvHJdjk167r59OfP5+BL31mgMYVnswS8e+j6tFuccSY0QDC/lgCw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-darwin-arm64": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.86.0.tgz", - "integrity": "sha512-h+vkOr4ik6KLFCXdtNVEj9xfnXfNUpPoF95QjORdhiSpLqQePzcN81kGHjAgsw1/G7WBWK5KsFKbI2UK8EyzMA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-darwin-x64": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.86.0.tgz", - "integrity": "sha512-wbglRuH5eKsp68keTOOeKDHU1astWSRYFsh2bwKQTAPb44rD6kVgzYI1ZrAJRTc6/7PH55ZXFCQx0rQXrj0UdA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-freebsd-x64": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.86.0.tgz", - "integrity": "sha512-yTQ7QSOlNfQsrfbeVweTiegQJLKPjUKgXp/JpGiFzza6Hp29S9LAoH77TM3L0RjK39iQRZB5lk5iq2t241Mfag==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-arm-gnueabihf": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.86.0.tgz", - "integrity": "sha512-QYJGy0E2Tv8GAayyBIeHFTwQb8u+zrvrOYrifuDGZDr9ad5XsDhiMScpZymhS9fwWjqrgG2ZUwT4vpY0ISqp4Q==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-arm-musleabihf": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.86.0.tgz", - "integrity": "sha512-oQo83CafLT8p3qh0AGkN0tSUIh5Hm63mfDsoqUmBQUBnSZLNBAbyRaAftfGY5a0cKZ34dG6jAtMYgcY5kZqt5g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-arm64-gnu": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.86.0.tgz", - "integrity": "sha512-EM6wy5c2UM12qPb7iDJDBAZvHyfEJGH6iosFgaFiaRZpirz99//EHcUyD2KAskz07x1TULuiAtsojf4nvWWksw==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-arm64-musl": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.86.0.tgz", - "integrity": "sha512-vCiUQb9ZNzZalxYRU4mlZwUqT5f+c7Sk9DwUOplWHtik3Dl4r3DVnUB5tBeRuTAUe6MUVCTylNW7TkkN8J1oTw==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-ppc64-gnu": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.86.0.tgz", - "integrity": "sha512-T0AzE89yjTYmOhB/hb6i+rWTpe2mYt+xiguBhs9DEPIJTZ1H8OYqsE4VxJHHw2Wlq8Mztwvp2P8NV87ZOuhPRw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-riscv64-gnu": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.86.0.tgz", - "integrity": "sha512-s49r0K2f5Oc7fJoMUO1WkdhYK5Ob79uYRwWQ/XNoGysaOq3RUGmGUbHSuXiyydTTA+P9xEdDEnnlZVXiaSJhlw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-riscv64-musl": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.86.0.tgz", - "integrity": "sha512-JIa2tYR8ayb3nvcMSZzn4O/xTy13S7MHllu7cBD+B5qDQXXSRy/Vwk1aNpiTjZmBJGwKCHOy/NvnY5Xcwg27uQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-s390x-gnu": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.86.0.tgz", - "integrity": "sha512-XwXMyBsAuWZkhZU74UNcfQKr1CJJAKnS80dZzOnjl6A4fKcf91IjFgidegQugMHA5SN8ulwDXEDV1yPntjXgQQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-x64-gnu": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.86.0.tgz", - "integrity": "sha512-C1WjukSyMnr66b+w1/tV8RFVv6d9v0MzDf4p9IxVXknqgmTHBgZh1pccN1eHzFr0b9Tbb3OXoPsAAdAuHAQfeA==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-linux-x64-musl": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.86.0.tgz", - "integrity": "sha512-ap6KLmvC38c6MdYzsIh25cXQupqYvjd37tMNftzrX1DCtkX1Gcf2B+S2B17dD4lKa5c5gJog7DQJyDo82PBKyw==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-openharmony-arm64": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.86.0.tgz", - "integrity": "sha512-996Q9w/2GLwNyy5Djs39Jt09aFlr4b7TPhoj7dvo5FHmcyiF68nPz73HNc5UAYKIYeK+M9JzPQ4Wg1r1dXvP6A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-win32-arm64-msvc": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.86.0.tgz", - "integrity": "sha512-9uTCHYTknNkug5+46ViSoUMuOuGWK61D87QnblU6CXaWKJC630Z7dbls61vdHxya/cR2ycQZ6Mm6ckgF6Cag5g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-win32-ia32-msvc": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.86.0.tgz", - "integrity": "sha512-a47ga7EKVfMU8rO0i1m3mGwfNRj3FhQyt1d/ukO/E9u1HHF3KpR3tyb3VhuJBGEVPF8uR4exSyHUyx7xbE+uxw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxlint/binding-win32-x64-msvc": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.86.0.tgz", - "integrity": "sha512-az4dzifCRzES1crwu6pDFXzJTIanrdxXFL9TbiJWrx9LKcuacbR83aPvxDA1LKLNswi/RoqitC7Afcflhu3zBQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@remix-run/route-pattern": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/@remix-run/route-pattern/-/route-pattern-0.22.1.tgz", - "integrity": "sha512-czdGJWh09Lapvcqt7Vb09KlrU2PhRJ8xQaI+AItTuD9aDJ5MAgxnS38lnys6Ll+6RJEqPiaUqTwIQhVLwFvv+w==", - "license": "MIT" - }, - "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.11.tgz", - "integrity": "sha512-A5kXfGKvKWWZE0TtPrfsvT+q4Y5d1QG8gGUzpYjGydM+fARM9MuX90PrXYXe0XbsDVgyxxNzHo6giCj90bsFNw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.11.tgz", - "integrity": "sha512-z6cTycz+iJ4PVkuL4HHW4DfTfoeU/2nqYYuSOrTmH7yHK5Y0LCOnA03V4ZNxavyVaU1oOqUgIg2klN/s+USGOA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.11.tgz", - "integrity": "sha512-jShvqNtP6vDC6/A5JOAzbVV+DkgHqhl/ScVCJEbt+TUY6QYz7YnXcrg3sLtFBniro0f/Ld50ZwCWA6f7KYD1nQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.11.tgz", - "integrity": "sha512-f2i2xiNWq1Z1l2++q2fuhZRdLAT3aqxD6vRNm1RAxpUoBcdqNB3C0s1Bt+K+PbEx2F5F4gQp6hqKkphCY/xF9w==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.11.tgz", - "integrity": "sha512-4Ir5FSOKIAMr4r0kExpt1s3bMgzJU3rA45AYOHtQpls0oNeqcYBKrWMlckrYH4KCfGLfkfn1tN1dmZPMVsdXow==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.11.tgz", - "integrity": "sha512-/gnRDM+39BROzAN/k1OZjDPnDMcZxB/0EUxKjONO5yVkNEvlsoMDrxGNKgZi/ttFriS2gwlDNzB65pvNbFOXIQ==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.11.tgz", - "integrity": "sha512-PFaK8HwvAHbaKbBcDNQihjMKYvFnA5hiENx/l5tphTDz1E0WFp32l0A7aq7lyUwGsRw/xSrNIy/gIK4thrSCrw==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.11.tgz", - "integrity": "sha512-AskzJUIKRLPxkruR1wLKewGbOw+EYfU/9lOrBFj4AFrEA8hPpKFnODWNu2WLaNs0QNkEb9QIJufmVZZIL/bJlg==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.11.tgz", - "integrity": "sha512-qlUGAheh2yh8afH7QBgx0PrRHN85hKnNd78x8MeMhXivuevgd8vgf6/CstOzmNKY/lLTHvNTrPy98cLnAugzJw==", - "cpu": [ - "ppc64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.11.tgz", - "integrity": "sha512-secpEad+0vCbSfn8upFySkDskv+bGPk3THSDS9Y89yc4rb4kzqHp8Dmyd9BkQW4SnhNXBZCl/6CrO//hZahNJQ==", - "cpu": [ - "s390x" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.11.tgz", - "integrity": "sha512-mOVBT3dPpkWm8XBWPmU4bf+U6dYDLeMo/9ojUmis4N0L5uu10qra5vOyngZ7/PSdoE4G9KvRt4bloRxNjLas7A==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.11.tgz", - "integrity": "sha512-Is78i9A8Ui4SqcxUwFJ9uMmjDn58IbVTjFWYdQestFEgeuEmHMLGNriXnVJKkwG2YiZjw8cP0zCTyDMdDGtOOg==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.11.tgz", - "integrity": "sha512-dUCXneZ87INUMyQ0D+C0HrEBNUPNXHaPmU5GTjyKTJEiussw9Kaj5Ln8UztPe4epV/ffvgNBEadksdYhmW6xJA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.11.tgz", - "integrity": "sha512-jByxb6qfd+bH1xUd0qnfFnb17i9sWBPY2tOavJ0l3tdr3OTu+Kvtm8cd/JV5nFt657b1VqGltxg9olOEfofXWw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.11.tgz", - "integrity": "sha512-/PzKqzAJ03i19oy2ItPvyvaVjOjBCNnfaJs8yvUdGBKmiESgnrJSQ2awd81QzFbbnAmu7YO9ZnJrDCb9VSJPRA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", - "license": "MIT" - }, - "node_modules/@tailwindcss/node": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz", - "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", - "license": "MIT", - "dependencies": { - "@jridgewell/remapping": "^2.3.5", - "enhanced-resolve": "^5.24.1", - "jiti": "^2.7.0", - "lightningcss": "1.32.0", - "magic-string": "^0.30.21", - "source-map-js": "^1.2.1", - "tailwindcss": "4.3.3" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.32.0", - "lightningcss-darwin-arm64": "1.32.0", - "lightningcss-darwin-x64": "1.32.0", - "lightningcss-freebsd-x64": "1.32.0", - "lightningcss-linux-arm-gnueabihf": "1.32.0", - "lightningcss-linux-arm64-gnu": "1.32.0", - "lightningcss-linux-arm64-musl": "1.32.0", - "lightningcss-linux-x64-gnu": "1.32.0", - "lightningcss-linux-x64-musl": "1.32.0", - "lightningcss-win32-arm64-msvc": "1.32.0", - "lightningcss-win32-x64-msvc": "1.32.0" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-android-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", - "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-darwin-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", - "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-darwin-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", - "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-freebsd-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", - "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", - "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", - "cpu": [ - "arm" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", - "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", - "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-x64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-x64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", - "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-win32-x64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", - "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz", - "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", - "license": "MIT", - "engines": { - "node": ">= 20" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.3.3", - "@tailwindcss/oxide-darwin-arm64": "4.3.3", - "@tailwindcss/oxide-darwin-x64": "4.3.3", - "@tailwindcss/oxide-freebsd-x64": "4.3.3", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", - "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", - "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", - "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", - "@tailwindcss/oxide-linux-x64-musl": "4.3.3", - "@tailwindcss/oxide-wasm32-wasi": "4.3.3", - "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", - "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", - "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", - "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", - "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", - "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", - "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", - "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", - "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", - "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", - "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", - "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", - "bundleDependencies": [ - "@napi-rs/wasm-runtime", - "@emnapi/core", - "@emnapi/runtime", - "@tybys/wasm-util", - "@emnapi/wasi-threads", - "tslib" - ], - "cpu": [ - "wasm32" - ], - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.11.1", - "@emnapi/runtime": "^1.11.1", - "@emnapi/wasi-threads": "^1.2.2", - "@napi-rs/wasm-runtime": "^1.1.4", - "@tybys/wasm-util": "^0.10.2", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", - "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", - "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 20" - } - }, - "node_modules/@tailwindcss/vite": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz", - "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==", - "license": "MIT", - "dependencies": { - "@tailwindcss/node": "4.3.3", - "@tailwindcss/oxide": "4.3.3", - "tailwindcss": "4.3.3" - }, - "peerDependencies": { - "vite": "^5.2.0 || ^6 || ^7 || ^8" - } - }, - "node_modules/@tanstack/query-core": { - "version": "5.104.0", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.104.0.tgz", - "integrity": "sha512-JrC2r/JQlXt7khBSdUpsgxNvybzOg+aITa+ARRMlP2AFo93Y8vIqz077rp+e61mJetSZ0T6AJbwW1JHer1vrPQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/react-query": { - "version": "5.104.0", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.104.0.tgz", - "integrity": "sha512-e1TZmDCQnWIfiDVryIHeA6Idj+Lfx1hORLOhXS/l5wcgvtVD4yYqbTDl378sGQKIi2cSgb0TEMC9cKK8GGoJEw==", - "license": "MIT", - "dependencies": { - "@tanstack/query-core": "5.104.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": "^18 || ^19" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "24.19.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.0.tgz", - "integrity": "sha512-zY+5tKxXdhGh1PYI0ac+7juvEu4OI6vWtVVoj5i2m42jxAY1U+zHGt6QCyOFwykdP62sM3MJ9stoYYUw5aCWew==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" - } - }, - "node_modules/@types/react": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", - "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", - "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^19.3.0" - } - }, - "node_modules/@vitejs/plugin-react": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.1.tgz", - "integrity": "sha512-yxLaQV9gkhS8ezJqCM6+ndU7mDY6gqAg75NQ+0IjwEI8IYOmQCgkRwHKVSfWXW076DsqMo0Dk+0FK1U+M5RgFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rolldown/pluginutils": "^1.0.1" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "peerDependencies": { - "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", - "babel-plugin-react-compiler": "^1.0.0", - "oxc-transform-react": "^0.145.0", - "vite": "^8.0.0" - }, - "peerDependenciesMeta": { - "@rolldown/plugin-babel": { - "optional": true - }, - "babel-plugin-react-compiler": { - "optional": true - }, - "oxc-transform-react": { - "optional": true - } - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/bundle-name": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.1.tgz", - "integrity": "sha512-DdH81/zPLVS11EUgWq3tEu/xn+EzljlMYooDNdzWEnFha3R3NBMpMV1UqYIpjYHV/SgpFKMIX1Oh7o06SjM/oA==", - "dev": true, - "license": "MIT", - "dependencies": { - "run-applescript": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/c12": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/c12/-/c12-3.3.4.tgz", - "integrity": "sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chokidar": "^5.0.0", - "confbox": "^0.2.4", - "defu": "^6.1.6", - "dotenv": "^17.3.1", - "exsolve": "^1.0.8", - "giget": "^3.2.0", - "jiti": "^2.6.1", - "ohash": "^2.0.11", - "pathe": "^2.0.3", - "perfect-debounce": "^2.1.0", - "pkg-types": "^2.3.0", - "rc9": "^3.0.1" - }, - "peerDependencies": { - "magicast": "*" - }, - "peerDependenciesMeta": { - "magicast": { - "optional": true - } - } - }, - "node_modules/chokidar": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", - "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^5.0.0" - }, - "engines": { - "node": ">= 20.19.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true, - "license": "ISC", - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/commander": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", - "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=22.12.0" - } - }, - "node_modules/confbox": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.4.tgz", - "integrity": "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/cookie-es": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-3.1.1.tgz", - "integrity": "sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==", - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/default-browser": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.1.tgz", - "integrity": "sha512-m1pAzaJgZ/gssEqlOhJkPJp8Xly7QyW6xcrkUa2KKcDeDSEMP7X8xipU3snUcfisTQx0w1AGae+9UtJSfVnXGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "bundle-name": "^4.1.0", - "default-browser-id": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser-id": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", - "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/defu": { - "version": "6.1.7", - "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", - "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/destr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", - "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", - "dev": true, - "license": "MIT" - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/dotenv": { - "version": "17.4.2", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", - "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/embla-carousel": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.6.0.tgz", - "integrity": "sha512-SjWyZBHJPbqxHOzckOfo8lHisEaJWmwd23XppYFYVh10bU66/Pn5tkVkbkCMZVdbUE5eTCI2nD8OyIP4Z+uwkA==", - "license": "MIT" - }, - "node_modules/embla-carousel-react": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/embla-carousel-react/-/embla-carousel-react-8.6.0.tgz", - "integrity": "sha512-0/PjqU7geVmo6F734pmPqpyHqiM99olvyecY7zdweCw+6tKEXnrE90pBiBbMMU8s5tICemzpQ3hi5EpxzGW+JA==", - "license": "MIT", - "dependencies": { - "embla-carousel": "8.6.0", - "embla-carousel-reactive-utils": "8.6.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.1 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" - } - }, - "node_modules/embla-carousel-reactive-utils": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/embla-carousel-reactive-utils/-/embla-carousel-reactive-utils-8.6.0.tgz", - "integrity": "sha512-fMVUDUEx0/uIEDM0Mz3dHznDhfX+znCCDCeIophYb1QGVM7YThSWX+wz11zlYwWFOr74b4QLGg0hrGPJeG2s4A==", - "license": "MIT", - "peerDependencies": { - "embla-carousel": "8.6.0" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.25.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.25.1.tgz", - "integrity": "sha512-nGXts5znJzmWPu+mIE9izCOzdg63oJca2mDzGWWTth7sr4aCToKcoyFVBQwN75Ij5Pf6p510EwkTqViTRzDV+w==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.3.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/exsolve": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.1.1.tgz", - "integrity": "sha512-9U/jZUgjnSGyntRr6y5Muu1MJcwFl6kPu7k8qLF0IMNfLqvw0NZ4nnVDq0RVoZ0RvCyumib4Ez3KYrVfilrw+g==", - "dev": true, - "license": "MIT" - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-tsconfig": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz", - "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/giget": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/giget/-/giget-3.3.1.tgz", - "integrity": "sha512-r+mvuDjrjMpsdw46Kmeydb8bdHm7wOKw8wNBtTndkjbPjgAp5oUJUxRE76wZFknxIPokfWvep2qSXK37aXE6zg==", - "dev": true, - "license": "MIT", - "bin": { - "giget": "dist/cli.mjs" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC" - }, - "node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "dev": true, - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-in-ssh": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", - "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-wsl": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", - "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-inside-container": "^1.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/jiti": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", - "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", - "license": "MIT", - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/nodeca" - } - ], - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/lightningcss": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", - "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.33.0", - "lightningcss-darwin-arm64": "1.33.0", - "lightningcss-darwin-x64": "1.33.0", - "lightningcss-freebsd-x64": "1.33.0", - "lightningcss-linux-arm-gnueabihf": "1.33.0", - "lightningcss-linux-arm64-gnu": "1.33.0", - "lightningcss-linux-arm64-musl": "1.33.0", - "lightningcss-linux-x64-gnu": "1.33.0", - "lightningcss-linux-x64-musl": "1.33.0", - "lightningcss-win32-arm64-msvc": "1.33.0", - "lightningcss-win32-x64-msvc": "1.33.0" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", - "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", - "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", - "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", - "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", - "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", - "cpu": [ - "arm" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", - "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", - "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", - "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", - "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", - "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", - "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/modern-screenshot": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/modern-screenshot/-/modern-screenshot-4.7.0.tgz", - "integrity": "sha512-9YxN+ddPSMMlhylOv25VHzXrl9u67QRxoh7+SEewGtgUw7t6hHTrjptSDJUSne9oG4Xk/h2cwG15nIt4Hc9ujg==", - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.19", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz", - "integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/ohash": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.12.tgz", - "integrity": "sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw==", - "dev": true, - "license": "MIT" - }, - "node_modules/open": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/open/-/open-11.0.0.tgz", - "integrity": "sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==", - "dev": true, - "license": "MIT", - "dependencies": { - "default-browser": "^5.4.0", - "define-lazy-prop": "^3.0.0", - "is-in-ssh": "^1.0.0", - "is-inside-container": "^1.0.0", - "powershell-utils": "^0.1.0", - "wsl-utils": "^0.3.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/oxlint": { - "version": "1.86.0", - "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.86.0.tgz", - "integrity": "sha512-og0lhgvZfgGF//gOOmZXvtr+GmBbAGEnbEhv/QUg7UW2Wi4wHMnJbnMD+zuHgPdJxdklfgpPupdlAaAySyxrZg==", - "dev": true, - "license": "MIT", - "bin": { - "oxlint": "bin/oxlint" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/sponsors/oxc-project" - }, - "optionalDependencies": { - "@oxlint/binding-android-arm-eabi": "1.86.0", - "@oxlint/binding-android-arm64": "1.86.0", - "@oxlint/binding-darwin-arm64": "1.86.0", - "@oxlint/binding-darwin-x64": "1.86.0", - "@oxlint/binding-freebsd-x64": "1.86.0", - "@oxlint/binding-linux-arm-gnueabihf": "1.86.0", - "@oxlint/binding-linux-arm-musleabihf": "1.86.0", - "@oxlint/binding-linux-arm64-gnu": "1.86.0", - "@oxlint/binding-linux-arm64-musl": "1.86.0", - "@oxlint/binding-linux-ppc64-gnu": "1.86.0", - "@oxlint/binding-linux-riscv64-gnu": "1.86.0", - "@oxlint/binding-linux-riscv64-musl": "1.86.0", - "@oxlint/binding-linux-s390x-gnu": "1.86.0", - "@oxlint/binding-linux-x64-gnu": "1.86.0", - "@oxlint/binding-linux-x64-musl": "1.86.0", - "@oxlint/binding-openharmony-arm64": "1.86.0", - "@oxlint/binding-win32-arm64-msvc": "1.86.0", - "@oxlint/binding-win32-ia32-msvc": "1.86.0", - "@oxlint/binding-win32-x64-msvc": "1.86.0" - }, - "peerDependencies": { - "oxlint-tsgolint": ">=7.0.2003", - "vite-plus": "*" - }, - "peerDependenciesMeta": { - "oxlint-tsgolint": { - "optional": true - }, - "vite-plus": { - "optional": true - } - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, - "node_modules/perfect-debounce": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz", - "integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg-types": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.3.tgz", - "integrity": "sha512-j/lCFdcppV0JxWpCEITdbDltBxPP6cHT+yNJ6Go2OgoSA9518X847X9z0p6LtA4Nc16+eQzCZjRrWanTGvHJ5w==", - "dev": true, - "license": "MIT", - "dependencies": { - "confbox": "^0.3.1", - "exsolve": "^1.1.1", - "pathe": "^2.0.3" - } - }, - "node_modules/pkg-types/node_modules/confbox": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.3.1.tgz", - "integrity": "sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA==", - "dev": true, - "license": "MIT" - }, - "node_modules/postcss": { - "version": "8.5.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", - "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.18", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/powershell-utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.1.0.tgz", - "integrity": "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/rc9": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/rc9/-/rc9-3.1.0.tgz", - "integrity": "sha512-ufjkNVzbRHKcCOmTahZkmVsyc3W+MSk3jY03m+a7tGHkIsdVMG9l10/3HvFbWkkKzY5VFp3pkRsIo/UYgmFL7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "defu": "^6.1.7", - "destr": "^2.0.5" - } - }, - "node_modules/react": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/react/-/react-19.3.0.tgz", - "integrity": "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.0.tgz", - "integrity": "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==", - "license": "MIT", - "dependencies": { - "scheduler": "^0.28.0" - }, - "peerDependencies": { - "react": "^19.3.0" - } - }, - "node_modules/react-router": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-8.4.0.tgz", - "integrity": "sha512-JtydAkBvU9UTEe5qNC+POhu+ZBNM7rlKY2IegwXc7Idj7xfRG16x5RZrw3mju+XlqBxfvb2ky9P3jUp9WyWC1g==", - "license": "MIT", - "dependencies": { - "@remix-run/route-pattern": "^0.22.1", - "cookie-es": "^3.1.1" - }, - "engines": { - "node": ">=22.22.0" - }, - "peerDependencies": { - "react": ">=19.2.7", - "react-dom": ">=19.2.7" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - } - } - }, - "node_modules/readdirp": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.1.1.tgz", - "integrity": "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 20.19.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/rolldown": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.11.tgz", - "integrity": "sha512-qpSwIyz0jHQq5qXBTNxFmE6664rJ7O+4TvPFOiOaBSrz8IOHc1koKKSqTM2H6u1UG1+TveuC6vaDHKXFOvb1Kw==", - "license": "MIT", - "dependencies": { - "@oxc-project/types": "=0.151.0", - "@rolldown/pluginutils": "^1.0.0" - }, - "bin": { - "rolldown": "bin/cli.mjs" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.11", - "@rolldown/binding-android-arm64": "1.2.11", - "@rolldown/binding-darwin-arm64": "1.2.11", - "@rolldown/binding-darwin-x64": "1.2.11", - "@rolldown/binding-freebsd-x64": "1.2.11", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.11", - "@rolldown/binding-linux-arm64-gnu": "1.2.11", - "@rolldown/binding-linux-arm64-musl": "1.2.11", - "@rolldown/binding-linux-ppc64-gnu": "1.2.11", - "@rolldown/binding-linux-s390x-gnu": "1.2.11", - "@rolldown/binding-linux-x64-gnu": "1.2.11", - "@rolldown/binding-linux-x64-musl": "1.2.11", - "@rolldown/binding-openharmony-arm64": "1.2.11", - "@rolldown/binding-win32-arm64-msvc": "1.2.11", - "@rolldown/binding-win32-x64-msvc": "1.2.11" - } - }, - "node_modules/run-applescript": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", - "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/scheduler": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", - "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz", - "integrity": "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/tailwindcss": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", - "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", - "license": "MIT" - }, - "node_modules/tapable": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", - "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/typescript": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", - "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", - "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/vite": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.1.tgz", - "integrity": "sha512-/bvH9E9tmCXRGp2uXY3WbOldqpTwFkbha/8ANaEQ6VkxhH60KyqLwgZq6lG2y+4uT55x9+9eUHMpQ7uGnOCKjA==", - "license": "MIT", - "dependencies": { - "lightningcss": "^1.33.0", - "picomatch": "^4.0.7", - "postcss": "^8.5.28", - "rolldown": "~1.2.9", - "tinyglobby": "^0.2.17" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.7.1", - "esbuild": "^0.27.0 || ^0.28.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "@vitejs/devtools": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wsl-utils": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.3.1.tgz", - "integrity": "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-wsl": "^3.1.0", - "powershell-utils": "^0.1.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/frontend/package.json b/frontend/package.json index a4c2a89..b2af5a3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,9 +8,12 @@ "build": "tsc -b && vite build", "lint": "oxlint", "preview": "vite preview", - "api": "openapi-ts" + "api": "openapi-ts", + "build:toss": "tsc -b && vite build --mode toss --outDir dist-toss && ait build" }, "dependencies": { + "@apps-in-toss/web-framework": "3.8.0", + "@nalssigak/shared": "*", "@tailwindcss/vite": "^4.3.3", "@tanstack/react-query": "^5.104.0", "embla-carousel-react": "^8.6.0", diff --git a/frontend/public/privacy.html b/frontend/public/privacy.html index 92acfa6..abf9de9 100644 --- a/frontend/public/privacy.html +++ b/frontend/public/privacy.html @@ -19,15 +19,16 @@ <body> <main> <h1>개인정보처리방침</h1> -<p class="muted">시행일: 2026년 10월 13일</p> +<p class="muted">시행일: 2026년 10월 14일</p> -<p>AIO2O(이하 "회사")는 날씨각 웹 서비스(이하 "웹")와 날씨각 Wear OS 앱(이하 "워치 앱")을 운영하며, 「개인정보 보호법」에 따라 이용자의 개인정보를 다음과 같이 처리합니다.</p> +<p>AIO2O(이하 "회사")는 날씨각 웹 서비스(이하 "웹"), 토스 앱 안의 날씨각 미니앱(이하 "토스 미니앱"), 날씨각 Wear OS 앱(이하 "워치 앱")을 운영하며, 「개인정보 보호법」에 따라 이용자의 개인정보를 다음과 같이 처리합니다.</p> <h2>1. 수집하는 개인정보와 목적</h2> <table> <tr><th>구분</th><th>항목</th><th>목적</th></tr> <tr><td>웹 회원가입·로그인</td><td>아이디, 비밀번호(암호화 저장), 닉네임 / Google 로그인 시 Google 계정 고유 식별자</td><td>회원 식별, 좋아요·저장·댓글 기능 제공</td></tr> - <tr><td>웹·워치 앱 위치</td><td>대략적인 위치(위도·경도)</td><td>가장 가까운 지역(구)의 날씨와 주변 축제를 보여주기 위해 사용합니다. 위치 좌표는 지역을 찾는 데만 쓰고 서버에 저장하지 않습니다.</td></tr> + <tr><td>토스 미니앱 로그인</td><td>토스 로그인 시 토스가 주는 이용자 식별값(이 서비스에서만 쓰는 값), 닉네임</td><td>회원 식별, 좋아요·저장·댓글 기능 제공. 토스에서 동의받은 이름 등 다른 정보는 받아 저장하지 않습니다.</td></tr> + <tr><td>웹·토스 미니앱·워치 앱 위치</td><td>대략적인 위치(위도·경도)</td><td>가장 가까운 지역(구)의 날씨와 주변 축제를 보여주기 위해 사용합니다. 위치 좌표는 지역을 찾는 데만 쓰고 서버에 저장하지 않습니다.</td></tr> <tr><td>서비스 이용</td><td>접속 기록(IP 주소, 접속 시각, 브라우저 정보), 선택한 지역</td><td>서비스 운영, 오류 확인, 이용 통계</td></tr> </table> <p>위치 권한은 선택 사항입니다. 허용하지 않아도 지역을 직접 골라 이용할 수 있습니다. 워치 앱은 회원가입이나 로그인 없이 이용할 수 있습니다.</p> @@ -42,7 +43,7 @@ <p>보유 기간이 끝나거나 목적이 달성된 개인정보는 지체 없이 복구할 수 없는 방법으로 삭제합니다.</p> <h2>5. 이용자의 권리</h2> -<p>이용자는 언제든지 자신의 개인정보 열람, 정정, 삭제, 처리 정지와 회원 탈퇴를 요청할 수 있습니다. 아래 연락처로 요청하시면 지체 없이 처리합니다. 워치 앱의 위치 권한은 기기 설정에서 언제든지 끌 수 있습니다.</p> +<p>이용자는 언제든지 자신의 개인정보 열람, 정정, 삭제, 처리 정지와 회원 탈퇴를 요청할 수 있습니다. 아래 연락처로 요청하시면 지체 없이 처리합니다. 워치 앱의 위치 권한은 기기 설정에서 언제든지 끌 수 있습니다. 토스 미니앱 회원은 토스 앱에서 날씨각과의 연결을 끊을 수 있으며, 연결을 끊으면 로그인이 풀립니다.</p> <h2>6. 안전성 확보 조치</h2> <p>비밀번호는 암호화하여 저장하고, 개인정보에 접근할 수 있는 인원을 최소한으로 제한합니다.</p> diff --git a/frontend/public/terms.html b/frontend/public/terms.html new file mode 100644 index 0000000..51e0af9 --- /dev/null +++ b/frontend/public/terms.html @@ -0,0 +1,62 @@ +<!doctype html> +<html lang="ko"> +<head> +<meta charset="UTF-8" /> +<meta name="viewport" content="width=device-width, initial-scale=1.0" /> +<title>이용약관 - 날씨각 + + + + +
+

이용약관

+

시행일: 2026년 10월 20일

+ +

이 약관은 AIO2O(이하 "회사")가 운영하는 날씨각 웹·앱 서비스(이하 "서비스")를 이용하는 조건을 정합니다. 댓글을 쓰려면 이 약관에 동의해야 합니다.

+ +

1. 서비스

+

서비스는 지역별 날씨, 하늘·노을 예보, 생활 지수, 주변 행사 같은 정보를 제공합니다. 날씨 정보는 기상청 등 외부 자료를 바탕으로 한 예보이며 실제 날씨와 다를 수 있습니다.

+ +

2. 계정

+

웹·앱에서는 아이디·비밀번호나 구글 계정으로, 토스 앱 안의 미니앱에서는 토스 로그인으로 회원이 됩니다.

+

회원은 자신의 계정을 직접 관리해야 하며, 다른 사람에게 빌려주거나 넘길 수 없습니다. 회원은 언제든지 내 정보에서 탈퇴할 수 있고, 탈퇴하면 계정과 남긴 댓글·좋아요·저장·신고·차단 기록이 모두 지워집니다.

+ +

3. 댓글에 쓰면 안 되는 내용

+

아래 내용은 댓글로 쓸 수 없습니다.

+
    +
  • 욕설, 비하, 혐오, 따돌림, 위협
  • +
  • 광고, 홍보, 같은 내용 반복 게시
  • +
  • 전화번호·주소 등 자신이나 다른 사람의 개인정보
  • +
  • 음란하거나 폭력적인 내용, 불법 행위를 부추기는 내용
  • +
  • 다른 사람의 권리(저작권·초상권·명예 등)를 침해하는 내용
  • +
+ +

4. 신고·차단과 조치

+

회원은 댓글마다 신고하거나 그 댓글을 쓴 사람을 차단할 수 있습니다. 신고한 댓글과 차단한 사람의 댓글은 본인에게 더는 보이지 않습니다. 신고가 여러 건 쌓인 댓글은 자동으로 숨겨지고, 회사가 확인해 3항을 어긴 댓글은 숨기거나 지우며, 반복해서 어긴 회원은 서비스 이용을 제한할 수 있습니다. 조치에 이의가 있으면 아래 연락처로 알려 주세요.

+ +

5. 게시물의 권리와 책임

+

댓글의 권리와 책임은 작성한 회원에게 있습니다. 회사는 서비스 화면에 댓글을 보여 주는 범위에서만 이를 사용합니다.

+ +

6. 서비스 변경·중단

+

회사는 운영상 필요하면 서비스 내용을 바꾸거나 중단할 수 있으며, 중요한 변경은 미리 서비스 안에 알립니다.

+ +

7. 책임의 한계

+

회사는 예보와 실제 날씨의 차이, 회원 사이의 다툼, 회원이 쓴 댓글로 생긴 손해에 대해 회사의 고의나 중대한 과실이 없으면 책임지지 않습니다.

+ +

8. 개인정보

+

개인정보 처리는 개인정보처리방침을 따릅니다.

+ +

9. 문의

+

운영자: AIO2O
이메일: o2odev@o2o.kr

+ +

10. 약관 변경

+

이 약관이 바뀌면 시행 7일 전부터 이 페이지에 알립니다.

+
+ + diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index bc573d3..aad4c2a 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -3,6 +3,7 @@ import { BLayout } from './b/BLayout' import { FoliagePage } from './b/FoliagePage' import { GakPage } from './b/GakPage' import { SeasonPage } from './b/SeasonPage' +import { ShortsPage } from './b/Shorts' import { SkyPage } from './b/SkyPage' import { TalkPage } from './b/TalkPage' import { TodayPage } from './b/TodayPage' @@ -22,6 +23,7 @@ export default function App() { } /> } /> } /> + } /> } /> diff --git a/frontend/src/api/client/index.ts b/frontend/src/api/client/index.ts deleted file mode 100644 index 79a1a67..0000000 --- a/frontend/src/api/client/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export { addComment, addMyGak, addTalk, authConfig, blockTalkAuthor, createCard, deleteComment, deleteMyGak, deleteTalk, getArticle, getCardImage, getFeed, getImage, getIndex, getPost, getSeasonWeek, getSky, getSkyRanking, getTalkImage, getTodayGuPage, getTodayPage, getTomorrowGuPage, getTomorrowPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, googleLogin, healthzHealthzGet, likeComment, likePost, likeTalk, listArticles, listCards, listComments, listEvents, listIndices, listMyGak, listMyTalks, listPlaces, listPresets, listRegions, listSaved, listTalks, login, logout, me, nearestRegion, type Options, publishCard, refresh, rejectCard, reportTalk, savePost, scoreMyGak, signup, talkGroups, unlikeComment, unlikePost, unlikeTalk, unsavePost, updateMe, uploadTalkImage } from './sdk.gen'; -export { type AddCommentData, type AddCommentError, type AddCommentErrors, type AddCommentResponse, type AddCommentResponses, type AddMyGakData, type AddMyGakError, type AddMyGakErrors, type AddMyGakResponse, type AddMyGakResponses, type AddTalkData, type AddTalkError, type AddTalkErrors, type AddTalkResponse, type AddTalkResponses, type AirData, AirGrade, ArticleCategory, type ArticleSummary, type AuthConfigData, type AuthConfigResponse, type AuthConfigResponses, AuthProvider, type BandArticle, type BandEvent, type Bands, type BestTime, type BlockTalkAuthorData, type BlockTalkAuthorError, type BlockTalkAuthorErrors, type BlockTalkAuthorResponse, type BlockTalkAuthorResponses, type BodyUploadTalkImageV1TalkImagePost, type CardItem, CardStatus, type ClientOptions, type CommentData, type CommuteData, Confidence, type CreateCardData, type CreateCardError, type CreateCardErrors, type CreateCardResponse, type CreateCardResponses, type Cut, type DayData, type DeleteCommentData, type DeleteCommentError, type DeleteCommentErrors, type DeleteCommentResponse, type DeleteCommentResponses, type DeleteMyGakData, type DeleteMyGakError, type DeleteMyGakErrors, type DeleteMyGakResponse, type DeleteMyGakResponses, type DeleteTalkData, type DeleteTalkError, type DeleteTalkErrors, type DeleteTalkResponse, type DeleteTalkResponses, type ErrorInfo, type EventData, type Factor, type GakSlide, type GetArticleData, type GetArticleError, type GetArticleErrors, type GetArticleResponse, type GetArticleResponses, type GetCardImageData, type GetCardImageError, type GetCardImageErrors, type GetCardImageResponses, type GetFeedData, type GetFeedError, type GetFeedErrors, type GetFeedResponse, type GetFeedResponses, type GetImageData, type GetImageError, type GetImageErrors, type GetImageResponses, type GetIndexData, type GetIndexError, type GetIndexErrors, type GetIndexResponse, type GetIndexResponses, type GetPostData, type GetPostError, type GetPostErrors, type GetPostResponse, type GetPostResponses, type GetSeasonWeekData, type GetSeasonWeekResponse, type GetSeasonWeekResponses, type GetSkyData, type GetSkyError, type GetSkyErrors, type GetSkyRankingData, type GetSkyRankingResponse, type GetSkyRankingResponses, type GetSkyResponse, type GetSkyResponses, type GetTalkImageData, type GetTalkImageError, type GetTalkImageErrors, type GetTalkImageResponses, type GetTodayGuPageData, type GetTodayGuPageError, type GetTodayGuPageErrors, type GetTodayGuPageResponse, type GetTodayGuPageResponses, type GetTodayPageData, type GetTodayPageError, type GetTodayPageErrors, type GetTodayPageResponse, type GetTodayPageResponses, type GetTomorrowGuPageData, type GetTomorrowGuPageError, type GetTomorrowGuPageErrors, type GetTomorrowGuPageResponse, type GetTomorrowGuPageResponses, type GetTomorrowPageData, type GetTomorrowPageError, type GetTomorrowPageErrors, type GetTomorrowPageResponse, type GetTomorrowPageResponses, type GetWatchSummaryData, type GetWatchSummaryError, type GetWatchSummaryErrors, type GetWatchSummaryResponse, type GetWatchSummaryResponses, type GetWeatherNowData, type GetWeatherNowError, type GetWeatherNowErrors, type GetWeatherNowResponse, type GetWeatherNowResponses, type GetWeatherTodayData, type GetWeatherTodayError, type GetWeatherTodayErrors, type GetWeatherTodayResponse, type GetWeatherTodayResponses, type GetWeekData, type GetWeekError, type GetWeekErrors, type GetWeekRankingData, type GetWeekRankingResponse, type GetWeekRankingResponses, type GetWeekResponse, type GetWeekResponses, type GoogleLoginData, type GoogleLoginError, type GoogleLoginErrors, type GoogleLoginResponse, type GoogleLoginResponses, type HealthzHealthzGetData, type HealthzHealthzGetResponse, type HealthzHealthzGetResponses, type Hero, type HeroStat, type HeroTomorrow, type HourCell, type HoursSlide, type HttpValidationError, type ImageSlide, IndexCategory, type IndexSummary, type LikeCommentData, type LikeCommentError, type LikeCommentErrors, type LikeCommentResponse, type LikeCommentResponses, type LikePostData, type LikePostError, type LikePostErrors, type LikePostResponse, type LikePostResponses, type LikeTalkData, type LikeTalkError, type LikeTalkErrors, type LikeTalkResponse, type LikeTalkResponses, type ListArticlesData, type ListArticlesError, type ListArticlesErrors, type ListArticlesResponse, type ListArticlesResponses, type ListCardsData, type ListCardsError, type ListCardsErrors, type ListCardsResponse, type ListCardsResponses, type ListCommentsData, type ListCommentsError, type ListCommentsErrors, type ListCommentsResponse, type ListCommentsResponses, type ListEventsData, type ListEventsError, type ListEventsErrors, type ListEventsResponse, type ListEventsResponses, type ListIndicesData, type ListIndicesError, type ListIndicesErrors, type ListIndicesResponse, type ListIndicesResponses, type ListMyGakData, type ListMyGakError, type ListMyGakErrors, type ListMyGakResponse, type ListMyGakResponses, type ListMyTalksData, type ListMyTalksError, type ListMyTalksErrors, type ListMyTalksResponse, type ListMyTalksResponses, type ListPlacesData, type ListPlacesError, type ListPlacesErrors, type ListPlacesResponse, type ListPlacesResponses, type ListPresetsData, type ListPresetsResponse, type ListPresetsResponses, type ListRegionsData, type ListRegionsError, type ListRegionsErrors, type ListRegionsResponse, type ListRegionsResponses, type ListSavedData, type ListSavedError, type ListSavedErrors, type ListSavedResponse, type ListSavedResponses, type ListTalksData, type ListTalksError, type ListTalksErrors, type ListTalksResponse, type ListTalksResponses, type LoginData, type LoginError, type LoginErrors, type LoginResponse, type LoginResponses, type LogoutData, type LogoutError, type LogoutErrors, type LogoutResponse, type LogoutResponses, type Me, type MeData, type MeError, type MeErrors, type MeResponse, type MeResponses, type MyGakData, type MyGakPreset, type MyGakRule, type MyGakScore, type NearestRegionData, type NearestRegionError, type NearestRegionErrors, type NearestRegionResponse, type NearestRegionResponses, type PlaceData, type PlanSlide, type PlanSpot, type PlanStep, type PostData, type PostReaction, PostType, type PublishCardData, type PublishCardError, type PublishCardErrors, type PublishCardResponse, type PublishCardResponses, type Rain2h, type RainHourData, RainType, type RankData, type RefreshData, type RefreshError, type RefreshErrors, type RefreshResponse, type RefreshResponses, type RegionData, type RejectCardData, type RejectCardError, type RejectCardErrors, type RejectCardResponse, type RejectCardResponses, type ReportTalkData, type ReportTalkError, type ReportTalkErrors, type ReportTalkResponse, type ReportTalkResponses, type ReqCardCreate, type ReqComment, type ReqGoogle, type ReqLogin, type ReqMyGak, type ReqMyGakScore, type ReqRefresh, type ReqSignup, type ReqTalk, type ReqTalkReport, type ReqUpdateMe, type ResArticle, type ResArticleList, type ResAuth, type ResAuthConfig, type ResCard, type ResCardList, type ResComment, type ResCommentLike, type ResCommentList, type ResEventList, type ResFeed, type ResHealth, type ResIndexDetail, type ResIndexList, type ResLogout, type ResMe, type ResMyGak, type ResMyGakList, type ResMyGakPresets, type ResMyGakScore, type ResPlaceList, type ResPost, type ResPostLike, type ResPostSave, type ResRegion, type ResRegionList, type ResSavedList, type ResSeasonWeek, type ResSky, type ResSkyRanking, type ResTalk, type ResTalkGroups, type ResTalkImage, type ResTalkLike, type ResTalkList, type ResWatchSummary, type ResWeatherNow, type ResWeatherToday, type ResWebPacketProtocol, type ResWeek, type ResWeekRanking, type Row, type RowsSlide, type SavedPost, type SavePostData, type SavePostError, type SavePostErrors, type SavePostResponse, type SavePostResponses, type ScoreBand, type ScoreMyGakData, type ScoreMyGakError, type ScoreMyGakErrors, type ScoreMyGakResponse, type ScoreMyGakResponses, type SignupData, type SignupError, type SignupErrors, type SignupResponse, type SignupResponses, Sky, SkyGrade, type SkyPlanData, type SkyScoreData, SkySituation, SkyType, type SlotPoint, SlotTone, type SpotData, type SunsetSlide, type TalkData, type TalkGroup, type TalkGroupsData, type TalkGroupsError, type TalkGroupsErrors, type TalkGroupsResponse, type TalkGroupsResponses, TalkReport, TalkTopic, type TermData, type Tomorrow, type TopIndex, type TrendPoint, type UnlikeCommentData, type UnlikeCommentError, type UnlikeCommentErrors, type UnlikeCommentResponse, type UnlikeCommentResponses, type UnlikePostData, type UnlikePostError, type UnlikePostErrors, type UnlikePostResponse, type UnlikePostResponses, type UnlikeTalkData, type UnlikeTalkError, type UnlikeTalkErrors, type UnlikeTalkResponse, type UnlikeTalkResponses, type UnsavePostData, type UnsavePostError, type UnsavePostErrors, type UnsavePostResponse, type UnsavePostResponses, type UpdateMeData, type UpdateMeError, type UpdateMeErrors, type UpdateMeResponse, type UpdateMeResponses, type UploadTalkImageData, type UploadTalkImageError, type UploadTalkImageErrors, type UploadTalkImageResponse, type UploadTalkImageResponses, type ValidationError, type WarningData, WarningLevel, WarningType, type WatchEvent, type WatchNow, type WatchSlot, type WatchSunset, type WatchTimeline, type WeatherSlot, type WeatherWhy, type WeekDay, type WeekGak, type WeekRankDay, type WeekRankItem, type WeekSlide } from './types.gen'; diff --git a/frontend/src/api/setup.ts b/frontend/src/api/setup.ts index 34dcde4..303c90c 100644 --- a/frontend/src/api/setup.ts +++ b/frontend/src/api/setup.ts @@ -1,72 +1,14 @@ -import { client } from './client/client.gen' -import { clearTokens, emitAuthRequired, getAccessToken, getRefreshToken, setTokens } from './auth' +import { configureApi } from '@nalssigak/shared/api/setup' export const API_BASE_URL: string = import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:9810' export const SITE_URL: string = (import.meta.env.VITE_SITE_URL || window.location.origin).replace(/\/+$/, '') -type Refresh = 'ok' | 'rejected' | 'unreachable' - -// 401이 한꺼번에 와도 갱신은 한 번만 -let refreshing: Promise | null = null - -/** 서버가 거절하면 'rejected', 네트워크 오류·5xx 면 'unreachable' (이때는 토큰을 지우지 않는다) */ -function refreshTokens(): Promise { - refreshing ??= (async (): Promise => { - const token = getRefreshToken() - if (!token) return 'rejected' - const res = await fetch(`${API_BASE_URL}/v1/auth/refresh`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ refresh_token: token }) }) - if (res.status >= 500) return 'unreachable' - const body = res.ok ? await res.json() : null - if (!body?.result?.success || !body.access_token) return 'rejected' - setTokens(body.access_token, body.refresh_token ?? token) - return 'ok' - })() - .catch((): Refresh => 'unreachable') - .finally(() => { - refreshing = null - }) - return refreshing -} - -const NO_REFRESH = ['/v1/auth/login', '/v1/auth/signup', '/v1/auth/refresh'] - -/** 같은 요청을 토큰만 바꿔(null 이면 빼고) 다시 보낼 수 있게 복사한다 */ -function withToken(request: Request, token: string | null) { - const copy = request.clone() - if (token) copy.headers.set('Authorization', `Bearer ${token}`) - else copy.headers.delete('Authorization') - return copy -} - -/** - * 401이면 토큰을 한 번 갱신해 같은 요청을 다시 보낸다. - * 갱신이 거절되면 토큰을 지우고, 로그인 없이 되는 요청은 그냥 다시 보내고, 로그인이 꼭 필요한 요청만 로그인 창을 띄운다. - */ -async function authFetch(input: RequestInfo | URL, init?: RequestInit): Promise { - const request = input instanceof Request && !init ? input : new Request(input, init) - const retry = request.clone() - const response = await fetch(request) - if (response.status !== 401 || NO_REFRESH.includes(new URL(request.url).pathname)) return response - if (request.headers.has('Authorization')) { - const result = await refreshTokens() - if (result === 'unreachable') return response - if (result === 'ok') { - const again = await fetch(withToken(retry, getAccessToken())) - if (again.status !== 401) return again - } - if (getAccessToken()) clearTokens() - const anonymous = await fetch(withToken(retry, null)) - if (anonymous.status !== 401) return anonymous - } - // 로그인 창은 사람이 한 동작(글쓰기·댓글 등)에만 띄운다. 화면이 알아서 받는 GET(내 정보 등)이나 로그아웃이 만료로 401이면 조용히 로그아웃 상태로 둔다 - if (request.method !== 'GET' && new URL(request.url).pathname !== '/v1/auth/logout') emitAuthRequired() - return response -} - -client.setConfig({ baseUrl: API_BASE_URL, throwOnError: true, fetch: authFetch }) - -client.interceptors.request.use((request) => { - const token = getAccessToken() - if (token) request.headers.set('Authorization', `Bearer ${token}`) - return request +// 사파리 프라이빗 모드 등에서는 localStorage 를 읽는 것만으로 에러가 나서 쓸 때마다 꺼낸다 +configureApi({ + baseUrl: API_BASE_URL, + storage: { + getItem: (key) => localStorage.getItem(key), + setItem: (key, value) => localStorage.setItem(key, value), + removeItem: (key) => localStorage.removeItem(key), + }, }) diff --git a/frontend/src/b/BLayout.tsx b/frontend/src/b/BLayout.tsx index a48b43d..02a8514 100644 --- a/frontend/src/b/BLayout.tsx +++ b/frontend/src/b/BLayout.tsx @@ -1,9 +1,10 @@ import { useCallback, useEffect, useMemo, useState, type ReactNode } from 'react' import { NavLink, Outlet, useLocation, useNavigationType } from 'react-router' import { useIsFetching, useQuery } from '@tanstack/react-query' -import { getSeasonWeekOptions } from '../api/client/@tanstack/react-query.gen' +import { getSeasonWeekOptions } from '@nalssigak/shared/api/client/@tanstack/react-query.gen' +import { IS_TOSS } from '../lib/platform' import { cx } from '../lib/utils' -import { kindOfHour, kst, seasonOf, type TimeKind } from './lib' +import { kindOfHour, kst, seasonOf, type TimeKind } from '@nalssigak/shared/lib' import './b.css' import { AuthProvider } from './auth' import { RegionProvider } from './region' @@ -12,6 +13,7 @@ import { useRegion } from './regionContext' import { useSheet } from './sheetContext' import { SheetProvider } from './Sheets' import { SkyContext, useSky } from './skyContext' +import { TossIntro } from './tossIntro' import { PinIcon, TabIcon } from './svg' import { Avatar, Ic, Skel } from './ui' @@ -60,7 +62,7 @@ function TopBar() { {locateStatus === 'locating' ? : {region.name}{region.name.split(' ').at(-1)}} - {mePending ? ( + {IS_TOSS ? null : mePending ? ( ) : me ? ( + {step !== 'closed' && ( + + {step === 'menu' && ( + <> + + + + )} + {step === 'report' && + REPORT_REASONS.map(([reason, label]) => ( + + ))} + {step === 'block' && ( + <> + {c.nickname}님 댓글을 더는 안 볼까요? + + + + )} + {failed && ( + + 잠시 뒤에 다시 해 주세요. + + )} + + )} + + ) +} + +function CommentRow({ c, postId, onNotice }: { c: CommentData; postId: number; onNotice: (text: string) => void }) { const { region } = useRegion() const queryClient = useQueryClient() const [liked, setLiked] = useState(c.liked) @@ -711,6 +813,7 @@ function CommentRow({ c, postId }: { c: CommentData; postId: number }) { )} + {!c.mine && } - ))} - -

- {addFailed && '댓글을 올리지 못했어요. 다시 해 주세요.'} + {askTerms ? ( +

+

댓글을 쓰려면 이용약관에 동의해 주세요. 욕설·광고·개인정보 노출은 숨겨지고, 계속되면 이용이 제한돼요.

+
+ + 이용약관 보기 + + +
+
+ ) : ( +
+ {EMOJIS.map((e) => ( + + ))} +
+ )} +

+ {addFailed ? '댓글을 올리지 못했어요. 다시 해 주세요.' : notice}

setText(e.target.value)} readOnly={add.isPending} maxLength={60} placeholder={me ? `${me.nickname}(으)로 댓글 달기…` : '댓글 달기…'} aria-label="댓글" className="min-w-0 flex-1 rounded-full border border-[#dfe5ee] bg-[#f7f9fc] px-3.5 py-2.5" /> @@ -820,6 +968,7 @@ function LoginSheet({ onDone, onLoggedIn }: { onDone: () => void; onLoggedIn: () const fail = () => setError('서버에 닿지 못했어요. 잠시 뒤에 다시 해 주세요.') if (me) return + if (IS_TOSS) return return ( @@ -843,7 +992,105 @@ function LoginSheet({ onDone, onLoggedIn }: { onDone: () => void; onLoggedIn: () ) } -/* ---------- 내 정보: 캐릭터·닉네임·로그아웃 ---------- */ +/** 토스판은 로그인이 없다. 로그인이 필요한 곳(두 번째 내 각)에서 안내만 한다 */ +function TossNoLoginSheet({ onDone }: { onDone: () => void }) { + return ( + +

토스에서는 내 각을 하나만 만들 수 있어요. 지금 각을 지우고 새로 만들어 주세요.

+ + + ) +} + +/* ---------- 내 정보: 캐릭터·닉네임·로그아웃·탈퇴 ---------- */ +/** 탈퇴: 한 번 더 묻고 지운다. 계정이 없어지니 이 기기 토큰도 지운다 */ +function Withdraw({ onDone }: { onDone: () => void }) { + const withdraw = useMutation(withdrawMutation()) + const [asking, setAsking] = useState(false) + const [failed, setFailed] = useState(false) + if (!asking) + return ( + + ) + const run = () => { + setFailed(false) + withdraw.mutate( + {}, + { + onSuccess: (res) => { + if (!res.result?.success) return setFailed(true) + clearTokens() + onDone() + }, + onError: () => setFailed(true), + }, + ) + } + return ( +
+

+ 탈퇴하면 계정과 남긴 댓글·좋아요가 +
+ 모두 지워져요. 되돌릴 수 없어요. +

+
+ + +
+ {failed &&

탈퇴하지 못했어요. 잠시 뒤에 다시 해 주세요.

} +
+ ) +} + +/** 차단한 사람: 있을 때만 보이고, 풀면 그 사람 댓글이 다시 보인다 */ +function Blocked() { + const queryClient = useQueryClient() + const list = useQuery(listBlockedOptions()) + const unblock = useMutation(unblockMutation()) + const [failed, setFailed] = useState(false) + const users = list.data?.users ?? [] + if (!users.length) return null + const release = (user_id: string) => { + setFailed(false) + unblock.mutate( + { path: { user_id } }, + { + onSuccess: (res) => { + if (!res.result?.success) return setFailed(true) + queryClient.invalidateQueries({ queryKey: listBlockedQueryKey() }) + queryClient.invalidateQueries({ predicate: isCommentList }) + }, + onError: () => setFailed(true), + }, + ) + } + return ( +
+

차단한 사람

+
    + {users.map((u) => ( +
  • + + {u.nickname} + +
  • + ))} +
+ {failed &&

잠시 뒤에 다시 해 주세요.

} +
+ ) +} + function MeSheet({ onDone }: { onDone: () => void }) { const install = useInstall() const installable = useInstallable() @@ -880,7 +1127,7 @@ function MeSheet({ onDone }: { onDone: () => void }) {
-

{me.provider === AuthProvider.GOOGLE ? '구글 계정으로 로그인했어요' : `${me.login_id}(으)로 로그인했어요`}

+

{me.provider === AuthProvider.TOSS ? '토스로 로그인했어요' : me.provider === AuthProvider.GOOGLE ? '구글 계정으로 로그인했어요' : `${me.login_id}(으)로 로그인했어요`}

{installable && ( + + ) } @@ -1046,12 +1295,12 @@ function RegionSheet({ onDone }: { onDone: () => void }) { ))} -

+ {!IS_TOSS &&

{me ? `${me.nickname}(으)로 로그인했어요` : '로그인하면 좋아요·댓글을 쓸 수 있어요'} -

+

} ) } diff --git a/frontend/src/b/Shorts.tsx b/frontend/src/b/Shorts.tsx new file mode 100644 index 0000000..9eb993e --- /dev/null +++ b/frontend/src/b/Shorts.tsx @@ -0,0 +1,338 @@ +import { useQuery } from '@tanstack/react-query' +import { type CSSProperties, type PointerEvent as ReactPointerEvent, useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from 'react' +import { Link, useNavigate, useParams } from 'react-router' +import { listShortsOptions } from '@nalssigak/shared/api/client/@tanstack/react-query.gen' +import type { ShortItem } from '@nalssigak/shared/api/client' +import { cx } from '../lib/utils' +import { Rail, Skel, SkelRail, TAP44 } from './ui' + +// 유튜브는 플레이어가 200×200 이상이어야 해서, 카드 안 미리보기는 200px 너비로 띄우고 줄여 보인다. +// 위 로고·아래 제목 줄이 작은 카드에서 겹쳐 보이지 않게 가운데를 1.4배로 키워 위아래를 잘라 낸다 +const CARD_W = 120 +const PLAYER_W = 200 +const SCALE = (CARD_W / PLAYER_W) * 1.4 + +// 쇼츠 페이지의 영상 칸: 위 헤더(54px)·버튼 줄(48px)과 아래 탭 바(--shorts-tab) 사이 높이와 화면 너비 안에 9:16으로 맞춘다 +const FIT = { width: 'min(100vw, calc((100dvh - env(safe-area-inset-top, 0px) - 54px - 48px - var(--shorts-tab, 0px)) * 9 / 16))', aspectRatio: '9 / 16' } + +/** 아래 탭 바 높이 (기기마다 안전 영역이 달라 실제로 잰다) */ +function useTabBarHeight() { + const [h, setH] = useState(0) + useLayoutEffect(() => { + const nav = document.querySelector('nav.b-tabbar') + if (!nav) return + const ro = new ResizeObserver(() => setH(nav.offsetHeight)) + ro.observe(nav) + return () => ro.disconnect() + }, []) + return h +} + +const YT_ORIGIN = 'https://www.youtube-nocookie.com' + +function embed(id: string) { + const q = new URLSearchParams({ + autoplay: '1', mute: '1', playsinline: '1', loop: '1', playlist: id, controls: '0', rel: '0', modestbranding: '1', + enablejsapi: '1', origin: window.location.origin, + }) + return `${YT_ORIGIN}/embed/${id}?${q}` +} + +type Func = 'playVideo' | 'pauseVideo' | 'seekTo' | 'mute' | 'unMute' + +/** 이미 띄운 플레이어에 명령 (IFrame API 메시지) */ +function command(frame: HTMLIFrameElement | null | undefined, func: Func, args: unknown[] = []) { + frame?.contentWindow?.postMessage(JSON.stringify({ event: 'command', func, args }), YT_ORIGIN) +} + +const PLAYING = 1 +// 마우스로 이만큼 끌면 다음·이전 영상으로 넘긴다 +const SWIPE_PX = 30 + +/** 화면에 보이는 동안만 true */ +function useVisible(threshold = 0.5) { + const [el, ref] = useState(null) + const [visible, setVisible] = useState(false) + useEffect(() => { + if (!el) return + const io = new IntersectionObserver(([e]) => setVisible(e.isIntersecting), { threshold }) + io.observe(el) + return () => io.disconnect() + }, [el, threshold]) + return [ref, visible] as const +} + +/** 오늘 화면 히어로 아래 쇼츠 줄: 첫 카드만 소리 없이 재생, 누르면 쇼츠 페이지(/shorts/영상ID)에서 위아래로 넘겨 본다 */ +export function ShortsRail() { + const q = useQuery(listShortsOptions()) + const items = q.data?.items ?? [] + const [ref, visible] = useVisible() + + if (q.isPending) { + return ( + + ) + } + if (!items.length) return null + + return ( +
+ + {items.map((s, i) => ( + + ))} + +
+ ) +} + +function ShortCard({ s, playing }: { s: ShortItem; playing: boolean }) { + return ( + + + {playing && ( +