Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/tagging_song.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .github/workflows/translation_jpn.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Translation J-POP Songs

on:
# 태그 기능 비활성화로 스케줄 실행 중단. 필요하면 workflow_dispatch로 수동 실행.
# schedule:
# - cron: "0 10 * * *" # 매일 한국 시간 19:00 실행 (UTC+9 → UTC 10:00)
schedule:
- cron: "0 10 * * *" # 매일 한국 시간 19:00 실행 (UTC+9 → UTC 10:00)
workflow_dispatch:
inputs:
limit:
description: "이번 실행에서 번역할 최대 곡 수 (비워두면 10000)"
required: false

permissions:
contents: write
contents: read

jobs:
run-npm-task:
Expand Down Expand Up @@ -41,4 +44,6 @@ jobs:

- name: Run translation script - translationJpn.ts
working-directory: packages/crawling
env:
TRANS_JPN_LIMIT: ${{ inputs.limit }}
run: pnpm run trans-jpn
10 changes: 8 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,15 @@ chore : 버전 2.3.0 (#61)
Vercel의 `SUPABASE_SERVICE_ROLE_KEY`가 모두 없어졌다. **확정 로직을 웹으로 되돌리지 말 것** —
공개 엔드포인트가 다시 생긴다.

### 태그 기능 제거 (완료 — 참고용)
### 태그·추천(thumb) 기능 제거 (완료 — 참고용)

검색 언어 태그 필터가 오작동해 관련 코드를 전부 걷어냈다: 프론트(`LanguageTagFilter.tsx` 등)와 `api/search`의 `song_tags` 조인, `artists.language_tag_id` 참조(추후 대시보드에서 컬럼 수동 삭제 예정)를 제거했고, `packages/crawling`의 `taggingSongs.ts`/`translationJpn.ts`는 삭제 대신 전체 주석처리했다. `tagging_song.yml`/`translation_jpn.yml`은 `schedule` 트리거만 비활성화(주석)했고 `workflow_dispatch`로 수동 실행은 여전히 가능하다. `tags`/`song_tags` 테이블 자체는 DB에 남아있지만 앱은 더 이상 참조하지 않는다.
**태그** — 검색 언어 태그 필터가 오작동해 관련 코드를 전부 걷어냈다. 1차로 프론트(`LanguageTagFilter.tsx` 등)와 `api/search`의 `song_tags` 조인, `artists.language_tag_id` 참조를 제거하고 배치 스크립트는 주석처리만 해뒀다가, 2차로 주석 잔재까지 삭제했다: `taggingSongs.ts`와 전용 유틸(`getSongTag.ts`, `getSongFullTag.ts`), DB 헬퍼(`postSongTagsDB`, `deleteSongTagsBySongIdsDB`, `getSongTagSongIdsDB`), `tag-songs` 스크립트, `tagging_song.yml` 워크플로.

**일본곡 번역은 유지한다** — 태그를 걷어낼 때 `translationJpn.ts`도 같이 지웠다가 복구했다. `title_ko`·`artist_ko`는 검색이 함께 훑는 컬럼이라("요네즈 켄시"로 米津玄師가 잡히는 이유) 신규 유입곡에 계속 채워져야 한다. 대상 선정만 바뀌었다: `song_tags.tag_id=101` 조인 대신 **미번역(`title_ko is null`) + 가나·한자 포함**을 PostgREST `match`(정규식) 연산자로 서버에서 거르고, 일본곡 판별은 스크립트가 한 번 더 한다 — ① 한글 있으면 한국곡 스킵 ② 가나 있으면 일본곡 ③ 가나가 없으면 아는 일본 아티스트일 때만(米津玄師처럼 한자뿐인 이름) 번역 — `artistAlias` 사전에 있거나 이미 번역된 곡이 있는 아티스트. ③을 넘기면 안 된다. 한자 범위에 중국곡이 함께 걸려(후보 2,312곡 중 2,120곡이 刘德华·费玉清류다) 일본어 프롬프트에 넣으면 엉뚱한 표기가 DB에 박힌다.

**추천(thumb)** — `#295`에서 검색 화면의 추천 진입점이 사라진 뒤 `ThumbUpModal`이 아무 데서도 import되지 않는 고아 컴포넌트로 남아 있었다. 화면 로직은 이미 없었지만 `api/search`가 여전히 `thumb_logs(*)`를 select 절에 조인하고 있어, 테이블만 지우면 검색 전체가 `PGRST200`으로 깨지는 상태였다. 조인·모달·훅·API 라우트(`/api/songs/thumb-up`)·타입(`Song.thumb`, `ThumbUpSong`)을 모두 제거했다.

**남은 일** — 코드에는 참조가 없으니 Supabase 대시보드에서 `tags` · `song_tags` · `thumb_logs` 테이블과 `artists.language_tag_id` 컬럼을 수동 삭제하면 된다. `thumb_logs` 드롭은 **위 `api/search` 수정이 배포된 뒤에** 해야 한다.

## Self-Maintenance

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Supabase를 활용한 자체 DB를 통해 금영, TJ 노래방의 번호를 한
sing-code/
├── apps/ # 실제 서비스 앱이 위치하는 디렉토리
│ └── web/ # 웹 애플리케이션 (Next.js)
│ └── twa/ # bubblewrap을 활용해 PWA 사이트를 WebView 로 감싼 Android App 번들링
├── packages/ # 앱에서 공통으로 사용하는 패키지 모음
│ ├── crawling/ # DB에 입력 데이터 크롤링 패키지
│ ├── open-api/ # 노래방 번호 제공하는 OPEN API 모듈 패키지 (국내 곡 한정)
Expand Down Expand Up @@ -172,6 +173,11 @@ sing-code/
- 2026.4.19 : 버전 2.5.0 배포. 일본어 곡 한국어 번역 기능 추가. 크롤링으로 곡 국가 태깅, 번역 업데이트 진행.
- 2026.5.19 : 버전 2.6.0 배포. 패치노트, 댓글, 오류 신고, 곡 홍보, 포인트 사용내역 조회, 등 다수의 기능 추가.
- 2026.6.8 : 버전 2.7.0 배포. 마스코트 추가. 일본어 곡 한글로 검색 가능.
- 2026.6.12 : 버전 2.8.0 배포. TJ노래방 홈페이지에 1 ~ 99999 곡 전체 신규 크롤링.
- 2026.7.16 : 버전 2.9.0 배포. 노래 검색 시 태그 필터링 추가. TWA 세팅.
- 2026.7.31 : 버전 2.10.0 배포. 가이드 투어 기능 추가.
- 2026.8.15 : 버전 2.11.0 배포. 노래방 공식 차트 추가.
- 2026.8.27 : 버전 2.12.0 배포. 이 달의 아티스트 투표 기능 추가.

## 📝 회고

Expand Down
6 changes: 3 additions & 3 deletions apps/web/public/sitemap-0.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://www.singcode.kr/manifest.webmanifest</loc><lastmod>2026-08-25T16:04:17.180Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://www.singcode.kr/patch-notes</loc><lastmod>2026-08-25T16:04:17.182Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://www.singcode.kr</loc><lastmod>2026-08-25T16:04:17.182Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://www.singcode.kr/manifest.webmanifest</loc><lastmod>2026-08-28T16:24:56.791Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://www.singcode.kr/patch-notes</loc><lastmod>2026-08-28T16:24:56.793Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://www.singcode.kr</loc><lastmod>2026-08-28T16:24:56.794Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
</urlset>
10 changes: 2 additions & 8 deletions apps/web/src/app/api/search/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import { SearchSong, Song } from '@/types/song';
import { getAuthenticatedUser } from '@/utils/getAuthenticatedUser';

interface DBSong extends Song {
thumb_logs:
| {
thumb_count: number;
}[]
| null;
tosings: {
user_id: string;
}[];
Expand Down Expand Up @@ -235,8 +230,8 @@ export async function GET(request: Request): Promise<NextResponse<ApiResponse<Se
const supabase = await createClient();

const selectClause = authenticated
? `*, thumb_logs(*), tosings(user_id), like_activities(user_id), save_activities(user_id)`
: `*, thumb_logs(*)`;
? `*, tosings(user_id), like_activities(user_id), save_activities(user_id)`
: `*`;

const result = await executeSearchQueries(supabase, selectClause, query, type, order, from, to);

Expand Down Expand Up @@ -273,7 +268,6 @@ export async function GET(request: Request): Promise<NextResponse<ApiResponse<Se
isSave: authenticated
? (song.save_activities?.some(save => save.user_id === userId) ?? false)
: false,
thumb: song.thumb_logs?.reduce((sum, log) => sum + log.thumb_count, 0) ?? 0,
}));

return NextResponse.json({
Expand Down
103 changes: 0 additions & 103 deletions apps/web/src/app/api/songs/thumb-up/route.ts

This file was deleted.

Loading
Loading