Shadow-fleet watch · Singapore Strait · every rule is SQL
A shipping-surveillance floor where SQLite does all of the work, running in this page. Each ten-minute tick is a batch of UPDATE statements. Detectors are triggers on every incoming position report. Risk is a view, beneficial ownership is a recursive query, and the scenario itself is a table. The interface only draws query results. Every vessel, company and event here is fictional.
The IMO check digit, MMSI shape and allowed alert kinds are CHECK constraints. Bad data never gets in.
Every INSERT INTO ping runs gap, spoof, rendezvous and loitering checks in the same transaction.
Risk, darkness and exposure are views, so they are always current and every component is explainable.
A recursive CTE walks shell-company chains, multiplies stakes along each path and stops at cycles.
Scripted events are rows in scenario. The tick applies them with UPDATE … FROM.
A trigger aborts any attempt to edit a position report. Alert triage is written to an audit log by trigger.