Skip to content

Repository files navigation

Farkle Scorekeeper

A modern, feature-rich Farkle Scorekeeper built with React, TypeScript, and Turborepo.

Features

  • PWA Support: Installable as a Progressive Web App
  • Offline Capabilities: Works without internet connection
  • Internationalization: English, and French translations
  • Responsive Design: Works on desktop and mobile devices
  • Dark/Light Mode: Theme switching with Mantine UI

Tech Stack

Monorepo Structure

  • Turborepo: Fast, incremental builds
  • Yarn: Package manager with workspaces
  • TypeScript: Type-safe development

Packages

@farkle/core

  • tsdown: Bundle ESM and CJS modules
  • TypeScript: Latest version with strict mode
  • Score Logic: Farkle score engine

web

  • React 19: Modern React with concurrent features
  • Vite 8: Fast development server and bundler
  • Mantine UI: Beautiful, accessible components
  • @tolgee/i18next & i18next: Internationalization
  • mantine-datatable: Enhanced table components
  • React Router 8: Client-side routing
  • Zustand: Lightweight state management
  • react-icons: Extensive icon library
  • vite-plugin-pwa: PWA configuration
  • vite-plugin-compression2: Gzip compression
  • Workbox: Service worker for offline support

Tooling

  • BiomeJS: Modern linter and formatter
  • Changesets: Version management and changelog generation
  • Docker: Containerized deployment

Getting Started

Prerequisites

  • Node.js 22+
  • Yarn classic
  • Docker (optional, for containerized deployment)

Installation

  1. Clone the repository:

    git clone https://github.com/bastiengrignon/farkle.git
    cd farkle
  2. Install dependencies:

    yarn
  3. Start the development server:

    yarn dev
  4. Open http://localhost:5173 in your browser.

Running in Production

# Using Docker (recommended)
docker-compose up -d

# Or manually
cd apps/web
yarn build
yarn preview

Objective

Be the first player to reach 10,000 points.

Scoring Combinations

Combination Points
Single 1 100
Single 5 50
Three 1s 1000
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 3× Three of a kind
Six of a kind 4× Three of a kind
Straight (1-5) 1500
Straight (2-6) 2000
Full House 1500
Four of a kind + Pair 1500
Two Triplets 2500

Contributing

  1. Discuss with the owner for contribution first
  2. Fork the repository
  3. Create a feature branch
  4. Make your changes
  5. Run yarn lint and yarn typecheck
  6. Add tests if applicable
  7. Create a changeset: yarn new-version
  8. Commit and push your changes
  9. Open a pull request

License

MIT

Acknowledgments

Packages

Used by

Contributors

Languages