schmetterpause

module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: Apache-2.0

README

Schmetterpause

Matchmaking-, Liga- und Turnier-App für Büro-Tischtennis.

Go + templ + HTMX, Postgres, ein Container. Läuft in Docker Compose, Kubernetes und Azure Container Apps aus demselben Image.

Status

Im Aufbau. Aktueller Meilenstein ist der MVP nach docs/mvp-plan.md: Ergebnisse erfassen, vom Gegner bestätigen lassen, TTR berechnen, Rangliste anzeigen. Liga-, Turnier- und Buchungsmodus kommen später.

Loslegen

Voraussetzungen: Task, Docker und die Dagger-CLI. Beim ersten Aufruf einer Dagger-Task einmalig task dagger:develop ausführen — das erzeugt die generierten Teile des Pipeline-Moduls.

task up        # Compose-Umgebung starten (App + Postgres)
task run       # App lokal gegen die Compose-Datenbank, ohne Container
task ci        # lint, test, build, verify — identisch zur Pipeline
task office:setup # .env für einen Abend an der Platte
task office:up    # starten, im Netz erreichbar

task up startet das veröffentlichte Image aus GHCR, nicht eines aus dem Arbeitsverzeichnis — dasselbe Artefakt, das im Cluster läuft. Für den eigenen Stand gibt es task run (schnell, ohne Container) und task up:local (baut das Image mit Dagger und startet Compose damit).

Alle Befehle laufen über Task. Die eigentliche Pipeline-Logik steckt in Dagger und läuft lokal wie in der CI gleich — task ci ist kein Näherungswert, sondern derselbe Code.

task --list zeigt alle verfügbaren Tasks.

Dokumentation

Alles aus docs/ steht als Website unter https://stuttgart-things.github.io/schmetterpause/ — mit Navigation und Suche, und damit die bessere Adresse für alles, was jemand im Stehen oder auf dem Handy liest. Diese Datei bleibt der Einstieg für alle, die das Repository ohnehin ausgecheckt haben.

  • CLAUDE.md — Invarianten, fachliche Begriffe, Konventionen. Vor Änderungen lesen.
  • docs/mvp-plan.md — Scope, Datenmodell, Arbeitspakete, Definition of Done.
  • docs/adr/ — Architekturentscheidungen samt verworfener Alternativen. Der Index unter docs/adr/index.md wird generiert: task docs:index.
  • docs/turnier-vor-ort.md — ein Abend an der Platte mit einem Laptop für alle.

Eine Änderung, die einem ADR widerspricht, braucht ein neues ADR mit supersedes-Verweis.

Zum Namen

Schmetterball plus Pause. Der Name entstand aus einer Abstimmung im Büro und gilt als gesetzt — er steckt im Modulpfad, im Image-Namen und im Browser-Titel.

Directories

Path Synopsis
cmd
schmetterpause command
Command schmetterpause is the project's only binary.
Command schmetterpause is the project's only binary.
Package db embeds the database migrations into the binary.
Package db embeds the database migrations into the binary.
internal
auth
Package auth keeps authentication behind an interface.
Package auth keeps authentication behind an interface.
config
Package config reads the runtime configuration from the environment.
Package config reads the runtime configuration from the environment.
credential
Package credential generates and checks the shared secrets a player proves themselves with: the recovery code from docs/adr/0006 and the PIN from docs/adr/0007.
Package credential generates and checks the shared secrets a player proves themselves with: the recovery code from docs/adr/0006 and the PIN from docs/adr/0007.
domain
Package domain holds the application's business types.
Package domain holds the application's business types.
match
Package match validates a proposed match result.
Package match validates a proposed match result.
qr
Package qr renders a QR code as SVG geometry.
Package qr renders a QR code as SVG geometry.
ratelimit
Package ratelimit slows down guessing at a shared secret.
Package ratelimit slows down guessing at a shared secret.
repository
Package repository defines data access as an interface.
Package repository defines data access as an interface.
repository/postgres
Package postgres implements the repository interfaces on Postgres.
Package postgres implements the repository interfaces on Postgres.
scoring
Package scoring settles a confirmed match.
Package scoring settles a confirmed match.
seed
Package seed fills an empty database with a small, believable field.
Package seed fills an empty database with a small, believable field.
server
Package server holds HTTP routing, middleware and handlers.
Package server holds HTTP routing, middleware and handlers.
standings
Package standings turns player records into a ranking.
Package standings turns player records into a ranking.
stats
Package stats answers questions about results that have already been agreed: who beat whom, and how much table tennis the office has actually played.
Package stats answers questions about results that have already been agreed: who beat whom, and how much table tennis the office has actually played.
templates
templ: version: v0.3.1020
templ: version: v0.3.1020
tournament
Package tournament owns the two pieces of a round robin that are easy to get quietly wrong: who plays whom in which round, and where everybody stands once results arrive.
Package tournament owns the two pieces of a round robin that are easy to get quietly wrong: who plays whom in which round, and where everybody stands once results arrive.
ttr
Package ttr implements the rating used by the German table tennis association (Tischtennis-Rating).
Package ttr implements the rating used by the German table tennis association (Tischtennis-Rating).
Package web embeds the static assets into the binary.
Package web embeds the static assets into the binary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL