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
8 changes: 8 additions & 0 deletions .claude/commands/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
git branch --show-current
```

**๋ธŒ๋žœ์น˜๊ฐ€ `develop` ๋˜๋Š” `main` ์ธ ๊ฒฝ์šฐ ์ฆ‰์‹œ ์ค‘๋‹จํ•œ๋‹ค.**
์•„๋ž˜ ๋ฉ”์‹œ์ง€๋ฅผ ์ถœ๋ ฅํ•˜๊ณ  ๋” ์ด์ƒ ์ง„ํ–‰ํ•˜์ง€ ์•Š๋Š”๋‹ค.

```
โ›” `develop` / `main` ๋ธŒ๋žœ์น˜์—์„œ๋Š” PR์„ ์ƒ์„ฑํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
`/start <์ž‘์—… ์„ค๋ช…>` ์œผ๋กœ ์ด์Šˆ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ์ž‘์—… ๋ธŒ๋žœ์น˜๋ฅผ ๋งŒ๋“ค์–ด ์ฃผ์„ธ์š”.
```

2. ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์—์„œ ์ž‘์—… ์œ ํ˜•๊ณผ ์ด์Šˆ ๋ฒˆํ˜ธ๋ฅผ ์ถ”์ถœํ•œ๋‹ค.
- ๊ทœ์น™: `<type>/<issue-number>-<camelCaseName>`
- ์˜ˆ: `feat/42-addSearchFilter` โ†’ type=`feat`, issue=`42`
Expand Down
20 changes: 12 additions & 8 deletions .claude/commands/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
## Steps

1. `$ARGUMENTS` ๋ฅผ ๋ถ„์„ํ•ด ์•„๋ž˜ ํ•ญ๋ชฉ์„ ๊ฒฐ์ •ํ•œ๋‹ค.

**`$ARGUMENTS` ๊ฐ€ ๋น„์–ด ์žˆ๋Š” ๊ฒฝ์šฐ:**
`git diff` ์™€ `git status` ๋กœ ํ˜„์žฌ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ํŒŒ์•…ํ•˜๊ณ ,
๋ณ€๊ฒฝ ๋‚ด์šฉ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์ž‘์—… ์œ ํ˜•, ์ด์Šˆ ์ œ๋ชฉ, ์ด์Šˆ ๋ณธ๋ฌธ์„ ์ž๋™์œผ๋กœ ๊ฒฐ์ •ํ•œ๋‹ค.
- **์ž‘์—… ์œ ํ˜•**: `feat` | `fix` | `hotfix` | `chore` | `refactor` | `doc`
- **์ด์Šˆ ์ œ๋ชฉ**: ํ•œ๊ตญ์–ด, ๊ฐ„๊ฒฐํ•˜๊ฒŒ
- **์ด์Šˆ ๋ณธ๋ฌธ**: ๊ตฌํ˜„ํ•  ๋‚ด์šฉ์„ bullet์œผ๋กœ ์ •๋ฆฌ
Expand Down Expand Up @@ -51,17 +55,17 @@

### ๐Ÿ‘‰ ๋‹ค์Œ ๋‹จ๊ณ„

| ๋ช…๋ น์–ด | ์„ค๋ช… |
| --------- | ------------------------ |
| `/spsc` | ์ž‘์—… ๋ฒ”์œ„ ์ •์˜ (๊ถŒ์žฅ) |
| `/red` | ํ…Œ์ŠคํŠธ ๋จผ์ € ์ž‘์„ฑ |
| `/green` | ๋ฐ”๋กœ ๊ตฌํ˜„ ์‹œ์ž‘ |
| ๋ช…๋ น์–ด | ์„ค๋ช… |
| -------- | --------------------- |
| `/spsc` | ์ž‘์—… ๋ฒ”์œ„ ์ •์˜ (๊ถŒ์žฅ) |
| `/red` | ํ…Œ์ŠคํŠธ ๋จผ์ € ์ž‘์„ฑ |
| `/green` | ๋ฐ”๋กœ ๊ตฌํ˜„ ์‹œ์ž‘ |

### ๐Ÿ”„ ์›Œํฌํ”Œ๋กœ์šฐ ์‚ฌ์ดํด

```
์ผ๋ฐ˜: /start โ†’ /spsc โ†’ /red โ†’ /green โ†’ /refactor โ†’ /verify โ†’ /commit
๋‹จ์ถ•: /start โ†’ /spsc โ†’ /green โ†’ /verify โ†’ /commit
์ผ๋ฐ˜: /start โ†’ /spsc โ†’ /red โ†’ /green โ†’ /refactor โ†’ /verify โ†’ /commit โ†’ /pr
๋‹จ์ถ•: /start โ†’ /spsc โ†’ /green โ†’ /verify โ†’ /commit โ†’ /pr
```

- `/red` ~ `/refactor` ์‚ฌ์ดํด์€ ์ƒํ™ฉ์— ๋”ฐ๋ผ ์ƒ๋žต ๊ฐ€๋Šฅํ•˜๋‹ค.
Expand All @@ -72,5 +76,5 @@

## Notes

- `$ARGUMENTS` ๊ฐ€ ๋น„์–ด ์žˆ์œผ๋ฉด "์ž‘์—… ๋‚ด์šฉ์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”." ๋ฅผ ์ถœ๋ ฅํ•˜๊ณ  ์ค‘๋‹จํ•œ๋‹ค.
- `$ARGUMENTS` ๊ฐ€ ๋น„์–ด ์žˆ์œผ๋ฉด ํ˜„์žฌ ๋ณ€๊ฒฝ ์‚ฌํ•ญ(`git diff`, `git status`)์„ ๋ถ„์„ํ•ด ์ž๋™์œผ๋กœ ํŒ๋‹จํ•œ๋‹ค.
- ์ด์Šˆ ์ƒ์„ฑ ์‹คํŒจ ์‹œ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฅผ ์ถœ๋ ฅํ•˜๊ณ  ์ค‘๋‹จํ•œ๋‹ค.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ yarn-error.log*
# Claude Code local settings (contains secrets)

temp/
.vscode
.vscode

settings.local.json
32 changes: 18 additions & 14 deletions apps/web/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ No test suite is configured.
### Monorepo Structure

This is a pnpm workspace monorepo. The web app lives at `apps/web/`. Key workspace packages:

- `@repo/open-api` โ€” wrapper around the external karaoke open API (used in API routes)
- `@repo/query` โ€” shared TanStack Query setup
- `@repo/eslint-config`, `@repo/format-config` โ€” shared tooling configs
Expand All @@ -49,6 +50,7 @@ This is a pnpm workspace monorepo. The web app lives at `apps/web/`. Key workspa
### Supabase Client Variants

Three different Supabase clients for different contexts:

- `src/lib/supabase/client.ts` โ€” browser client (`createBrowserClient`), uses `NEXT_PUBLIC_` env vars
- `src/lib/supabase/server.ts` โ€” server/route handler client (`createServerClient`)
- `src/lib/supabase/api.ts` โ€” legacy API routes client (Next.js Pages-style `req/res`)
Expand Down Expand Up @@ -87,6 +89,7 @@ Song searches go through `GET /api/open_songs/[type]/[param]` which proxies to `
## Environment Variables

