An easy to use scorecard for Farkle so you never need to find pen and paper again.
- Player management — Add, edit, and remove players during setup.
- Configurable on-board threshold — Choose 500, 750, or 1000 as the minimum score to get on the board.
- Win detection — First player to 10,000 triggers a final round so every other player gets one more turn.
- Farkle tracking — Quick "Farkle!" button to record a zero-point turn, highlighted in red in turn history.
- Undo — Undo the last score entry for any player.
- Current player highlight — The active player's scorecard is visually highlighted.
- Input validation — Prevents empty or duplicate player names and negative scores.
- Persistence — The React app saves game state to localStorage so you can resume after refreshing.
- Scoring reference — Built-in reference card for Farkle scoring combinations.
This monorepo uses NPM Workspaces and contains two feature-equivalent frontend apps that share game logic packages.
farkle-sc/
├── packages/
│ ├── types/ # @fsc/types — Shared TypeScript types and constants
│ └── state/ # @fsc/state — Framework-agnostic game logic (pure functions)
├── apps/
│ ├── react/ # @fsc/react — React 19 + Vite
│ └── angular/ # @fsc/angular — Angular 21 + NgRx
└── _templates/ # Hygen code generation templates
Game logic lives in the shared packages so both apps stay in sync. When adding or changing scoring rules, player management, or win conditions, update @fsc/state — never duplicate logic in individual apps.
Requires Node.js and npm 7+.
npm installnpm run start -w @fsc/reactRuns on http://localhost:3000.
npm run start -w @fsc/angularnpm test -w @fsc/reactcd apps/angular && npx ng test --no-watch --browsers=ChromeHeadlessnpm run lintnpm run ng generate component components/<name> -w @fsc/angular
npm run ng generate component pages/<name> -w @fsc/angular- Prettier: 4-space indent, 100 char width, single quotes, ES5 trailing commas.
- ESLint: TypeScript rules with sorted imports (external → builtin → internal → sibling → parent → index).
- Files use kebab-case. Components and classes use PascalCase. Angular selectors are prefixed with
fsc-.
Farkle is a dice game where players roll six dice to accumulate points:
| Combination | Points |
|---|---|
| Single 1 | 100 |
| Single 5 | 50 |
| Three 1s | 1,000 |
| Three 2s | 200 |
| Three 3s | 300 |
| Three 4s | 400 |
| Three 5s | 500 |
| Three 6s | 600 |
| Four of a kind | 2× three of a kind |
| Five of a kind | 4× three of a kind |
| Six of a kind | 8× three of a kind |
| 1-2-3-4-5-6 | 3,000 |
| Three pairs | 1,500 |
A player must reach the on-board threshold (default 500) in a single turn to start accumulating. First to 10,000 triggers a final round — all other players get one more turn. Highest score wins.