Skip to content

feature: tournament check-in, free agents, join rules and stats leaderboard - #403

Open
lukepolo wants to merge 3 commits into
mainfrom
feature/tournament-check-in-free-agents
Open

feature: tournament check-in, free agents, join rules and stats leaderboard#403
lukepolo wants to merge 3 commits into
mainfrom
feature/tournament-check-in-free-agents

Conversation

@lukepolo

Copy link
Copy Markdown
Contributor

Features

Check-In — optional per tournament, off by default. Auto-scheduled window (opens/closes N minutes before start), three modes reusing the existing e_check_in_settings enum: Captains, Players, Admin. In Players mode a team is checked in once min_players_per_lineup players confirm, so substitutes aren't required. Schedule locks once the window opens.

CheckInReview — new tournament status. If every team checks in, the tournament closes registration as before. If any team misses, it is held instead of seeding. Organizers can re-admit a team, extend check-in, or continue without them. Auto-continues at start so a held tournament can never stall. No-shows are never deleted — they keep their roster and are simply excluded from seeding.

Free Agents — players register alone and are drafted into balanced teams. Selection is by sign-up time only; ELO decides which team, never who gets a slot.

Join rules — per-tournament minimum role, ELO range, invite-only + passcode, preferred regions. Gates the player being added, not just whoever clicks.

Stats leaderboard — tournament-scoped, with ADR and HLTV rating that v_tournament_player_stats doesn't carry.

Notes

  • assign_seeds_to_teams and tournament_has_min_teams gate on the window having opened, not just on check_in_required — behaviour is unchanged for any tournament that doesn't use check-in.
  • Check-in permissions are enforced in the action layer: the API's pooled connection carries no hasura.user, and SQL guards treat a role-less session as an internal write.
  • registration_passcode is exposed via a row-level computed field, not a column permission (Hasura column permissions are per-role, not per-row).
  • QA seed script: node scripts/seed-tournament-qa.mjs stands up seven tournaments covering every state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant