How mdsalmantd/tenzies-game works
Project type and purpose
• This is a single-page frontend application: a React + Vite + Tailwind CSS dice game called “Tenzies.”
• It has no separate backend or database; it runs entirely in the browser, with minimal persistence via cookies.
File structure
• Top level:
• index.html – the SPA shell
• package.json / package-lock.json – frontend dependencies & scripts
• vite.config.js, tailwind.config.js, eslint.config.js – build & lint config
• src/
• main.jsx – Vite’s entrypoint, renders <App/> into the DOM
• App.jsx – root component, contains layout & DiceGame
• components/
– DiceGame.jsx – core game logic, state management (dice array, timer, cookies)
– Dice.jsx – presentation of an individual die
• App.css, index.css – global & Tailwind imports
Key insights from the README
• Tech stack: React (components, hooks), Vite (dev + build), Tailwind CSS (styling), react-confetti (win animation), js-cookie (score persistence).
• Features: click-to-hold dice, rolling logic, timer, best-score cookies, confetti on win.