Commit Graph

17 Commits

Author SHA1 Message Date
Michess
d60899fdbf feat(ui): simplified homepage, /play subpage, and fix bot-game PGN bug
Homepage now shows only a "Spielen" card (links to /play), public games,
last 3 games as mini-board thumbnails for logged-in users, and live games.

New /play page contains all game-mode cards (create, vs AI, friends,
correspondence, tournament).

Bug fix: /ai page was constructing Chess instances from FEN on every move,
discarding the full PGN history. Switching to loadPgn() preserves all moves
so the saved game can be fully reviewed in the archive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 15:22:38 +02:00
Michess
2707efe115 feat(ui): move admin panel and join-game into profile dropdown
- Replace header admin link + profile modal with a dropdown menu
- Dropdown contains: profile, settings, admin (admins only), join-game form, logout
- Remove join-game card from homepage for logged-in users (now in dropdown)
- AuthModal now only handles guest/login/register flows

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 13:14:15 +02:00
Michess
0b3228c9d7 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>
2026-04-15 08:03:26 +02:00
Michess
aeb5fe313e feat: add time controls, correspondence games, and tournament mode
**Zeitmodi (Blitz/Rapid):**
- 5, 10, 30 Min Zeitkontrolle bei Spielerstellung
- Server-seitige Uhren: Zeit wird bei jedem Zug abgezogen
- Timeout-Erkennung via claimTimeout Socket-Event
- Schachuhr-Anzeige in GamePage (rot bei < 30s)
- Turnierspiele erhalten automatisch Zeitkontrolle

**Tagespartien (Correspondence):**
- Neue DB-Tabelle correspondence_game
- REST API: erstellen, beitreten, Zug machen, aufgeben
- Seite /correspondence: Liste aktiver Tagespartien
- Seite /correspondence/[code]: Spielen mit interaktivem Brett
- Einladungslink teilen, Gegner tritt via Link bei

**Turniermodus (Round-Robin):**
- Neue DB-Tabellen: tournament, tournament_player, tournament_round
- Round-Robin Paarungen mit Circle-Methode
- Turnier erstellen: /tournament/create
- Turnierliste: /tournament
- Turnierseite /tournament/[code]: Standings, Runden, Spiele
- Automatische Aktivisierung der nächsten Runde
- Turnierspiele werden als normale activeGames erstellt
- Ergebnisse aktualisieren Punkte automatisch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 09:44:35 +02:00
Michess
09e5271dfb feat: redesign homepage layout and fix invite links
- Homepage: Grid-Layout mit 3 Karten (Spiel erstellen, KI, Freunde/Beitreten)
  statt vertikalem Stack mit Dividers
- CreateGame: kompakteres Styling, auf Deutsch, in Primary-Card integriert
- Einladungslink: APP_URL statt hardcoded ches.su in GamePage und CopyLink
- JoinGame: URL-Parsing für beliebige Domains (nicht nur ches.su)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 07:49:59 +02:00
Michess
e4c7aba178 fix: revalidate aus Client Component entfernt (Next.js Fehler) 2026-04-13 10:50:45 +02:00
Michess
7dac042d73 feat: Michess – Initiales Setup auf Basis von chessu
- Rebranding: chessu → Michess (Header, Footer, Metadata, Session-Cookie)
- Stockfish KI-Integration: 6 Schwierigkeitsgrade (Anfänger bis Meister)
- Admin-Panel: Nutzerverwaltung, Sperren/Entsperren, Git-Pull-Update
- Freundessystem: Anfragen, Freundesliste, Nutzersuche
- DB-Schema: role, banned, friend_request, friendship Tabellen
- Docker: NAS-optimiertes docker-compose.yml mit PostgreSQL Healthcheck
- Stockfish binary via apk im Alpine-Image installiert
- .env.example für einfaches Deployment
- scripts/update.sh für manuelles NAS-Update
- Brain.md + Plan.md als Projekt-Gedächtnis

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:02:52 +02:00
Nathaniel Tampus
032fd8bf24 remove unused @ts-expect-error 2023-06-13 12:48:34 +08:00
Nathaniel Tampus
f5d5557f9e fix build errors on root page
set revalidate to 0 since PublicGames is already dynamic
2023-05-06 20:52:26 +08:00
Nathaniel Tampus
72a80fe8bf remove home route background 2023-03-06 10:42:29 +08:00
Nathaniel Tampus
a30331ccb1 public games list functionality 2023-03-05 22:06:59 +08:00
Nathaniel Tampus
dd0a097a48 initial find & create game functionality
and restructure homepage components
2023-03-04 18:43:32 +08:00
Nathaniel Tampus
181738ae3f general layout improvements 2023-03-02 17:53:35 +08:00
Nathaniel Tampus
d9e5c8150a move components to separate folder 2023-02-25 21:14:55 +08:00
Nathaniel Tampus
c6be8f0776 separate into more components 2023-02-20 17:36:30 +08:00
Nathaniel Tampus
374dda25bb homepage design 2023-02-19 19:42:14 +08:00
Nathaniel Tampus
2ef5e33b0e use next.js 13 appdir, add initial navbar drawer 2023-02-15 14:09:33 +08:00