Skip to content

Latest commit

 

History

History
77 lines (51 loc) · 3.15 KB

File metadata and controls

77 lines (51 loc) · 3.15 KB

Overview

The tech stack in short:

Development

Prerequisites

You'll need these installed:

A development database is also required. The simplest way to get started is to install PostgreSQL locally, which you can find installation instructions for on the official website. Alternatively, you can run it within a Docker container, or use a cloud service like Neon (free tier).

Getting started

Clone the repository and navigate to it:

git clone https://github.com/Dunderligan/web
cd hemsida

Copy the .env.example file to .env and fill in the DATABASE_URL field with the URL of your database:

DATABASE_URL="postgresql://[user]:[password]@[host]/[database]"

For example, on a local database named dunderligan using the root postgres user:

DATABASE_URL="postgresql://postgres:[password]@localhost/dunderligan"

Note

While the rest of the environment variables are not necessary for core functionality, some notable features will be unavailable when the values are left as default. This includes account logins and team logos (both load and upload).

Then run the following commands:

pnpm install
pnpm db:push
pnpm dev

Open up http://localhost:5173/setup in a browser, where the website will ask you to create a "superadmin" user. This user is the only one who can promote other admins.

Note

Currently, only Battle.net authentication is supported. This has implications if you lose the session credentials to the superuser. In that case, you'll either have to manually edit the database, or make sure you signed up with a battletag you have access to (and setup Battle.net OAuth).

Formatting

The project uses Prettier for code formatting. Always format your code before contributing. This can be done via your editor (for example with the Prettier VSCode extension), or by running pnpm format.

Next steps

Contributing

New contributions are always welcome! Just make sure to follow these:

  • Adhere to the tournament code of conduct (discord message link)
  • Make sure to target the dev branch with your pull request (important!)
  • Please contact Dunderligan management if you wish to make larger changes
  • Prefer to split larger PRs into smaller chunks