Skip to content

About

Darts in the browser: X01 scoring, a spoken caller, deep statistics, and a camera autoscorer that runs on-device.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

treblewise

A web app for playing darts: X01 scoring, a spoken caller, checkout help, deep statistics — and a camera autoscorer that reads the board and scores your darts for you, running entirely in the browser.

Play it: https://fre0grella.github.io/treblewise/ — X01, tap-the-board scoring and the spoken caller work today, on a phone or a laptop.

Status: experimental autoscoring. The camera can score darts in a game, but only if you switch it on: no model has passed the accuracy bar on held-out photos of a real board yet, so it is off by default and every dart it enters can be corrected with a tap. See docs/03-autoscorer.md.

What it is

Play X01 (301 → 1001), configurable in/out rule (straight / double / triple / master), legs and sets, 1–8 players.
Score Three ways, always interchangeable: press the board, say it out loud, or let the camera read it. Pressing raises a magnifying lens offset from your finger, so you can place a dart in a treble on a phone screen. The camera never gets the last word — you do.
Caller The score is spoken, so nobody has to look at the screen.
Checkout What to aim at on every finishable score, following the configured out rule.
Stats The usual ones (3-dart average, first 9, checkout %, darts per leg, bands, per-double table, session trend) plus the ones that need positions: a heatmap of where your darts land, how tightly they group along and across the sector, what happens when you go at your number, and — from your own spread — where you should actually aim, which for most players is not the treble 20.
Camera setup Point the phone at your board and the app tells you what to fix — cut off, too dark, too straight on, camera moved — then you mark the four board points once.
Try it Throw a dart, tap it in the photograph, hear the score called back. If it is right, the camera is set up properly — and that throw is one labelled training sample. In a game, the same thing happens per visit: Mark where they landed corrects the score and files the example. All of it stays on your device until you export it.
Two device modes Solo: the phone does everything. Paired: the phone is only a camera and a laptop does the rest. Pairing is two QR codes and no server at all — or, for a computer with no camera, a 103-character code the phone offers to copy. The video goes straight between the devices and never leaves your network, so it works on a hotspot with no internet.

Offline-first: it's a PWA, all game data lives on your device, and there is no account to create.

Repository layout

packages/core/     Board geometry, X01 rules, checkout routes, stats. Pure TS, no DOM.
apps/web/          The app: React + Vite, PWA.
docs/              Plan, decisions and the licence map. Start with docs/07-roadmap.md.
ml/                Dataset loading, training, evaluation, ONNX export (Python; see ml/README.md).
services/pair/     (later) Signalling relay for phone↔laptop pairing.

Quick start

npm install
npm test          # core rules + geometry
npm run dev       # app on http://localhost:5173

Documentation

Doc What's in it
01 – Product Scope, the two device modes, what is deliberately not in v1.
02 – Architecture Packages, the event log, why every dart stores coordinates.
03 – Autoscorer The runtime choice (ONNX Runtime Web), the pipeline, the training plan, the accuracy gate.
04 – Statistics Every stat, with its formula.
05 – Dual device Pairing, WebRTC, signalling.
06 – Voice Caller out loud, voice-controlled scoring, platform limits.
07 – Roadmap Phases and the gates between them.
08 – Licensing & data What may and may not be used here. Read before importing anything.

Licence

AGPL-3.0. The scorer and the autoscorer stay free and open source, including for anyone who runs them as a service.

About

Darts in the browser: X01 scoring, a spoken caller, deep statistics, and a camera autoscorer that runs on-device.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages