feat: romaji index for Japanese kanji song search

Backend:
- Add /api/romaji-index endpoint using kuromoji morphological analyzer
- Fetches all Navidrome songs, converts kanji → hiragana readings → romaji
- Only indexes songs with Japanese characters; caches for 20 min
- /api/romaji-index DELETE clears cache (force rebuild)

Frontend:
- fetchRomajiIndex() in api.js: lazy-fetches and caches the index
- doLocalSearch: when query is romaji (ASCII), queries romaji index in
  parallel with Navidrome search3 and merges+deduplicates results

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-05-17 21:15:07 +02:00
1 parent 369a5e82b3
commit aa239f8e6a
4 files changed
+176 -6

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
{
"name": "novasonic-backend",
"private": true,
"dependencies": {
"kuromoji": "^0.1.2"
}
}