Skip to content

etournity/etournity

Repository files navigation


GitHubBanner

Welcome to Etournity!

Etournity is the world’s most advanced (and probably only 😉) open source platform for online esports tournaments. It’s built to be easily usable with no prior esports experience.

Some of our testers have called it the “start.gg killer”, but you’re welcome to try that out for yourself on
etournity.com

GitHub Mozilla HTTP Observatory Grade GitHub Workflow Status GitHub Workflow Status Powered by

Index


Getting Started

New Feature Idea?

Look into our Github Discussions to see which new features / improvements are currently on our mind. Submit your own idea if you can't find a similar one that already exists!

Found a bug?

  1. Check the Issues page for similar reports
    a. If it was already reported: Comment
    b. If it wasn't reported yet: Submit a Bug issue, including as many details as you can think of.

Join Discord!

Talk/Chat with the community on the Etournity Discord - we are friendly :)


Installation

Requirements

Please ensure you have all of these installed before proceeding:

Local Setup

First of all, clone this repository:

git clone https://github.com/etournity/etournity.git && cd etournity

Before jumping into the code, there are a couple of thigs we need to ensure:

  • Run yarn in the root folder

    This will install all required npm dependencies locally. Every time new dependencies are introduced, this will have to be run again.

  • Run yarn generate in the root folder

    This will generate all of the necessary graphql/prisma code and will have to be run again each time the prisma schema is updated


NOTE: For convenience, we've created a setup script (yarn setup) which combines these two together for when you e.g. pull the latest changes from github.


  • Ensure all environment variables are defined

    In packages/server and packages/client, copy the .env.example files to .env. The default values should just work™

  • Have a Postgresql database running

    For convenience, we provide a docker-compose script to run a seeded postgres database. To start it, run:
    yarn db or yarn db:bg (background - detach from terminal)

    To stop an instance running in the background, use yarn db:stop-bg.

    To reset the database, run yarn db:reset.

    To reseed the database, run yarn db:reseed (database is also automatically seeded on server start)

  • Apply the latest database migrations

    In development mode, this happens automatically. The only thing to remember is that - after you change the database schema, yarn migrate:save has to be run to create a new migration file. NOTE: there should only be one migration per Pull-Request max.


Now the fun can finally begin!
Fire up your favourite terminal emulator, run yarn dev and everything should be up and running perfectly.


Contributing

Guidelines

Our workflow is based on Trunk Based Development, for more information about the how and why, check out their website.

  • We have one main branch, main, which is our single source of truth
  • main is always release ready
  • All work happens in short-lived feature-branches (short-lived = no more than 2 days)
  • Branch names follow kebab-case and have to be prefixed with feat/, refactor/, chore/, fix/ or hotfix/
    Example: feat/my-awesome-feature
  • Merge-Commits follow conventional commits. See Common Commit Types.
  • All tests need to pass and at least 1 review is required before a Pull Request can be merged
  • After a PR has been merged, the branch should be deleted (this happens automatically)

Linting and Formatting

We are using Prettier and Eslint as guidelines to keep our code nice and tidy.
We highly recommend you to set up formatting and linting in your code editor!

Eslint makes sure we abide by the coding conventions we set. We are using recommended rules from eslint as well as several plugins and some of the rules are customized.
You can find all plugins and custom rules used in .eslintrc.js.

Prettier is used to format and, as the name suggests, makes the code base prettier.
Specifications for our repository can be found in .prettierrc.


License

Etournity is distributed under the GNU General Public License version 3 (GNU GPLv3).

In essence, the GNU GPLv3 is designed to ensure that software remains free and open-source, and that anyone can use and improve it.

See the LICENSE file in the repository root for the full license.