Bracket
Tournament system meant to be easy to use. Bracket is written in async Python (with FastAPI) and Next.js as frontend using the Mantine library.
It has the following features:
- Supports single elimination, round-robin and swiss formats.
- Build your tournament structure with multiple stages that can have multiple groups/brackets in them.
- Drag-and-drop matches to different courts or reschedule them to another start time.
- Various dashboard pages are available that can be presented to the public, customized with a logo.
- Create/update teams, and add players to teams.
- Create multiple clubs, with multiple tournaments per club.
- Swiss tournaments can be handled dynamically, with automatic scheduling of matches.
Preview
Quickstart
To quickly run bracket to see how it works, clone it and run docker-compose up:
git clone git@github.com:evroon/bracket.git
cd bracket
sudo docker-compose up -d
This will start the backend and frontend of Bracket, as well as a postgres instance. You should now
be able to view bracket at http://localhost:3000. You can log in with username test@example.org
and password aeGhoe1ahng2Aezai0Dei6Aih6dieHoo.
To insert dummy rows into the database, run:
sudo docker exec bracket-backend pipenv run ./cli.py create-dev-db
Setup
Database
First create a bracket cluster:
sudo pg_createcluster -u postgres -p 5532 13 bracket
pg_ctlcluster 13 bracket start
Subsequently, create a new bracket_dev database:
sudo -Hu postgres psql -p 5532
CREATE USER bracket_dev WITH PASSWORD 'bracket_dev';
CREATE DATABASE bracket_dev OWNER bracket_dev;
You can do the same but replace the user and database name with:
bracket_ci: for running testsbracket_prod: for a production database
The database URL can be specified per environment in the .env files (see config).
Read the full documentation about setting up Bracket in the docs.
Config
Copy ci.env to prod.env and fill in the values:
PG_DSN: The URL of the PostgreSQL databaseJWT_SECRET: Create a random secret usingopenssl rand -hex 32CORS_ORIGINSandCORS_ORIGIN_REGEX: Specify allowed frontend domain names for CORS (see the FastAPI docs)ADMIN_EMAILandADMIN_PASSWORD: The credentials of the admin user, which is created when initializing the database
Read more about configuration in the docs.
Running the frontend and backend for development
The following starts the frontend and backend for local development:
Frontend
cd frontend
yarn run dev
Backend
cd backend
pipenv install -d
pipenv shell
./run.sh
License
Bracket is licensed under AGPL-v3.0 See LICENSE



