diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8e0e591..69499cb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,6 +14,12 @@ updates: commit-message: prefix: chore include: scope + ignore: + # eslint v10 breaks the eslint-plugin-react bundled with + # eslint-config-next 16 (uses removed context.getFilename()). + # Re-enable once eslint-config-next ships a v10-compatible plugin. + - dependency-name: "eslint" + update-types: ["version-update:semver-major"] groups: next-react: patterns: diff --git a/README.md b/README.md index 428d4c9..4d8f580 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,22 @@ [![Docker](https://github.com/aanogueira/beer/actions/workflows/docker.yml/badge.svg)](https://github.com/aanogueira/beer/actions/workflows/docker.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-amber.svg)](LICENSE) -[![Next.js](https://img.shields.io/badge/Next.js-15-black?logo=next.js)](https://nextjs.org) +[![Next.js](https://img.shields.io/badge/Next.js-16-black?logo=next.js)](https://nextjs.org) -A small, friendly web app that tallies drinks per team — perfect for a Futsal tournament, a pub league, or any group competition. Bilingual (English / Português), browser‑local persistence, no accounts. +A small, friendly web app that tallies drinks per team — perfect for a futsal tournament, a pub league, or any group competition. Bilingual (English / Português), browser‑local persistence, no accounts. ![Preview](docs/preview.png) -## ✨ Features +## Features - **Per‑team counter** — add or remove drinks in steps of 1, 2, 5, or 11. -- **Live leaderboard chart** — bar chart updates as you click. -- **Bilingual UI** — toggle between Portuguese and English in the header (your choice is remembered). +- **Live leaderboard chart** — bar chart updates as you click; click a bar to switch to that team. +- **Beer‑themed bars** — each bar wears a foam cap, and teams get distinct colors plus a fill pattern (stripes, dots, crosshatch…) so similar shades stay easy to tell apart. +- **Bilingual UI** — toggle between Portuguese and English in the header; your choice is remembered. - **Persistent locally** — teams and counts survive a refresh via `localStorage`. No backend, no accounts. - **No accidental deletes** — drunk‑proofed: teams can only be added, not removed (clear browser storage if you really need to). -- **Distinct team colors** — each new team picks a unique color from a curated palette. -## 🚀 Quickstart +## Quickstart ```bash npm install @@ -33,12 +33,12 @@ npm run build npm start ``` -## 🐳 Docker +## Docker Pull the latest published image and run it: ```bash -docker run --rm -p 3000:3000 ghcr.io/aanogueira/beer:latest +docker run --rm -p 3000:3000 ghcr.io/techquestsdev/beer:latest ``` Or build it yourself: @@ -50,30 +50,30 @@ docker run --rm -p 3000:3000 beer The image is a multi‑stage build using Next.js' `standalone` output. It runs as a non‑root `node` user and ships a `HEALTHCHECK` against `/`. -## 🤖 Continuous Integration +## Continuous Integration -`.github/workflows/docker.yml` builds the image on every PR (no push) and on every push to `main` and on `v*.*.*` tags it publishes multi‑arch (`linux/amd64`, `linux/arm64`) images to **GHCR**: +`.github/workflows/docker.yml` builds the image on every PR (no push). On every push to `main` and on `v*.*.*` tags it publishes multi‑arch (`linux/amd64`, `linux/arm64`) images to **GHCR**: -- `ghcr.io/aanogueira/beer:latest` — head of `main` -- `ghcr.io/aanogueira/beer:sha-` — pinned to a commit -- `ghcr.io/aanogueira/beer:` — for tagged releases +- `ghcr.io/techquestsdev/beer:latest` — head of `main` +- `ghcr.io/techquestsdev/beer:sha-` — pinned to a commit +- `ghcr.io/techquestsdev/beer:` — for tagged releases -Caching uses GitHub Actions cache (`type=gha`) so warm builds finish in seconds. +Caching uses GitHub Actions cache (`type=gha`) so warm builds finish in seconds. Dependabot keeps npm, GitHub Actions, and the Docker base image up to date. -## 💾 How data is stored +## How data is stored -All teams and counts live in your browser's `localStorage` under the key `teams`. Clear site data (or open a different browser) and you start fresh. Need to remove a team? Edit the JSON in DevTools → Application → Local Storage. 😉 +All teams and counts live in your browser's `localStorage` under the key `teams`. Clear site data (or open a different browser) and you start fresh. Need to remove a team? Edit the JSON in DevTools → Application → Local Storage. -## 🛠 Tech +## Tech -- [Next.js 15](https://nextjs.org) (App Router, standalone output) +- [Next.js 16](https://nextjs.org) (App Router, standalone output) - [React 19](https://react.dev) - [Tailwind CSS 4](https://tailwindcss.com) -- [Recharts](https://recharts.org) for the bar chart +- [Recharts 3](https://recharts.org) for the bar chart - [lucide-react](https://lucide.dev) for icons - TypeScript -## 📝 Origin story +## Origin story A small app whipped up in a few hours, originally for a friend running a futsal tournament side‑bet on which team's supporters would drink the most. It stuck around because it's just *fun*. @@ -89,11 +89,11 @@ Aplicação simples para contar o número de bebidas consumidas por equipa. Cons #### Funcionalidades - **Contador por equipa** — adicionar ou remover em passos de 1, 2, 5 ou 11. -- **Gráfico em direto** — barra de classificação atualiza ao clicar. -- **Interface bilingue** — alterna entre Português e Inglês no cabeçalho (a escolha fica guardada). +- **Gráfico em direto** — a barra atualiza ao clicar; clica numa barra para selecionar essa equipa. +- **Visual com tema de cerveja** — cada barra tem uma "espuma" no topo, e as equipas recebem cores distintas com um padrão (riscas, pontos, quadriculado…) para se distinguirem mesmo com tons parecidos. +- **Interface bilingue** — alterna entre Português e Inglês no cabeçalho; a escolha fica guardada. - **Persistência local** — equipas e contagens sobrevivem a um refresh via `localStorage`. Sem backend, sem contas. - **À prova de bêbados** — não dá para remover equipas (esse é o ponto). Para limpar, apaga o storage do browser. -- **Cores distintas** — cada nova equipa recebe uma cor única de uma paleta curada. #### Começar @@ -107,7 +107,7 @@ Abre . #### Docker ```bash -docker run --rm -p 3000:3000 ghcr.io/aanogueira/beer:latest +docker run --rm -p 3000:3000 ghcr.io/techquestsdev/beer:latest ``` #### Onde estão os dados? @@ -120,6 +120,6 @@ App feita em poucas horas para um amigo que precisava de uma forma divertida de -## 📄 License +## License MIT — see [LICENSE](LICENSE). diff --git a/docs/preview.png b/docs/preview.png index 6a7d0f2..af7ccf7 100644 Binary files a/docs/preview.png and b/docs/preview.png differ diff --git a/package-lock.json b/package-lock.json index c23f544..e8f8d26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2013,19 +2013,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/@unrs/resolver-binding-android-arm-eabi": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", @@ -3691,6 +3678,19 @@ } }, "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", @@ -3721,6 +3721,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/esquery": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", @@ -5645,7 +5658,6 @@ "version": "8.5.13", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.13.tgz", "integrity": "sha512-qif0+jGGZoLWdHey3UFHHWP0H7Gbmsk8T5VEqyYFbWqPr1XqvLGBbk/sl8V5exGmcYJklJOhOQq1pV9IcsiFag==", - "dev": true, "funding": [ { "type": "opencollective", diff --git a/src/components/GraphDisplay.tsx b/src/components/GraphDisplay.tsx index 07c66f0..271b252 100644 --- a/src/components/GraphDisplay.tsx +++ b/src/components/GraphDisplay.tsx @@ -197,8 +197,8 @@ export default function GraphDisplay({ teams, onSelect }: GraphDisplayProps) { } return ( -
- +
+