I built a surf forecast that shows its own arithmetic
说明与用途
Swellread 将波浪、风和潮汐数据转换为清晰的评估,并展示其算术过程,支持交互式潮汐拖拽。
问题
Surf forecasts provide raw numbers but no interpretation, leading to half‑right decisions.
结果
Swellread delivers actionable surf forecasts with transparent arithmetic, interactive tide manipulation, a playable wave model, and an agent API for planning and proof, all built with open data and client‑side AI.
工作流
- 1. Pull real swell, wind and tide data from NOAA CO‑OPS and Open‑Meteo.
- 2. Compute six weighted factors (swell power, peel speed, wind quality, tide window, direction match, period cleanliness).
- 3. Apply hard gates (swell <0.35 m → score 0, reef depth <min → clamp 0.08).
- 4. Normalize remaining factors to sum to 1 and renormalize if a factor is missing.
- 5. Render verdict and arithmetic on the UI; allow drag‑tide interaction that POSTs a what‑if to the server.
- 6. Provide a WebGL Gerstner surface for a playable wave model.
- 7. Expose an agent API with JSON‑RPC tools for ranking, freezing plans, logging rides and proving chains.
- 8. Store sessions in a cookie‑scoped, soft‑deleted history with SHA‑384 seals for replayability.
证据
A forecast gives you a significant wave height, a period, a direction, a tide table and a wind arrow. That is enough information to know exactly whether a two‑hour drive is worth it.
Swellread turns today's real swell, wind and verified tide predictions into one verdict per break, and then shows every number that produced it.
The app draws the break's actual seabed profile, lets you move the water level, and re‑solves the peel.
Eight typed tools over JSON‑RPC 2.0, four of them mutating, all through the same service layer as the web UI.
- 记录日期: 2026-10-04T06:40:51.676Z