One question, five seconds · GO / MAYBE / FLAT / BLOWN OUT · board call · Marine Institute, Met Éireann and Open-Meteo
A surf forecast that returns a decision, not a data table.
Tonnta answers one question for Donabate, Co. Dublin: is it worth going down, and what board do I bring?
View source on GitHubOverview
Tonnta (Irish: waves) is a surf companion for Donabate, Co. Dublin. It exists to answer one question in under five seconds: is it worth going down, and what board do I bring?
The answer is a single word, GO, MAYBE, FLAT or BLOWN OUT, with a board call underneath it and the reasoning behind both. Live wave and wind conditions come from the Marine Institute, Met Éireann and Open-Meteo. The app adds buoy observations, tides and sea temperature, but those are supporting detail. The verdict is the product.
It is a pnpm and Turborepo monorepo: a Next.js web app, an Expo app, and a Cloudflare Worker, over shared data, types and ui packages.
The problem
Surf forecasting sites hand you a table and make you do the interpretation. Wave height, period, swell direction, wind speed, wind direction, tide. If you already know the spot, you can read all that in a second. If you know the spot well, you are not really reading it at all. You are applying a handful of learned rules: this beach needs at least knee-high, westerlies are offshore here, anything over about 35km/h onshore is a write-off.
That knowledge is the valuable part, and every forecast site leaves it in your head. The table is the same whether you have surfed a break for ten years or have never seen it.
Donabate makes the gap obvious. It is a small-wave east-coast beach, so the thresholds that matter there are nothing like the ones a global forecasting product is tuned for. Surfline barely knows the place exists.
What I built
The verdict engine
The core of the product is 147 lines in packages/data/src/verdict.ts. It takes an hour of conditions and a spot, and returns a verdict and a board.
Wind is the part that carries the local knowledge. Wind direction is reported as where the wind comes from, and whether that helps or ruins a beach depends entirely on which way the beach faces. So the engine computes the smallest angle between the wind and the spot’s offshore bearing, then bands it:
const offshoreFrom = (spot.facing + 180) % 360;
const delta = angleBetween(windDirectionDeg, offshoreFrom);
if (delta <= 45) return 'offshore';
if (delta <= 80) return 'cross-off';
if (delta <= 100) return 'cross';
if (delta <= 135) return 'cross-on';
return 'onshore';
Below 8km/h nothing is offshore or onshore in any meaningful sense, so it is simply glassy.
The thresholds are Donabate’s, not universal ones: flat below 0.3m, a go from 0.4m, wind allowed up to 25km/h, and up to 30km/h when it is offshore, because offshore wind grooms the face instead of wrecking it. Onshore wind over 35km/h is blown out regardless of how big it is.
Every one of those numbers routes through a VerdictThresholds object rather than sitting inline, and a spot can carry its own. That is what made adding Fuerteventura spots a configuration change rather than a rewrite.
The rules are the tests
The engine’s rules live next to it as Gherkin, in verdict.feature:
Scenario: Offshore wind earns the higher wind allowance
Given 0.5m waves at 4s with 28km/h wind from the west-southwest
When I assess the hour for Donabate
Then the verdict should be go
This is not documentation that drifts. The file is loaded by @amiceli/vitest-cucumber and executed by Vitest, so 54 lines of Gherkin are the test suite for 147 lines of engine. Twenty-eight km/h of onshore wind at that wave height is a maybe; the same wind from the west-southwest is a go. The scenario states the rule in the language a surfer would use, and it fails if the engine stops honouring it.
Writing domain rules this way is worth it when the rules are genuinely a domain and not just branching. Surf conditions qualify. A reviewer who has never read the engine can still tell you whether the scenarios are right.
The sea is the chart
The design direction refuses the weather-app default. The top of the screen is a full-bleed animated sea surface whose amplitude, chop and colour are driven by the actual conditions: near-still shimmer when it is glassy, slow ordered bands for clean half-metre rollers, short jittery desaturated chop when it is onshore mess. The verdict sits on top in display type, with the Irish above it: Téigh · B’fhéidir · Ciúin · Séidte.
The sea surface is the data visualisation. It is honest, because it is driven by the same numbers as the verdict, and it costs almost nothing because it is layered sine bands rather than a chart library. It respects prefers-reduced-motion with a static gradient.
The Irish-language name is the brand. Irish is used as a quiet layer of identity in eyebrow labels and verdict words, never as decoration.
Where it is
Tonnta is in development and not launched. The verdict engine, its Gherkin suite, the Fuerteventura spot switcher and the theme work are all in dev.
Two things are outstanding and worth stating plainly rather than hiding. The production branch is stranded well behind dev, and the current Cloudflare Pages deployment serves scripts and styles but renders no markup, so there is no working public URL yet. tonnta.ie is still a placeholder site rather than the app.
The next piece of work is the deployment, not a feature.
Outcome
A 147-line verdict engine with its rules written as 54 lines of Gherkin that execute as the test suite. Public data from the Marine Institute, Met Éireann and Open-Meteo, reduced to one word and a board.