No description
  • PHP 52.6%
  • Vue 38.6%
  • TypeScript 7.1%
  • Nix 1%
  • Blade 0.5%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-03 03:18:49 +02:00
.vscode chore: initial commit 2026-09-29 00:05:25 +02:00
app fix: remove cumulative ranking before final part 2026-10-03 03:18:49 +02:00
bootstrap fix: allow https behind a proxy 2026-10-01 11:25:24 +02:00
config fix: remove cumulative ranking before final part 2026-10-03 03:18:49 +02:00
database fix: reset keep link and buvette 2026-10-02 12:48:50 +02:00
docs feat: add new features and overall look 2026-10-02 11:30:19 +02:00
public feat: add new features and overall look 2026-10-02 11:30:19 +02:00
resources feat: add new features and overall look 2026-10-02 11:30:19 +02:00
routes feat: add new features and overall look 2026-10-02 11:30:19 +02:00
storage chore: initial commit 2026-09-29 00:05:25 +02:00
tests fix: remove cumulative ranking before final part 2026-10-03 03:18:49 +02:00
.editorconfig chore: initial commit 2026-09-29 00:05:25 +02:00
.env.example fix: remove cumulative ranking before final part 2026-10-03 03:18:49 +02:00
.envrc chore: initial commit 2026-09-29 00:05:25 +02:00
.gitattributes chore: initial commit 2026-09-29 00:05:25 +02:00
.gitignore chore: initial commit 2026-09-29 00:05:25 +02:00
.oxlintrc.json chore: initial commit 2026-09-29 00:05:25 +02:00
.prettierrc.json chore: initial commit 2026-09-29 00:05:25 +02:00
artisan chore: initial commit 2026-09-29 00:05:25 +02:00
bun.lock chore: initial commit 2026-09-29 00:05:25 +02:00
Cahier des charges — Site du tournoi GreenTN.md chore: initial commit 2026-09-29 00:05:25 +02:00
components.json chore: initial commit 2026-09-29 00:05:25 +02:00
composer.json chore: initial commit 2026-09-29 00:05:25 +02:00
composer.lock chore: initial commit 2026-09-29 00:05:25 +02:00
devenv.lock chore: initial commit 2026-09-29 00:05:25 +02:00
devenv.nix feat: add new features and overall look 2026-10-02 11:30:19 +02:00
devenv.yaml chore: initial commit 2026-09-29 00:05:25 +02:00
env.d.ts chore: initial commit 2026-09-29 00:05:25 +02:00
eslint.config.ts chore: initial commit 2026-09-29 00:05:25 +02:00
Logo_BDS2.png feat: add new features and overall look 2026-10-02 11:30:19 +02:00
logogreen.png feat: add new features and overall look 2026-10-02 11:30:19 +02:00
package.json chore: initial commit 2026-09-29 00:05:25 +02:00
phpunit.xml chore: initial commit 2026-09-29 00:05:25 +02:00
pint.json chore: initial commit 2026-09-29 00:05:25 +02:00
README.md fix: remove cumulative ranking before final part 2026-10-03 03:18:49 +02:00
tsconfig.app.json chore: initial commit 2026-09-29 00:05:25 +02:00
tsconfig.json chore: initial commit 2026-09-29 00:05:25 +02:00
tsconfig.node.json chore: initial commit 2026-09-29 00:05:25 +02:00
tsconfig.vitest.json chore: initial commit 2026-09-29 00:05:25 +02:00
uno.config.ts feat: add new features and overall look 2026-10-02 11:30:19 +02:00
vite.config.ts feat: add new features and overall look 2026-10-02 11:30:19 +02:00
vitest.config.ts chore: initial commit 2026-09-29 00:05:25 +02:00

GreenTN

Site du tournoi de volley GreenTN (32 équipes) — interface publique mobile-first et back-office. Implémente le cahier des charges.

A single Laravel 13 app (PHP 8.4, SQLite) rendering Vue 3 pages with Inertia v3 — TypeScript, shadcn-vue, UnoCSS, bun. No separate API: pages get their data as props.

app/Tournament/ Tournament rules: phases, Brassage 2 algorithm, brackets, standings
app/Http/Controllers/ Inertia pages + admin actions
resources/js/Pages/ Vue pages (Public/*, Admin/*)
docs/PAGES.md Routes, page props and admin actions

Démarrage

Requires Nix + devenv. Everything else (PHP, Composer, Node, bun, SQLite) comes from devenv.nix.

devenv shell          # or `direnv allow` to auto-activate
setup                 # composer + bun install, .env, migrate & seed, storage link
devenv up             # Laravel on :8000 + Vite

Open http://127.0.0.1:8000 — back-office at /admin (admin@greentn.local / greentn, set ADMIN_EMAIL / ADMIN_PASSWORD in .env then reset-db).

The home page image is uploaded from Réglages to storage/app/public. When deploying, run php artisan storage:link, keep APP_URL right and allow 8 MB uploads in PHP (upload_max_filesize = 8M, post_max_size = 10M).

Other shell commands: reset-db, test-all, vscode-extensions (installs .vscode/extensions.json).

To click through a whole tournament quickly, fill in random scores for a phase:

php artisan tournament:fill-scores brassage1   # brassage2, principal, consolante

Déroulé

setup → brassage1 → brassage2 → finals → finished, each step gated in app/Tournament/TournamentManager.php:

  1. Équipes — rename the 32 seeded teams (only before Brassage 1 is validated).
  2. Brassage 1 — random draw (groups of 4 on terrains 3 and 4), manual edits, validation (32 teams, no duplicates, 8×3 + 2×4). Validation creates the round-robin matches.
  3. Brassage 2 — enabled once every Brassage 1 match is played; composition generated by app/Tournament/Brassage2Generator.php, never editable.
  4. Principal / Consolante — general ranking (wins → goal average → tirage au sort), top 16 → Principal (places 1–16), others → Consolante (17–32). Each tableau has 15 public matches plus 17 placement matches (admin only) so every team gets a unique place.
  5. Finir le tournoi — freezes all scores and publishes the final ranking 1–32.

Réinitialiser le tournoi (dashboard) goes back to setup from any step: groups, matches and scores are deleted, team names and settings are kept.

Interprétations du cahier des charges

  • §7 Brassage 2 — the spec lists 10 initial columns and then calls the empty construction columns "10, 11, 12". The only reading that places all 32 teams in 8×3 + 2×4 is that they are the 11th–13th columns; see the docblock in Brassage2Generator.php and tests/Unit/Brassage2GeneratorTest.php for the exact resulting groups.
  • §10 General ranking — only Brassage 2 results count to split the teams between the Principal and the Consolante.
  • Ties — the same rule is used in every table: wins, goal average, then a random draw fixed once per team (teams.tiebreak), so ties always break the same way.
  • Finals generation — an admin button, rather than triggered by the last Brassage 2 score, so a mistyped score can still be corrected first.
  • Score corrections — allowed while the stage is open and the downstream match hasn't been played yet.

Tests

test-all                       # everything
php artisan test               # algorithm, rules, a full 32-team tournament through the pages