feat: live game tiles on homepage + bot spectating

- GET /v1/games/live returns all active games with both players assigned,
  including current FEN (computed server-side via chess.js)
- LiveGames component on homepage: mini chessboard tiles (160px) that
  auto-refresh every 3s, clickable to join as spectator
- Tournament page: 'Zuschauen' button for non-players on ongoing rounds
  (bot vs bot, human vs human, human vs bot all spectatable)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Michess
2026-04-15 08:03:26 +02:00
parent 86fbdd39ed
commit 0b3228c9d7
6 changed files with 99 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
import CreateGame from "@/components/home/CreateGame";
import JoinGame from "@/components/home/JoinGame";
import PublicGames from "@/components/home/PublicGames/PublicGames";
import LiveGames from "@/components/home/LiveGames";
import Link from "next/link";
import { useSession } from "@/context/session";
@@ -78,6 +79,9 @@ export default function Home() {
</div>
{/* Laufende Partien Live-Kacheln */}
<LiveGames />
{/* Öffentliche Spiele + Beitreten */}
<div className={`grid gap-6 grid-cols-1 ${isLoggedIn ? "lg:grid-cols-3" : ""}`}>
<div className={isLoggedIn ? "lg:col-span-2" : ""}>