A dice score table with zero extra libraries

Dice Tally Score Table Generator

Before there was an Android app, there was a web page. Dice Tally started as a score table for a five-dice game, built as a way to learn new tools, using Next.js and React and nothing else.

The constraint: no libraries beyond Next.js, React and React DOM at runtime.

What "nothing else" meant

  • State is plain React useState, with no state library.
  • All styling is one global stylesheet using CSS Grid. No Tailwind, no CSS modules.
  • TypeScript runs in strict mode, with unused variables and parameters treated as errors.
  • It is deployed to Vercel by a GitHub Actions workflow whenever I push to the main branch.

Remembering the game without a server

There is no backend, so the game has to live in the browser. Every change is saved to the browser's local storage, and the saved game expires one day after the last change. Close the tab, come back later the same day, and the score table is as you left it.

For longer-term saving there is a Save button that downloads the scorecard as a JSON file named with the date and time, and an Open button that loads one back. Open checks the structure of the file first and shows an error message if it is not a valid game.

The details that make it feel like a game

The colours are parchment, wood and felt green. The rules sit in a collapsible section. Fixed-score boxes such as Full House (25), Small Straight (30) and Large Straight (40) are dropdowns with a 0 option, so a failed roll is one tap. Totals and the upper-section bonus are calculated for you.

The interface is in Ukrainian by default, with English available. Tap the dice logo and a dice roller opens, with up to three rolls per turn and the option to keep or release each die.

What came next

The Android app followed later the same month. Same game, same rules, different tools. You can try the web version at yahtzee-red.vercel.app.