simple tournament cli app in rust
  • Nix 95.4%
  • Rust 4.6%
Find a file
2026-07-06 14:30:29 +02:00
src initial commit 2026-07-06 14:30:29 +02:00
.envrc initial commit 2026-07-06 14:30:29 +02:00
.gitignore initial commit 2026-07-06 14:30:29 +02:00
Cargo.lock initial commit 2026-07-06 14:30:29 +02:00
Cargo.toml initial commit 2026-07-06 14:30:29 +02:00
flake.lock initial commit 2026-07-06 14:30:29 +02:00
flake.nix initial commit 2026-07-06 14:30:29 +02:00
README.md initial commit 2026-07-06 14:30:29 +02:00

simple tournament cli/tui app

goal: manage simple tournaments constraint: no use of LLM for anything

todo:

  • enroll participants
  • generate random matches
  • generate knockout (single elimination) bracket
  • edit generated matches
    • manually set matches (who battles who)
  • save eveything
    • json or db ? json feels simpler, the goal of the app is to be simple at the moment

for later:

  • any number of people in matches
  • everyone plays at least once against everyone in the minimum number of matches

choices

bare CLI, enhanced CLI (like parted or bluetoothctl) or full TUI (with ratatui)?

we'll start eazy will bare cli, in the end a TUI with vim like binding and preview of braket would be nice

data structure

  • Tournament
    • id: number
    • name: string
    • type: string/enum
    • players: array of Player
    • running: same
    • eliminated: same
    • matches: list of Math
  • Player
    • id
    • name
    • status (running/eliminated)
    • rank
  • Match
    • id
    • level (which point of the compition, final, semi-final, etc, 0 for finals, 1 for semi finals, 2 for quarter-finals etc (so i can just do 1/2^level))
    • players: array with 2 players (or more?)
    • winner: Player

how to differentiate still running and already eliminated players? just one array of player and each player gets a boolean for running/eliminated? 3 lists?

do i reference things (matches, players, etc) via reference or via their id

data saving

we'll use json

Warning

writing and reading to/from a file is extremently consuming in terms of time and ressources, we'll take that into account and keep only mandatory IO interaction

as of writing this the goal is to manage tournament not between peoples or teams but between random things like "cool things" or "best gif", so for now managing players seperatly from tournaments feels unecessary, but as this could be reused for something greater later maybe separating them is usefull

nah lets just keep things simple for now, no seperation, as in player belongs to the tournament object

{
  tournaments: [
    12341234: {
      players: [

      ],
      playersNumber: 0,
      type: ""
    },
  ],
  tournamentNumber: 0
}