Go to file
Daniel Schädler 43e7924c35 Add todo 2025-03-22 14:11:47 +01:00
app Syntax improvements 2025-03-16 12:41:47 +01:00
bin Update to rails 7.0.3 2022-05-19 09:08:36 +02:00
chart Add simple health check 2022-06-10 19:18:08 +02:00
config Make beta use production settings 2025-03-16 15:28:24 +01:00
db Add migration for timer 2025-03-09 21:27:38 +01:00
doc Regenerate SVGs 2018-11-30 14:20:57 +01:00
docker New beta environment settings 2025-03-16 15:04:12 +01:00
public Initial commit 2018-10-30 15:52:46 +01:00
spec Skip profiling by default 2025-03-16 13:45:10 +01:00
.dockerignore Update to rails 7.0.3 2022-05-19 09:08:36 +02:00
.gitignore Remove specs_with_runtime.txt 2025-03-16 12:41:35 +01:00
.gitlab-ci.yml Always run tests 2024-04-10 23:23:02 +02:00
.rspec Initialize RSpec setup 2018-11-13 16:56:16 +01:00
.rubocop.yml Readd current version of rubocop 2021-08-15 14:29:11 +02:00
.ruby-version Update to ruby 3.1.2 2022-05-19 21:59:14 +02:00
Gemfile Install and configure rubyprof 2025-03-16 13:22:08 +01:00
Gemfile.lock Install and configure rubyprof 2025-03-16 13:22:08 +01:00
README.md Add todo 2025-03-22 14:11:47 +01:00
Rakefile Apply rubocop formatting 2018-11-10 15:50:27 +01:00
config.ru Apply rubocop formatting 2018-11-10 15:50:27 +01:00
docker-compose.yml Use production env (defined in Dockerfile) 2019-04-17 09:15:39 +02:00

README.md

turniere-backend

Build Status pipeline status Coverage Status Codacy Badge Quality Gate Status Maintainability

Ruby on Rails application serving as backend for turnie.re

Quick install with Docker

turnie.re - Quickstart

Installation

# install dependencies
$ bundle config set with "development test"
$ bundle install
# run migrations
$ rails db:migrate

Running

Development (without mail confirmation and separate database):

$ RAILS_ENV=development rails server

Testing

Running tests works as follows:

bundle exec rspec

Docker

Registry

You can find all our Dockerfiles in the docker directory. They depend on each other in the following order: productiondevelopmenttest This means, to build the development image, you have to build the production image first and tag it with the corresponding tag that is mentioned in the FROM line in the development Dockerfile. To build all images do:

cd turniere-backend
docker build -t registry.gitlab.com/turniere/turniere-backend/production -f docker/production/Dockerfile .
docker build -t registry.gitlab.com/turniere/turniere-backend/development -f docker/development/Dockerfile .
docker build -t registry.gitlab.com/turniere/turniere-backend/test -f docker/test/Dockerfile .

This is done to leave test and development dependencies out of the production container. Also we have a dedicated test container which runs the tests reproducible when you start it, but can also run the normal rails server to somewhat debug problems occuring in the test suite if needed.

While developing, if you want to use the development docker container, it should™ be sufficient to mount the root of this repository into the /app folder within the docker container to avoid building it over and over again. Only rebuilding the development container is not sufficient, as the development Dockerfile does not have a COPY Statement

Generate diagrams

$ rails diagram:all_with_engines

Ideen

  • backend könnte "advancing" an ein team mit dranschreiben; das könnte das frontend anzeigen
  • alle funktionen der beamer ansichten müssen per query param gehen; beamer dann headless möglich (raspberry ohne maus/tastatur); noch besser: Beamer ansicht einfach /beamer und das backend entscheidet was geht
  • feature im frontend für "team merken" damit man automatisch zur eigenen gruppe/aktuellstes game scrollt
  • timer auf dem beamer anzeigen für aktuelle runde
  • filter für "aktuelle runde" für den beamer
  • beamer modus (vollbild ohne cursor)
  • qr codes drucken für ergebnisausgabe und auf allen beamern anzeigen
  • admin frontend automatisch aktualisieren
  • admin frontend anzeigen wie "alt" die daten sind, also wann wurde die seite zuletzt aktualisiert
  • näcshte spiele sollten anzeigen wer da spielt (team a / team b) wenns direkt drunter ist und ansonsten "gewinner achtelfinale 3"
  • erste playoff spiele sollten "1. gruppe 15 vs 2. gruppe 16" anzeigen
  • admin frontend muss tische auch anzeigen
  • WICHTIG UND EZ: gruppenphase in der gleichen gruppe sollten erst finale gegeneinander spielen (dazu nicht aus der nächsten gruppe sondern einmal advancing teams von vorne und einmal von hinten, oder offset von hälfte der weiterkommenden teams)
  • beim eintragen einer runde direkt den nächsten tisch anzeigen
  • spiel um platz 3
  • edgecase wenn mehr als die hälfte der teams weiterkommen bedenken bzw zumindest abfangen (hier ist gemeint dass es aktuell spezialcode für po2 turniere gibt bei denen immer die hälfte weiterkommt, es sollte aber auch irgendwie für alle turniere funktionieren, ist nur out of scope für bpwstr)
  • Timer groß werden lassen als splashscreen wenn er ausläuft
  • Flaschenhalter für die Techniktische
  • timer end im admin frontend hübsch machen (aktuell hardcoded startwert)
  • turniere-match on focus suche markieren
  • vollbildansicht anpassen, dass sie auch abstände oben hat (die navbar oben is ja weg)
  • damit klarkommen wenn matches aus der reihe gespielt werden (ein match stoppen, anderes match starten, neue matches starten muss entsprechend auch noch funktionieren)