Required in `.env` / `.env.development.local`:

- `NEXT_PUBLIC_SUPABASE_URL`
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`
- `SUPABASE_URL` (server-only, used in legacy API client)
Expand All @@ -99,12 +102,12 @@ Required in `.env` / `.env.development.local`:

Format: `<type>/<camelCaseName>`

| type | usage |
|------|-------|
| `feat` | new feature |
| `fix` | bug fix |
| `hotfix` | urgent fix |
| `chore` | maintenance, docs, config |
| type | usage |
| --------- | ------------------------------ |
| `feat` | new feature |
| `fix` | bug fix |
| `hotfix` | urgent fix |
| `chore` | maintenance, docs, config |
| `release` | release (e.g. `release/2.1.0`) |

The part after the slash uses camelCase (e.g. `feat/scrollText`, `feat/FooterNavbar`, `fix/loginAuth`).
Expand All @@ -115,16 +118,17 @@ Branch flow: `feat/*` โ†’ `develop` โ†’ `main`

Format: `<type> : <Korean description>` โ€” one space before and after the colon.

| type | usage |
|------|-------|
| `feat` | new feature |
| `fix` | bug fix |
| `hotfix` | urgent bug fix |
| `chore` | version bump, config, format, cleanup |
| `refactor` | refactoring |
| `doc` | documentation |
| type | usage |
| ---------- | ------------------------------------- |
| `feat` | new feature |
| `fix` | bug fix |
| `hotfix` | urgent bug fix |
| `chore` | version bump, config, format, cleanup |
| `refactor` | refactoring |
| `doc` | documentation |

Examples:

```
feat : MarqueeText ์ž๋™ ์Šคํฌ๋กค ํ…์ŠคํŠธ ์ ์šฉ
fix : SongCard css ์ˆ˜์ •
Expand Down
2 changes: 1 addition & 1 deletion apps/web/public/sitemap-0.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?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</loc><lastmod>2026-03-02T07:59:31.054Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>https://www.singcode.kr</loc><lastmod>2026-03-25T14:32:28.966Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
</urlset>
28 changes: 8 additions & 20 deletions packages/crawling/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pnpm ky-open # Open API(๊ธˆ์˜)๋กœ KY ๋ฒˆํ˜ธ ์ˆ˜์ง‘
pnpm ky-youtube # YouTube ํฌ๋กค๋ง์œผ๋กœ KY ๋ฒˆํ˜ธ ์ˆ˜์ง‘ + AI ๊ฒ€์ฆ
pnpm ky-verify # ๊ธฐ์กด KY ๋ฒˆํ˜ธ์˜ ์‹ค์ œ ์กด์žฌ ์—ฌ๋ถ€ ์žฌ๊ฒ€์ฆ (์ฒดํฌํฌ์ธํŠธ ์ง€์›)
pnpm ky-update # ky-youtube + ky-verify ๋ณ‘๋ ฌ ์‹คํ–‰
pnpm trans # ์ผ๋ณธ์–ด ์•„ํ‹ฐ์ŠคํŠธ๋ช… โ†’ ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ ํ›„ DB ์ €์žฅ
pnpm test # vitest ์‹คํ–‰
pnpm lint # ESLint
```
Expand Down Expand Up @@ -74,24 +73,14 @@ findKYByOpen.ts
โ””โ”€ ์ œ๋ชฉ + ์•„ํ‹ฐ์ŠคํŠธ ๋ฌธ์ž์—ด ๋น„๊ต๋กœ KY ๋ฒˆํ˜ธ ๋งค์นญ
```

**์ผ๋ณธ์–ด ๋ฒˆ์—ญ**

```
postTransDictionary.ts
โ””โ”€ getSongsJpnDB() # ์ผ๋ณธ์–ด ํฌํ•จ๋œ ๊ณก ํ•„ํ„ฐ๋ง
โ””โ”€ transChatGPT() # GPT-4-turbo๋กœ ์•„ํ‹ฐ์ŠคํŠธ๋ช… ๋ฒˆ์—ญ
โ””โ”€ postTransDictionariesDB() # trans_dictionaries ํ…Œ์ด๋ธ”์— ์ €์žฅ
```

### ํ•ต์‹ฌ ํŒจํ„ด: ์ง„ํ–‰ ์ƒํƒœ ์ €์žฅ (์ฒดํฌํฌ์ธํŠธ)

์žฅ์‹œ๊ฐ„ ์‹คํ–‰๋˜๋Š” ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์ค‘๋‹จ๋์„ ๋•Œ ์žฌ์‹œ์ž‘ํ•˜๋ฉด ์ฒ˜์Œ๋ถ€ํ„ฐ ๋‹ค์‹œ ํ•˜์ง€ ์•Š๋„๋ก, `src/assets/`์— ํ…์ŠคํŠธ ํŒŒ์ผ๋กœ ์ง„ํ–‰ ์ƒํƒœ๋ฅผ ๊ธฐ๋กํ•œ๋‹ค.

| ํŒŒ์ผ | ์šฉ๋„ |
| ----------------------------------------- | ---------------------------------- |
| `src/assets/transList.txt` | ์ด๋ฏธ ๋ฒˆ์—ญ ์‹œ๋„ํ•œ ์ผ๋ณธ์–ด ์•„ํ‹ฐ์ŠคํŠธ๋ช… |
| `src/assets/crawlKYValidList.txt` | ๊ฒ€์ฆ ์™„๋ฃŒ๋œ (์ œ๋ชฉ-์•„ํ‹ฐ์ŠคํŠธ) ์Œ |
| `src/assets/crawlKYYoutubeFailedList.txt` | YouTube ํฌ๋กค๋ง ์‹คํŒจ ๋ชฉ๋ก |
| ํŒŒ์ผ | ์šฉ๋„ |
| ----------------------------------------- | ------------------------------ |
| `src/assets/crawlKYValidList.txt` | ๊ฒ€์ฆ ์™„๋ฃŒ๋œ (์ œ๋ชฉ-์•„ํ‹ฐ์ŠคํŠธ) ์Œ |
| `src/assets/crawlKYYoutubeFailedList.txt` | YouTube ํฌ๋กค๋ง ์‹คํŒจ ๋ชฉ๋ก |

`logData.ts`์˜ `save*` / `load*` ํ•จ์ˆ˜๋กœ ๊ด€๋ฆฌ. ์Šคํฌ๋ฆฝํŠธ ์‹œ์ž‘ ์‹œ ๋กœ๋“œํ•ด `Set`์œผ๋กœ ๋ณ€ํ™˜ ํ›„ O(1) ๊ฒ€์ƒ‰์œผ๋กœ ์Šคํ‚ต ์ฒ˜๋ฆฌ.

Expand All @@ -101,11 +90,10 @@ postTransDictionary.ts

### Supabase ํ…Œ์ด๋ธ”

| ํ…Œ์ด๋ธ” | ์šฉ๋„ |
| -------------------- | -------------------------------- |
| `songs` | ๋ฉ”์ธ ๊ณก ๋ฐ์ดํ„ฐ (TJ/KY ๋ฒˆํ˜ธ ํฌํ•จ) |
| `invalid_ky_songs` | KY ๋ฒˆํ˜ธ ์ˆ˜์ง‘ ์‹คํŒจ ๋ชฉ๋ก |
| `trans_dictionaries` | ์ผ๋ณธ์–ด โ†’ ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ ์‚ฌ์ „ |
| ํ…Œ์ด๋ธ” | ์šฉ๋„ |
| ------------------ | -------------------------------- |
| `songs` | ๋ฉ”์ธ ๊ณก ๋ฐ์ดํ„ฐ (TJ/KY ๋ฒˆํ˜ธ ํฌํ•จ) |
| `invalid_ky_songs` | KY ๋ฒˆํ˜ธ ์ˆ˜์ง‘ ์‹คํŒจ ๋ชฉ๋ก |

### AI ์œ ํ‹ธ

Expand Down
4 changes: 4 additions & 0 deletions packages/crawling/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { config } from '@repo/eslint-config/base';

/** @type {import("eslint").Linter.Config} */
export default config;
Comment on lines +1 to +4
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Undeclared eslint-config import ๐Ÿž Bug โ›ฏ Reliability

