Skip to content

Repository files navigation

Bracket Engine

Tournament brackets, Swiss pairing and standings in TypeScript

Demo · Getting started · Contributing

MIT CI

What this is

Pure functions for running a tournament: seeding, single and double elimination with byes and grand finals, advancing and reopening matches, Swiss pairing, standings. Plain data in, plain data out.

The example app runs those on Postgres: participants, phases, matches, drops, top cuts and final standings, driven by a CLI and tested against a real database in CI.

Packages

Package What it does
@bracket-engine/core Seeding, single and double elimination, byes, advancement, reopening, Swiss pairing, standings
@bracket-engine/blossom Edmonds' blossom algorithm for maximum-weight matching. core uses it to pair Swiss rounds

Apps

App What it is
apps/web The playground deployed at https://nedhmn.github.io/bracket-engine
apps/tournament-engine The packages running a tournament on Postgres, driven by a CLI

Quick start

pnpm install
pnpm dev

Everything else is in docs/.

License

MIT.

About

Tournament brackets, Swiss pairing and standings in TypeScript

Topics

Resources

Contributing

Security policy

Stars

19 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages