From 59a9f4984c3acd29bc746a78e30849f50fa555ee Mon Sep 17 00:00:00 2001 From: yyamashita Date: Sat, 15 Aug 2026 18:57:59 +0900 Subject: Add Claude-powered band auto-registration from live info text Extracts band/artist names from pasted live info via Claude (API or CLI adapter), matches against existing bands, and lets the user review and bulk-register new ones through a polling job queue. Also adds a livehouse events import script and recent-bands/artists home page sections. Co-Authored-By: Claude Sonnet 5 --- app/routes/home.tsx | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 3 deletions(-) (limited to 'app/routes/home.tsx') diff --git a/app/routes/home.tsx b/app/routes/home.tsx index 9795ba8..591585d 100644 --- a/app/routes/home.tsx +++ b/app/routes/home.tsx @@ -1,9 +1,111 @@ -import { redirect } from "react-router"; +import { Link, useLoaderData } from "react-router"; +import { listBands, listArtists, listBandLists, listRecentBands, listRecentArtists } from "~/lib/db.server"; export function loader() { - return redirect("/bands"); + return { + bandCount: listBands().length, + artistCount: listArtists().length, + listCount: listBandLists().length, + recentBands: listRecentBands(8), + recentArtists: listRecentArtists(8), + }; } export default function Home() { - return null; + const { bandCount, artistCount, listCount, recentBands, recentArtists } = useLoaderData(); + return ( +
+
+

+ whois.band +

+

バンドとアーティストの情報管理サイト

+
+ +
+ + + +
+ +
+ + {recentBands.length === 0 ? ( +

まだありません

+ ) : ( +
    + {recentBands.map((band) => ( +
  • + {band.name} + {band.status === "hiatus" && ( + 活動休止 + )} +
  • + ))} +
+ )} +
+ + + {recentArtists.length === 0 ? ( +

まだありません

+ ) : ( +
    + {recentArtists.map((artist) => ( +
  • + {artist.name} +
  • + ))} +
+ )} +
+
+
+ ); +} + +function SectionRow({ + to, + label, + count, + newTo, +}: { + to: string; + label: string; + count: number; + newTo: string; +}) { + return ( +
+
+ + {label} + + {count}件 +
+ + + 追加 + +
+ ); +} + +function RecentSection({ + title, + viewAllTo, + children, +}: { + title: string; + viewAllTo: string; + children: React.ReactNode; +}) { + return ( +
+
+

{title}

+ すべて見る +
+ {children} +
+ ); } -- cgit v1.2.3