Kemp.rest / Examples / Code

KEMP.REST / EXAMPLES / CODE

Code

Written by Kevin Kemp. Samples from the past year. AI SEO is the first group: the page builder, schema, llms.txt, and AI Overviews. Offing: Following Seas is next: the technical report, then the AIS, NOAA, and OpenStreetMap integrations. The other groups are here so the index can keep growing. Each page explains the problem, names the technology in that file, and puts the source at the bottom.

Across these files: HTML, CSS, and JavaScript, JSON and JSON-LD, PHP, WordPress, WooCommerce, WooRewards, AffiliateWP, Advanced Custom Fields, MySQL, REST APIs, WebSockets, Canvas, OAuth, Auth0, Laravel, Blade, Eloquent, WHMCS, cURL, the WordPress AI client, OpenAI, Anthropic, Google Cloud, Google Business Profile, Google Maps, DataForSEO, AISStream, NOAA, and OpenStreetMap.

AI SEO Offing WooCommerce AnswerPins PressCare tools

AI SEO

  • Service area page builder

    ChatGPT drafts one service in one town. The page is published as WordPress blocks, with a rollback if the live page does not show it.

    PHP · Laravel · OpenAI · JSON · WordPress
  • Schema on the service page

    JSON-LD on every generated page: a Service, the LocalBusiness that provides it, and an FAQPage from the questions on the page.

    JSON-LD · Schema.org
  • llms.txt on the live site

    Built from the pages already published, sent to WordPress, and served at the site root by a small plugin.

    PHP · Laravel · WordPress · REST
  • llms.txt generator

    The public version of that file. Name, summary, grouped links, and checks, all in the browser.

    HTML · CSS · JavaScript
  • Schema markup generator

    JSON-LD for 15 schema types, checked against the fields Google asks for, with import from a page or an existing block.

    HTML · CSS · JavaScript · JSON-LD
  • Schema markup validator

    Paste HTML or raw JSON-LD. Every entity is checked for required and recommended fields, including arrays and @graph.

    HTML · CSS · JavaScript · JSON
  • Live AI Overviews through DataForSEO

    A live organic search at a town’s coordinates, with a short retry, then the AI Overview, local pack, and organic results parsed out.

    PHP · Laravel · JSON · REST · DataForSEO

Offing: Following Seas

  • Technical report

    The 24-page account of Following Seas 1.3.7: the WebSocket client, the collector, the state file, the chart, and what AIS can and cannot promise. The code excerpts are from 1.5.1.

    PDF · PHP · WordPress · MySQL · WebSocket
  • AIS positions from AISStream

    A hand-written WebSocket client and a two-connection collector. Tracked vessels on one socket, nearby traffic on the other, flushed to a state file every two seconds.

    PHP · WebSocket · JSON · OpenSSL
  • NOAA chart and charted anchorages

    Nautical chart tiles drawn on the canvas in a night palette, plus ENC anchorage areas stored as rings during import.

    PHP · JavaScript · Canvas · JSON
  • OpenStreetMap marinas and anchorages

    Overpass import in 3° tiles into MySQL. Marinas, anchorages, and anchor berths, with phone, VHF, and fuel kept from the tags.

    PHP · MySQL · JSON · REST

WooCommerce and the back office

  • Syncs Points Data

    WordPress plugin that copies a back office customer into WooCommerce and keeps the points balance aligned with WooRewards.

    PHP · JSON · REST · WooCommerce
  • Affiliate referral sync

    Scheduled AffiliateWP job that accepts, reprices, or rejects referrals from WooCommerce customer status.

    PHP · MySQL · JSON · REST
  • Storefront and order sync

    Coupon links, order-status sync, tracking, token refresh, and account tools between WooCommerce and the back office.

    PHP · JSON · REST · OAuth · Auth0
  • Merged order history

    My Account orders from WooCommerce and the back office, plus campaign parameters saved on the order.

    PHP · JSON · REST · WooCommerce

AnswerPins

  • Local rank grids on a clock

    Laravel schedule, queued jobs, and DataForSEO Google Maps searches at every point of a grid. Weekly or monthly, with retries and a time limit.

    PHP · Laravel · JSON · REST · DataForSEO
  • Google Business Profile on Google Cloud

    OAuth, token refresh, and direct edits to category, website, phone, and description through the Business Profile APIs.

    PHP · Laravel · JSON · OAuth · Google Cloud
  • Blade screens for the grid and the listing

    Laravel Blade that draws the rank grid on a Google Map and shows the Business Profile the way a customer sees it.

    HTML · CSS · JavaScript · Blade
  • WHMCS module: accounts, SSO, and city billing

    A WHMCS server module that creates the account on purchase, signs the client or admin in with a one-time link, and provisions extra cities from the product options.

    PHP · Laravel · MySQL · JSON · WHMCS

PressCare tools

  • Image optimizer

    Resize, compress, and strip metadata in the browser. JPG, PNG, WebP, and GIF in. WebP, JPG, or PNG out, with a zip of the batch.

    HTML · CSS · JavaScript
  • Error Doctor

    A read-only scan of the PHP log. Repeated events are grouped, secrets are redacted, and an explanation is optional through the WordPress AI client.

    PHP · WordPress · JSON