Files
bracket/search-doc.json

1 line
12 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"searchDocs":[{"title":"Contributing","type":0,"sectionRef":"#","url":"/docs/community/contributing","content":"","keywords":"","version":"Next"},{"title":"Translating","type":1,"pageTitle":"Contributing","url":"/docs/community/contributing#translating","content":" You can add a translation by copying the English en locale (here) directory. Rename the directory to the name of your locale, and start translating the common.json file inside the directory. It might be useful to use an online tool (Google translate json file) to do the translation for you, and then carefully check and correct any mistakes. ","version":"Next","tagName":"h2"},{"title":"Contributors","type":1,"pageTitle":"Contributing","url":"/docs/community/contributing#contributors","content":" Erik Vroon SevicheCC ","version":"Next","tagName":"h2"},{"title":"Star History","type":1,"pageTitle":"Contributing","url":"/docs/community/contributing#star-history","content":" ","version":"Next","tagName":"h2"},{"title":"Developing","type":0,"sectionRef":"#","url":"/docs/community/development","content":"","keywords":"","version":"Next"},{"title":"Database","type":1,"pageTitle":"Developing","url":"/docs/community/development#database","content":" 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. First connect via sudo -Hu postgres psql -p 5532, and then run: 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 (seeconfig). ","version":"Next","tagName":"h2"},{"title":"Running the frontend and backend","type":1,"pageTitle":"Developing","url":"/docs/community/development#running-the-frontend-and-backend","content":" To run Bracket (frontend and backend) locally without Docker, one needs yarn and pipenv. The following starts the frontend and backend for local development in the root directory of Bracket: ./run.sh If either the frontend or backend doesn't shut down correctly, you can run (on Linux)killall gunicorn node. But be careful that this will also kill other gunicorn and node processes. In case you want to run the frontend and backend yourself, see the following two sections. ","version":"Next","tagName":"h2"},{"title":"Frontend","type":1,"pageTitle":"Developing","url":"/docs/community/development#frontend","content":" cd frontend yarn run dev ","version":"Next","tagName":"h3"},{"title":"Backend","type":1,"pageTitle":"Developing","url":"/docs/community/development#backend","content":" cd backend pipenv install -d pipenv shell ./run.sh ","version":"Next","tagName":"h3"},{"title":"Introduction","type":0,"sectionRef":"#","url":"/docs/intro","content":"","keywords":"","version":"Next"},{"title":"Overview of features","type":1,"pageTitle":"Introduction","url":"/docs/intro#overview-of-features","content":" 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. ","version":"Next","tagName":"h2"},{"title":"Why does this exist?","type":1,"pageTitle":"Introduction","url":"/docs/intro#why-does-this-exist","content":" There are plenty of tournament systems to be found online. So why does Bracket exist? Firstly, there are no complete open-source tournament systems to be found on github. Let me know if you find one, I will list it here as alternative to Bracket. Furthermore, the closed-source tournament systems that can be found online are typically payware, and quite expensive. Secondly, there is a lack of tournament systems that support Swiss tournaments. There are a few that exist, but they're typically quite ancient projects. Furthermore, AFAIK the Swiss tournament systems that exist usually only support Swiss, no other types of tournament elements (round-robin, elimination etc.). That is quite a limitation when you want to host a tournament that starts with Swiss and determines a winner based on a knockoff (elimination) stage. Finally, I developed this project to learn more about Next.js and apply my Python (e.g. FastAPI) experience to a project with a real purpose. ","version":"Next","tagName":"h2"},{"title":"Quickstart","type":1,"pageTitle":"Introduction","url":"/docs/intro#quickstart","content":" To get started, follow the steps described in quickstart ","version":"Next","tagName":"h2"},{"title":"Quickstart","type":0,"sectionRef":"#","url":"/docs/running-bracket/quickstart","content":"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 the following credentials: Username: test@example.orgPassword: aeGhoe1ahng2Aezai0Dei6Aih6dieHoo. To insert dummy rows into the database, run: sudo docker exec bracket-backend pipenv run ./cli.py create-dev-db ","keywords":"","version":"Next"},{"title":"Configuration","type":0,"sectionRef":"#","url":"/docs/running-bracket/configuration","content":"","keywords":"","version":"Next"},{"title":"Backend","type":1,"pageTitle":"Configuration","url":"/docs/running-bracket/configuration#backend","content":" Copy ci.env to prod.env and fill in the values: PG_DSN: The URL of the PostgreSQL databaseJWT_SECRET: Create a random secret using openssl rand -hex 32CORS_ORIGINS and CORS_ORIGIN_REGEX: Specify allowed frontend domain names for CORS (see theFastAPI docs)ADMIN_EMAIL and ADMIN_PASSWORD: The credentials of the admin user, which is created when initializing the databaseSENTRY_DSN: The Sentry DSN for monitoring and error trackingBASE_URL: The base url of the API used for SSOALLOW_USER_REGISTRATION: Can be used to disallow user registration in the web app, currently used for production while bracket is still in betaALLOW_INSECURE_HTTP_SSO: Should not be used in production. Allows use of INSECURE requests for SSO auth.AUTO_RUN_MIGRATIONS: Whether to run (alembic) migrations automatically on startup or not. Migrations can be applied manually using pipenv run alembic upgrade head. ","version":"Next","tagName":"h2"},{"title":"Backend: Example configuration file","type":1,"pageTitle":"Configuration","url":"/docs/running-bracket/configuration#backend-example-configuration-file","content":" This is an example of how the config file should look like: PG_DSN='postgresql://bracket_ci:bracket_ci@localhost:5532/bracket_ci' JWT_SECRET='60eed5c5dc7a919b8595a23d6c42ddd8274e4feea651dc028d9bee495bbb9acd' CORS_ORIGINS='https://bracket.mydomain.com' CORS_ORIGIN_REGEX='https://.*\\.vercel\\.app' ADMIN_EMAIL='admin@example.com' ADMIN_PASSWORD='some unused password' SENTRY_DSN='my sentry dsn' ALLOW_USER_REGISTRATION=false ALLOW_INSECURE_HTTP_SSO=false CAPTCHA_SECRET='xxx' AUTO_RUN_MIGRATIONS=true ","version":"Next","tagName":"h3"},{"title":"Frontend","type":1,"pageTitle":"Configuration","url":"/docs/running-bracket/configuration#frontend","content":" NEXT_PUBLIC_HCAPTCHA_SITE_KEY: The HCaptcha key used for captcha challenges when creating new accounts. You get the secret when you create a new site in HCaptcha.NEXT_PUBLIC_API_BASE_URL: The base URL of the backend API to which the frontend sends requests. For example: https://api.bracket.com ","version":"Next","tagName":"h2"},{"title":"Frontend: Example configuration file","type":1,"pageTitle":"Configuration","url":"/docs/running-bracket/configuration#frontend-example-configuration-file","content":" You can store the config in .env.local (as described in the Next docs). This is an example of how the config file should look like: NEXT_PUBLIC_HCAPTCHA_SITE_KEY='10000000-ffff-ffff-ffff-000000000001' NEXT_PUBLIC_API_BASE_URL='https://api.bracket.com' ","version":"Next","tagName":"h3"},{"title":"Deployment","type":0,"sectionRef":"#","url":"/docs/running-bracket/deployment","content":"","keywords":"","version":"Next"},{"title":"Docker","type":1,"pageTitle":"Deployment","url":"/docs/running-bracket/deployment#docker","content":" First, make sure you have docker and docker-compose installed. Then, store the following YAML in a file called docker-compose.yml and run it usingdocker-compose up -d in the same directory as the file: version: '3.1' services: bracket-frontend: image: ghcr.io/evroon/bracket-frontend container_name: bracket-frontend ports: - "3000:3000" environment: NEXT_PUBLIC_API_BASE_URL: "https://bracket.mywebsite.com" # Go to https://dashboard.hcaptcha.com/signup, create a site and put the site key here NEXT_PUBLIC_HCAPTCHA_SITE_KEY: "xxxxx" NODE_ENV: "production" restart: unless-stopped bracket-backend: image: ghcr.io/evroon/bracket-backend container_name: bracket-backend ports: - "8400:8400" environment: ENVIRONMENT: "PRODUCTION" PG_DSN: "postgresql://bracket_prod:bracket_prod@postgres:5432/bracket_prod" restart: unless-stopped depends_on: - postgres postgres: image: postgres restart: always environment: POSTGRES_DB: bracket_prod POSTGRES_USER: bracket_prod POSTGRES_PASSWORD: bracket_prod ","version":"Next","tagName":"h2"},{"title":"Configuration","type":1,"pageTitle":"Deployment","url":"/docs/running-bracket/deployment#configuration","content":" ","version":"Next","tagName":"h2"},{"title":"Backend configuration","type":1,"pageTitle":"Deployment","url":"/docs/running-bracket/deployment#backend-configuration","content":" The following configuration variables need to be adjusted for the backend to run it in production: JWT_SECRET: Create a random secret using openssl rand -hex 32CORS_ORIGINS: Set frontend domain names for CORS. For example: CORS_ORIGINS=https://frontend.bracket.com.ADMIN_EMAIL and ADMIN_PASSWORD: It's important to not leave the admin credentials to the default values.ALLOW_INSECURE_HTTP_SSO: Must be set to false Optional: SENTRY_DSN: The Sentry DSN for monitoring and error trackingBASE_URL: The base url of the API used for SSO See the config docs for more information. ","version":"Next","tagName":"h3"},{"title":"Frontend configuration","type":1,"pageTitle":"Deployment","url":"/docs/running-bracket/deployment#frontend-configuration","content":" The following configuration variables need to be adjusted for the frontend to run it in production: NEXT_PUBLIC_API_BASE_URL: The base URL of the backend API to which the frontend sends requests. For example: https://api.bracket.com Optional: NEXT_PUBLIC_HCAPTCHA_SITE_KEY: The HCaptcha key used for captcha challenges when creating new accounts. You get the secret when you create a new site in HCaptcha. If left blank, HCaptcha will be disabled for your site. ","version":"Next","tagName":"h3"},{"title":"Deploy to cloud service","type":1,"pageTitle":"Deployment","url":"/docs/running-bracket/deployment#deploy-to-cloud-service","content":" ","version":"Next","tagName":"h2"},{"title":"Vercel","type":1,"pageTitle":"Deployment","url":"/docs/running-bracket/deployment#vercel","content":" To deploy the frontend to Vercel, use the following link: https://vercel.com/new/project?template=https://github.com/evroon/bracket Make sure to select the frontend directory as root directory, and use Next.js as framework. ","version":"Next","tagName":"h3"}],"options":{"id":"default"}}