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
- Getting Started
- Contributing
- Validation
- RBAC
- License
- Package specific documentation
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!
- 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.
Talk/Chat with the community on the Etournity Discord - we are friendly :)
Please ensure you have all of these installed before proceeding:
- node.js >=12.10 <=18.x (currently >19.x does not seem to work properly)
- node.js c++ Build Tools
windows:npm install --global windows-build-tools
linux/macOS:python2.7
,gcc
,make
- yarn
- docker
- docker-compose
- react-developer-tools (optional)
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 folderThis 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 folderThis 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
andpackages/client
, copy the.env.example
files to.env
. The default values shouldjust 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
oryarn 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.
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 withfeat/
,refactor/
,chore/
,fix/
orhotfix/
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)
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
.
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.