Warning This project is still under construction and considered beta software. Release v1.0.0 will be the first out-of-beta release.
Ladder 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.
To quickly run bracket to see how it works, clone it and run docker-compose up
:
git clone [email protected]: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.
To insert dummy rows into the database, run:
sudo docker exec bracket-backend pipenv run ./cli.py create-dev-db
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).
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 32
CORS_ORIGINS
andCORS_ORIGIN_REGEX
: Specify allowed frontend domain names for CORS (see the FastAPI docs)ADMIN_EMAIL
andADMIN_PASSWORD
: The credentials of the admin user, which is created when initializing the database
The following starts the frontend and backend for local development:
cd frontend
yarn run dev
cd backend
pipenv install -d
pipenv shell
./run.sh