packages/crawling/eslint.config.mjs๊ฐ€ @repo/eslint-config/base๋ฅผ importํ•˜์ง€๋งŒ
packages/crawling/package.json์— @repo/eslint-config๊ฐ€ ์„ ์–ธ๋˜์–ด ์žˆ์ง€ ์•Š์•„, ESLint๊ฐ€ ์„ค์ •์„ ๋กœ๋“œํ•˜๋Š” ๋‹จ๊ณ„์—์„œ ๋ชจ๋“ˆ ํ•ด์„ ์‹คํŒจ๋กœ
pnpm lint๊ฐ€ ๊นจ์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
Agent Prompt
## Issue description
`packages/crawling/eslint.config.mjs` imports `@repo/eslint-config/base` but `packages/crawling/package.json` does not declare `@repo/eslint-config`. This can break `pnpm lint` in `@repo/crawling` because ESLint canโ€™t resolve the config module.

## Issue Context
- The shared config is exported via `@repo/eslint-config` subpath export `./base`.
- `@repo/crawling` must depend on `@repo/eslint-config` for pnpm to link it into that packageโ€™s resolution context.

## Fix Focus Areas
- packages/crawling/package.json[1-36]
- packages/crawling/eslint.config.mjs[1-4]
- packages/eslint-config/package.json[1-24]

