Kemp.rest / Examples / Code / Report
KEMP.REST / EXAMPLES / CODE
Offing: Following Seas technical report
Written by Kevin Kemp on 3 October 2026. The report describes Following Seas 1.3.7. The code samples here are from 1.5.1. PHP, WordPress, MySQL, JSON, a hand-written WebSocket client, OpenSSL, Canvas, CSS, and JavaScript. The AISStream key in the report is blanked.
What it is
A 24-page account of the WordPress plugin. An administrator adds a vessel by MMSI. A shortcode puts a read-only radar on a public page: the boat, nearby AIS traffic, marinas and anchorages, and a NOAA chart. The audience is people ashore. The plugin ships as the files that run. There is no Composer package and no JavaScript library loaded from a CDN.
Technology
PHP 7.4, WordPress 6, MySQL through dbDelta(), a JSON state file under uploads, OpenSSL and zlib for the TLS WebSocket, and vanilla JavaScript on one canvas. Live positions stay out of the database because the collector rewrites them every two seconds. The only outside request a visitor’s browser makes is for NOAA chart tiles.
What the report covers
- The two paths into the page: the live AIS collector, and the marina and anchorage import that sits in MySQL.
- The RFC 6455 client, and the collector’s two sockets: tracked MMSIs on one, nearby traffic on the other.
- Where the state file and the marina table live, and how a write failure is shown instead of looking like an empty feed.
- The display: radar, traffic, marinas, NOAA anchorages, chart, and sharing, plus the admin checks and the public REST limits.
- Setup, the minute cron, what terrestrial AIS can and cannot promise, and the version history through 1.3.7.
The samples
The report is the whole plugin at 1.3.7. These pages are the later excerpts, and the radar screens are the display after the range and the layer toggles are used.