Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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-<short>` — pinned to a commit
- `ghcr.io/aanogueira/beer:<version>` — for tagged releases
- `ghcr.io/techquestsdev/beer:latest` — head of `main`
- `ghcr.io/techquestsdev/beer:sha-<short>` — pinned to a commit
- `ghcr.io/techquestsdev/beer:<version>` — 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*.

Expand All @@ -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

Expand All @@ -107,7 +107,7 @@ Abre <http://localhost:3000>.
#### 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?
Expand All @@ -120,6 +120,6 @@ App feita em poucas horas para um amigo que precisava de uma forma divertida de

</details>

## 📄 License
## License

MIT — see [LICENSE](LICENSE).
Binary file modified docs/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 26 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/GraphDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ export default function GraphDisplay({ teams, onSelect }: GraphDisplayProps) {
}

return (
<div className="h-72 mb-8">
<ResponsiveContainer width="100%" height="100%">
<div className="h-72 mb-8 w-full">
<ResponsiveContainer width="100%" height="100%" minWidth={0} minHeight={0}>
<BarChart
data={teams}
margin={{ top: 18, right: 30, left: 10, bottom: 10 }}
Expand Down
Loading