/tourney

delightful and easy tournament management

Primary LanguageVueMIT LicenseMIT

tourney

tourney

Mono repository for the tourney project. This project is a web application for managing tournaments.

It includes an admin dashboard for managing tournaments, teams/players, live scores, and a client app for tournament attendees.

Caution

tourney is still in development. You will find bugs and broken/unfinished features.

♻️ Release Cycle

tourney follows the Semantic Versioning guidelines.

✨ Installation and Configuration

Installation for Development

  1. clone the repository:
git clone https://github.com/Dino-Kupinic/tourney.git
  1. install packages
pnpm i

Tip

If you don't have node.js installed, checkout https://nodejs.org to install for your operating system. We recommend using the LTS version, preferably v20 or higher.

Tip

If you don't have pnpm installed, checkout https://pnpm.io/installation to install for your operating system.

Backend

  1. run supabase
pnpm run start:supabase

Tip

If you don't have docker installed, checkout https://www.docker.com/.

  1. head to http://127.0.0.1:54323

If it works, great!

Frontends

Admin

  1. define environment variables

Create a .env file and checkout the .env.example. Copy the content into your .env and replace the following fields with your own.

Field Description
SUPABASE_URL URL to Supabase API
SUPABASE_KEY Anon key
SUPABASE_SERVICE_KEY Service Role Key
NUXT_PUBLIC_CLIENT_URL URL of the viewer app, default http://localhost:3001
  1. run dev server
pnpm run dev:admin
  1. Head to http://localhost:3000/

If it works, great!

Viewer

  1. define environment variables

Create a .env file and checkout the .env.example. Copy the content into your .env and replace the following fields

Field Description
SUPABASE_URL URL to Supabase API
SUPABASE_KEY Anon key
  1. run dev server
pnpm run dev:viewer
  1. Head to http://localhost:3001/

If it works, great!

User creator script

  1. define environment variables

Create a .env file and checkout the .env.example. Copy the content into your .env and replace the following fields

Field Description
SUPABASE_URL URL to Supabase API
SUPABASE_KEY Anon key
USERS_TO_CREATE See comment in .env.example
  1. run the script
pnpm run create:users

If it works, great! You can now log in in the admin dashboard with the created users.

Further Steps

Image Bucket

  1. Create images bucket like below:

Note

This step might be automated in the future.

img.png

  1. Create the following folders in the images bucket:
  • logos
  • variants
  1. Move the images from /resources/base to the logos folder in the bucket.
  2. Move the images from /resources/variants to the variants folder in the bucket.
  3. It should look like this:

img.png .svg logos in the logos folder

img.png .svg logo variants grouped in the variants folder

RLS Policies

  1. Create the RLS policies:
  • Read Access SELECT
    • on all tables for the public role
  • Write Access INSERT
    • class, registration, tournament for the authenticated role
    • player, team for the public role
  • Update Access UPDATE
    • registration for the public role
  • Delete Access DELETE
    • registration for the authenticated role

Caution

These policies are subject to change. Please refer to the latest documentation.

🚀 Deployment

  1. build the app
pnpm run build
  1. start the app
pnpm run app:start

Tip

Didn't work? Try installing pm2 globally with npm install pm2 -g.

  1. monitor the app
pnpm run app:monitor
  1. enjoy the app!

// WIP

😄 Author

🛠️ Tech Stack

  • Nuxt 3
  • Supabase (Postgres)
  • Docker
  • pm2

Contributing

// WIP

😊 License

MIT