## Suggested change
- Add `"@repo/eslint-config": "workspace:*"` to `devDependencies` of `packages/crawling/package.json`.

โ“˜ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

3 changes: 1 addition & 2 deletions packages/crawling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
"ky-youtube": "tsx src/crawling/crawlYoutube.ts",
"ky-verify": "tsx src/crawling/crawlYoutubeVerify.ts",
"ky-update": "pnpm run ky-youtube & pnpm run ky-verify",
"trans": "tsx src/postTransDictionary.ts",
"recent-tj": "tsx src/crawling/crawlRecentTJ.ts",
"lint": "eslint . --ext .ts,.js",
"lint": "eslint .",
"test": "vitest run",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
Expand Down
29 changes: 0 additions & 29 deletions packages/crawling/src/assets/transList.txt

This file was deleted.

2 changes: 0 additions & 2 deletions packages/crawling/src/crawling/crawlRecentTJ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,4 @@ console.log('์‹คํŒจ ๊ฐœ์ˆ˜ : ', result.failed.length);
console.log('์„ฑ๊ณต ๋ฐ์ดํ„ฐ : ', result.success);
console.log('์‹คํŒจ ๋ฐ์ดํ„ฐ : ', result.failed);



await browser.close();
1 change: 1 addition & 0 deletions packages/crawling/src/crawling/replaceSupabaseFailed.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getSongsKyNullDB } from '@/supabase/getDB';
import { postInvalidKYSongsDB } from '@/supabase/postDB';
import { Song } from '@/types';

