All posts
·2 min read

Building SF Tournaments: running community cups without spreadsheets

How a Soldier Front tournament platform handles brackets, check-ins, disputes and stats, and why it ships with batch files.

SF TournamentsNextJSPrisma

SF Tournaments is a clan and eSports tournament platform for the Soldier Front community. Before it, tournaments ran on Discord messages and spreadsheets: someone built the bracket by hand, chased teams to check in, and sorted out score arguments in DMs.

The aim was to move all of that into one place.

The tournament loop

A tournament goes through the same steps every time, so the site models each one:

  1. Registration with admin approval and seeding.
  2. Brackets, single or double elimination, with byes handled automatically.
  3. Check-in before each match. Teams that don't show up forfeit automatically, so nobody waits around.
  4. Score reports from team captains, with screenshots. If the two captains disagree, admins resolve the dispute.
  5. Scheduling, where captains propose times and everyone sees them in their own local time.

On top of that sit map veto (ban/pick), line-ups picked from the roster, and Twitch stream embeds on match pages.

Stats that count the right people

Player stats only count players who actually played in a match, not everyone on the roster. That's why line-ups exist: starters are picked from the roster before the match, and stats follow them.

From there the site builds placings, records, head-to-head history and leaderboards with ranking points.

Beyond one-off cups

Once the basics worked, the site grew features for between tournaments:

  • A team ladder with ELO ratings, challenges and seasons.
  • A free agent board for players looking for teams, and teams looking for players.
  • A scrim finder.
  • Recurring cups that run themselves.
  • Seasons with circuit points and a finals for the top teams.

A Discord bot sets up the server and posts announcements, so the community doesn't need to check the site constantly.

Why it ships with batch files

The people running it aren't necessarily developers, so the repo includes four Windows batch files: one to set up a new PC, one to update (which backs up the database first), one to run the site and one for development. Setup even generates the auth secret and tells you which values are still missing.

The stack

Next.js 16 with the App Router and Cache Components, TypeScript, Tailwind CSS v4, Prisma 7 on Postgres, Auth.js with Discord and Twitch sign-in, Cloudflare R2 for uploads and Vitest for tests. It's live at bullsf.tomdev.xyz.

Comments

Sign in with Discord to react or comment.

ProjectSF Tournaments