Darts Scorer Web is a multiplayer darts scorer built with Next.js 16, React 19, and Firebase.
The web app covers the full match loop for local and authenticated players, with persistent stats, Elo, history, and Firestore-backed cloud state.
- multiplayer darts scorer for browser-based play
- match setup, scoring, leg-finished, and match-finished phases
- simple-out and double-out support
- ranking, history, Elo, and backup flows
- Firebase Auth with guest mode
- Firestore persistence for finished matches and user statistics
- English and Russian UI support
- PWA shell with build-version metadata
- Next.js 16 App Router
- React 19
- TypeScript
- Firebase Auth
- Firestore
- Tailwind CSS
- Radix UI / shadcn-style primitives
- Vitest
npm install— install dependenciesnpm run dev— start the development servernpm run build— sync build version and build the production bundlenpm run start— start the production servernpm run lint— run ESLintnpm run test— run unit tests with Vitest
. "$HOME/.nvm/nvm.sh"nvm use 24cd /Users/valeryazartsov/darts-scorer-webnpm installnpm run dev- Open
http://localhost:3000
Create .env.local with Firebase public variables:
NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_AUTH_DOMAINNEXT_PUBLIC_FIREBASE_PROJECT_IDNEXT_PUBLIC_FIREBASE_STORAGE_BUCKETNEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_IDNEXT_PUBLIC_FIREBASE_APP_ID
app/page.tsx— top-level game orchestratorlib/game-types.ts— domain types and checkout mapslib/game-engine.ts— pure turn-processing enginelib/game-storage.ts—sessionStoragepersistence for in-progress matcheslib/game-firestore.tsx— save/load stats, Elo, and backup flowslib/auth-context.tsx— auth state and guest modelib/i18n/*— translations and language contextcomponents/game-setup.tsx— match setupcomponents/game-board.tsx— active game board containercomponents/scoring-input.tsx— dart input and projection flowcomponents/victory-screen.tsx— final match resultscomponents/leg-transition.tsx— between-leg transitionscomponents/stats-modal.tsx— ranking, history, Elo, and backup UI
The standalone Expo mobile app now lives in its own repository:
darts-scores-native
The local mobile workspace now lives alongside this project at /Users/valeryazartsov/darts-scorer-native.
Current test coverage includes:
lib/game-engine.test.tslib/game-firestore.test.ts
Run all tests with npm run test.
- Build version is updated through
scripts/update-version.jsand stored inlib/version.ts. - Keep translation keys aligned across both
enandrulocales. - For game-rule changes, prefer editing pure logic in
lib/game-engine.tsand updating tests first. - EAS configuration is present for the current project state, but the dedicated mobile app is maintained in a separate repository.
Project-level updates are tracked in CHANGELOG.md.