From 9f9efc2bc07810d2e06b37bad94e5922681eadef Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 18 Feb 2026 22:38:15 +0900 Subject: feat: refactor tournament to generic DB-backed N-person bracket Replace hardcoded 6-person tournament with a generic single-elimination bracket system backed by new DB tables (tournaments, tournament_entries, tournament_matches). Includes admin CRUD, standard seeding algorithm, bye handling, and a CSS Grid bracket renderer on the frontend. Add comprehensive tests for backend API/admin handlers, seeding logic, and frontend bracket component. Co-Authored-By: Claude Opus 4.6 --- backend/admin/templates/tournament_edit.html | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 backend/admin/templates/tournament_edit.html (limited to 'backend/admin/templates/tournament_edit.html') diff --git a/backend/admin/templates/tournament_edit.html b/backend/admin/templates/tournament_edit.html new file mode 100644 index 0000000..6c1ad6c --- /dev/null +++ b/backend/admin/templates/tournament_edit.html @@ -0,0 +1,48 @@ +{{ template "base.html" . }} + +{{ define "breadcrumb" }} +Dashboard | Tournaments +{{ end }} + +{{ define "content" }} +
+
+ + +
+ +

Bracket (size={{ .Tournament.BracketSize }}, rounds={{ .Tournament.NumRounds }})

+ +

Entries (seed → user)

+ {{ range .Seeds }} + {{ $seed := . }} +
+ + +
+ {{ end }} + +

Matches (game assignment)

+ {{ range .Matches }} +
+ + {{ $matchID := .MatchID }} + +
+ {{ end }} + +
+ +
+
+{{ end }} -- cgit v1.3.1