// import { loadCrawlYoutubeFailedKYSongs } from '@/utils/logData';

const data: Song[] = await getSongsKyNullDB();
Expand Down
1 change: 0 additions & 1 deletion packages/crawling/src/findKYByOpen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,3 @@ console.log(`
- ์„ฑ๊ณต: ${resultsLog.success.length}๊ณก
- ์‹คํŒจ: ${resultsLog.failed.length}๊ณก
`);

71 changes: 0 additions & 71 deletions packages/crawling/src/postTransDictionary.ts

This file was deleted.

29 changes: 1 addition & 28 deletions packages/crawling/src/supabase/getDB.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TransDictionary, TransSong } from '@/types';
import { TransSong } from '@/types';
import { containsJapanese } from '@/utils/parseString';

import { getClient } from './getClient';
Expand Down Expand Up @@ -63,33 +63,6 @@ export async function getSongsKyNotNullDB(max: number = 50000) {
return data;
}

export async function getTransDictionariesDB(): Promise<TransDictionary[]> {
const supabase = getClient();

// artist ์ •๋ ฌ
const { data, error } = await supabase.from('trans_dictionaries').select('*');

if (error) throw error;

return data;
}
export async function getTransDictionariesDBByOriginal(
original: string,
): Promise<TransDictionary | null> {
const supabase = getClient();

// artist ์ •๋ ฌ
const { data, error } = await supabase
.from('trans_dictionaries')
.select('*')
.eq('original_japanese', original)
.limit(1);

if (error) throw error;

return data[0] ?? null;
}

export async function getInvalidKYSongsDB(): Promise<
{ id: string; title: string; artist: string }[]
> {
Expand Down
Loading