Studio Overview

suezcanal.xyz

Technology-first civic tech studio developing digital systems, interfaces, simulations and experimental tools. The network operates as a modular set of platforms, each with independent runtime and public-facing surfaces, connected by shared infrastructure and a common forensic layer.

This documentation hub starts with a general studio overview, then lists all registered systems, then opens each project with its complete technical materials stacked in order.

Projects

SeaCommons

Operational product stack: distress ingestion, drift computation, weather context, anomaly correlation, vessel intelligence, forensic export and simulation replay. The deepest technical branch in the documentation.

Docs Open

SeaCommons — Introduction

Open Platform

What is SeaCommons?

SeaCommons is an open-source platform for maritime Search and Rescue (SAR) coordination and threat awareness. It receives distress signals from any channel, calculates where a vessel or person will drift in the next 6 to 48 hours, and produces evidence-grade documentation for every event.

In practice: an operator receives a distress call via SMS, WhatsApp or Telegram. SeaCommons extracts the position, calculates drift trajectories using ocean current and wind models, identifies the probable search area at 6, 12 and 24 hours, and cryptographically signs the entire event record. The operator sees a map with drift cones and can export the forensic packet for legal or humanitarian use.

SeaCommons is designed for deployment at three scales: as a browser-based dashboard used from any laptop, as a server running aboard a vessel with physical sensors, or as an autonomous edge node with satellite connectivity deployed in a remote maritime zone. All three modes share the same backend and the same forensic record format.

The platform is licensed AGPL-3.0. All formats are open: GeoJSON trajectories, JSON forensic packets, standard REST and WebSocket APIs. No vendor lock-in, no proprietary data formats.

SeaCommons — PELAGO

Platform Overview

SeaCommons connects distress ingestion, Lagrangian drift modelling, multi-sensor anomaly correlation, vessel intelligence and cryptographically-signed forensic documentation into one operational stack. Built on FastAPI, OpenDrift, Copernicus Marine (CMEMS) and a React dashboard.

When a distress alert arrives — via SMS, Telegram, WhatsApp or direct API call — the platform runs a Lagrangian drift simulation using OpenDrift (128 particles, 15-minute timestep, Leeway model for ocean SAR). Ocean currents come from CMEMS (0.083° global physics analysis, cached locally at 2h TTL per 0.1° grid cell). Wind forcing comes from Open-Meteo (live current conditions). The simulation runs as an isolated subprocess and returns GeoJSON: a trajectory LineString, three time-cone Polygons (6h / 12h / 24h) and an impact point.

Every alert generates a ForensicPacket signed with Ed25519 and hashed with BLAKE3. The packet is stored append-only and can be broadcast to external witness endpoints. The format is designed for submission to international legal bodies including the ICJ.

The backend spans 9 functional domains in core/: api, drift, forensic, anomaly, probability, sensors, integrations, vessels, ingestion. It exposes 40+ REST endpoints and 3 WebSocket streams. The React dashboard (seacommons/src/main.jsx) runs MapLibre GL with live drift overlays, Windy weather layer, Demo and Live SAR modes.

System Status

Backend API

FastAPI + async SQLAlchemy. 9 routers, 40+ endpoints, 4 database tables. Entry: core/api/main.py. Docker Compose production-ready.

Drift Engine

OpenDrift subprocess (Python 3.12) + Gaussian analytical fallback. Four domains: ocean_sar, oil_spill, atmospheric, ballistic. 128 particles, 15-min timestep.

Ocean Forcing

CMEMS live currents (0.083° global physics). Local disk cache per 0.1° grid cell, 2h TTL. Open-Meteo live wind, no API key required. Fallback to mock values.

Forensic Layer

Ed25519 signing, BLAKE3 hashing. Append-only log. Witness broadcast to external endpoints. Verify endpoint returns hash and signature status.

Dashboard COP

React 18 + Vite + MapLibre GL. Full-screen map, left sidebar, case log. Demo tab: click map → form → simulate. Live SAR mode with WebSocket polling. Windy weather layer synced to map viewport.

Distress Ingestion

Twilio SMS, Twilio WhatsApp, Telegram Bot, generic webhook. Free-text coordinate extraction with confidence scoring. Signals stored and promotable to probability engine.

Vessel Intelligence

AISStream.io WebSocket (global, Class A+B). MMSI registry with state aggregation. Anomaly detection: dark periods, transponder gaps, spoofing flags. GeoJSON export at /api/v1/integrations/vessels/geojson.

Sensor Fusion

8 sensor weights: infrasound 0.28, seismic 0.22, hydrophone 0.12, ADS-B 0.10, AIS 0.08, TID 0.08, GNSS 0.07, traffic 0.05. 120s correlation window. Alert ≥0.55, urgent ≥0.80.

SAR Probability

Survival probability engine (water temp, wind, wave height, persons, vessel condition). Interception time calculator. Priority ranking: IMMEDIATE / URGENT / ROUTINE.

Edge Hardware

Raspberry Pi 5 8GB + NVMe. 9 sensor drivers with mock fallback. BOM defined ~$700–800. Iridium 9603N satellite sync. edge/firmware/firstboot.sh bootstrap.

Chokepoint Monitor

Vessel counts at Suez, Hormuz and other strategic zones via /api/v1/chokepoints. Monitor module present, live feed depends on AISStream key.

TimeZero Bridge

HTTP push to TimeZero Professional chart plotter. Sends datum mark, trajectory route and three cone zones. KML fallback if TZ unreachable. Opt-in via TIMEZERO_ENABLED=true.

Architecture — Three Deployment Layers

Watch

Common Operational Picture

live

The browser-based Command and Control dashboard. Stack: React 18, Vite, MapLibre GL, Windy embed. Full-screen map with floating left sidebar (closeable) and bottom-right case log. Modes: LIVE (WebSocket to backend) and DEMO (click map to simulate).

Demo tab: operator clicks a position on the map, fills vessel type, risk level and persons count, then runs the drift simulation. Live SAR tab: status updates stream over /ws/events, case status updates and forensic chain trigger. Windy weather layer follows map zoom and pan. Docker runtime exposes port 3000, while local Vite development runs on 5173.

Planned: scenario replay player (Nord Stream 2022, Gaza Flotilla 2025 at 10× real-time), Gemini AI summary of anomaly correlation output.

Edge

Autonomous Deployed Node

hardware ready

Raspberry Pi 5 8GB + NVMe SSD + UPS HAT. Sensor kit: RTL-SDR V4 (AIS/ADS-B/RF), Airspy HF+, SM-24 geophone, Raspberry Boom (infrasound 0.1–20 Hz), u-blox ZED-F9P GNSS (RTK + spoofing detection), SIM7600G LTE, Iridium 9603N satcom. Full BOM ~$700–800.

Nine sensor drivers run as background threads emitting to Redis pub/sub channels. The correlation engine subscribes and weights events in a 120-second sliding window. All drivers accept MOCK=true for lab testing. Offline cache pre-downloads wind data (48h TTL) and ACLED conflict events. Deploy: bash edge/firmware/firstboot.sh then docker compose -f edge/docker-compose.ship.yml up -d.

Connect

Data Exchange Layer

live

Multi-channel distress ingestion: WhatsApp and SMS via Twilio webhooks, Telegram Bot API, generic JSON webhook. Free-text coordinate and context extraction (persons, vessel type, medical emergency, children) with confidence scoring and human-review flagging.

NMEA bridge (connect/nmea_bridge.py): serial NMEA 0183 → TCP:10110. AIS via AISStream.io WebSocket subscription (configurable bounding box, Class A+B). Vessel state aggregated per MMSI in core/integrations/state.py. Anomaly detection flags dark periods, transponder gaps and spoofing indicators in real time.

Runtime Reference

SeaCommons / Runtime

Services, Domains & Configuration

Active

Services

  • Backend: FastAPI + Uvicorn, Python 3.11+, entry core/api/main.py
  • Database: PostgreSQL 15 + PostGIS 3.3 via SQLAlchemy 2.0 asyncio + Alembic migrations. Fallback to SQLite for local dev.
  • Cache / Pub-sub: Redis 7 — sensor event bus, vessel position cache, probability grid
  • Drift subprocess: OpenDrift 1.14.9 (Python 3.12 via OPENDRIFT_PYTHON env var) + Gaussian analytical fallback
  • Ocean data: CMEMS via copernicusmarine library + disk cache (~/.suezcanal/cache/). Open-Meteo for wind (no key required).
  • Dashboard: React 18 + Vite 6. Dev port 5173, Docker port 3000.

API Domains — 9 modules

  • alerts — distress creation, result retrieval and live status stream on /ws/events
  • drift — trajectory computation (background task) + GeoJSON export
  • anomaly — multi-sensor event query + WebSocket /api/v1/anomalies/live
  • forensic — signed packet retrieval, verification, CSV/JSON export
  • integrations — multi-protocol parse, chokepoint stats, vessel GeoJSON
  • vessels — AIS registry stats and incremental updates
  • ingest — Twilio SMS/WhatsApp + Telegram + generic webhook receivers
  • probability — survival scoring, interception time, active signal priority queue
  • weather — CMEMS / Open-Meteo point and grid endpoints

Database Schema — 4 tables

  • alert_events — distress signals with lat/lon/status
  • drift_results — GeoJSON trajectories, 6/12/24h cones, metadata
  • forensic_events — append-only signed packets (Ed25519 + BLAKE3)
  • anomaly_events — per-sensor detections with confidence, type, position

Drift Simulation Pipeline

Alert received → _process_drift() as FastAPI background task → DriftEngine.compute() → fetch wind from Open-Meteo (live, current position) + currents from CMEMS (cached) → build JSON payload → subprocess.run(opendrift_runner.py, timeout=180s) → parse GeoJSON result → store in DB → WebSocket broadcast → optional TimeZero push + forensic sign.

Sensor Correlation Weights

Infrasound 0.28 · Seismic 0.22 · Hydrophone 0.12 · ADS-B 0.10 · AIS anomaly 0.08 · Ionospheric TID 0.08 · GNSS spoofing 0.07 · Traffic 0.05. 120-second sliding window. Alert threshold: 0.55. Urgent escalation: 0.80.

Key Configuration Variables

Defined in core/config.py as Pydantic Settings. Key vars: DATABASE_URL, REDIS_URL, WITNESS_ENDPOINTS, SUEZCANAL_SIGNING_KEY, CMEMS_USERNAME/CMEMS_PASSWORD, AISSTREAM_KEY, OPENDRIFT_PYTHON, per-sensor enable flags (INFRASOUND_ENABLED, SEISMIC_ENABLED, GNSS_ENABLED…), MOCK=true for development without hardware or live APIs, TIMEZERO_ENABLED/TIMEZERO_HOST/TIMEZERO_PORT.

Getting Started

SeaCommons

Installation and Run Modes

Mode 1 — Docker Compose (Recommended)

Full stack: backend, dashboard, PostgreSQL+PostGIS, Redis in one compose. Requires Docker Desktop.

git clone https://github.com/suezcanalxyz/seacommons.git
cd seacommons
cp .env.example .env   # set CMEMS_USERNAME, CMEMS_PASSWORD, AISSTREAM_KEY
docker compose up -d

API → localhost:8000 · Dashboard → localhost:3000 · Swagger → localhost:8000/docs

Mode 2 — MOCK Mode (No credentials needed)

Set MOCK=true in .env. Sensor drivers return synthetic data, OpenDrift falls back to the Gaussian model, no CMEMS or AISSTREAM keys required. Fastest way to evaluate the platform.

Mode 3 — Local Dev (Backend + Dashboard)

pip install -e '.[dev]'
cd seacommons && npm install && npm run dev   # dashboard → :5173
uvicorn core.api.main:app --reload      # API → :8000

Mode 4 — Real OpenDrift (Split Python Env)

OpenDrift requires Python 3.12 with specific netCDF4 dependencies, separate from the API env.

OPENDRIFT_PYTHON=/path/to/opendrift-env/bin/python
OPENDRIFT_PARTICLES=128
OPENDRIFT_TIMESTEP_SECONDS=900

Mode 5 — Ship Edge Deployment

bash edge/firmware/firstboot.sh
docker compose -f edge/docker-compose.ship.yml up -d

SeaCommons

Core Operations

Submit a Distress Alert

curl -X POST http://localhost:8000/api/v1/alert \
  -H "Content-Type: application/json" \
  -d '{
    "lat": 35.376,
    "lon": 14.429,
    "persons": 45,
    "vessel_type": "rubber_boat",
    "domain": "ocean_sar"
  }'

Returns {"event_id": "...", "status": "processing"}. Poll /api/v1/alert/{event_id} or connect to /ws/events.

Retrieve Drift Result

curl http://localhost:8000/api/v1/alert/{event_id}/geojson

Returns FeatureCollection: trajectory LineString + 6h/12h/24h cone Polygons + impact Point. All WGS-84.

Verify Forensic Packet

curl http://localhost:8000/api/v1/forensic/{event_id}/verify

Query Active Vessels

curl http://localhost:8000/api/v1/integrations/vessels/geojson
curl "http://localhost:8000/api/v1/anomalies?since_minutes=60&type=all"

Reading Order for Technical Materials

ARCHITECTURE.mdSCENARIOS.mdFORENSIC_FORMAT.mdVESSEL_INTEGRATION_PLAN.mdSIMULATION_DEMO_PLAN.mdBOM.md

API Reference

SeaCommons / Connect

REST + WebSocket Endpoints

Swagger UI
EndpointMethodPurpose
/api/v1/alertPOSTSubmit distress signal → triggers drift + forensic chain
/api/v1/alert/{id}GETAlert status and metadata
/api/v1/alert/{id}/geojsonGETDrift result as GeoJSON FeatureCollection
/ws/eventsWebSocketLive alert status updates
/api/v1/driftPOSTCompute drift trajectory (any domain, no alert)
/api/v1/drift/{id}/geojsonGETTrajectory + search cones as GeoJSON
/api/v1/anomaliesGETQuery anomalies (since_minutes, type, lat/lon/radius)
/api/v1/anomalies/liveWebSocketLive multi-sensor correlation stream
/api/v1/forensic/{id}GETRetrieve signed forensic packet (full)
/api/v1/forensic/{id}/verifyGETVerify Ed25519 signature + BLAKE3 hash integrity
/api/v1/forensic/exportGETExport forensic log (JSON or CSV, date filter)
/api/v1/integrations/vessels/geojsonGETAll known vessel positions as GeoJSON
/api/v1/chokepointsGETVessel counts at strategic chokepoints
/api/v1/probability/activeGETPriority-ranked active SAR signals
/api/v1/probability/survivalPOSTCompute survival probability for given conditions
/api/v1/weatherGETWind, wave and ocean conditions at position
/api/v1/ingest/twilio/smsPOSTTwilio SMS webhook receiver
/api/v1/ingest/twilio/whatsappPOSTTwilio WhatsApp webhook receiver
/api/v1/ingest/telegramPOSTTelegram Bot API webhook receiver
/api/v1/ops/summaryGETSystem health: services, vessel stats, open alerts
/healthGETService health check

Technical Materials

Drift Methodology

Ethics & Governance

Geopolitical Notes

Full API Reference

Republic

Research and narrative environment: experimental projects, visual interfaces, field deployment research and public publishing contexts connected to the wider system.

Open

Republic

active

Republic

Research Layer Overview

Open Republic

Republic is the public-facing research and narrative environment connected to the wider system. It contains project pages, essays, simulation-linked visual surfaces and experimental publishing contexts. Run locally via python -m http.server 8080 from the republic folder.

Technical documentation for Republic remains intentionally partial until the project surfaces reach the same operational depth as SeaCommons. Both the Currents Pipeline and Drifter Risk Map are documented below.

Currents Pipeline

Republic / Tools

Copernicus Marine → Web Pipeline

Downloads surface currents (uo, vo) for the Malta–Lampedusa corridor from Copernicus Marine Service and converts them to lightweight JSON/gzip files for browser consumption by the drifter simulator.

Prerequisites

Python 3.10+, Copernicus Marine credentials (copernicusmarine login or env vars COPERNICUSMARINE_SERVICE_USERNAME / COPERNICUSMARINE_SERVICE_PASSWORD).

python -m pip install -r currents-pipeline/requirements.txt

Download

python currents-pipeline/download_copernicus_subset.py

Convert to web files

python currents-pipeline/convert_netcdf_to_web.py \
  --input currents-pipeline/data/raw.nc \
  --out-dir public/currents --stride 2 --gzip

One-shot (PowerShell)

powershell -ExecutionPolicy Bypass -File currents-pipeline/run_pipeline.ps1

Output: public/currents/index.json + per-timestep t_<ISO>.json.gz. Each file contains bbox, shape, float32-base64 encoded u/v fields. Browser simulation falls back to synthetic currents if download fails.

Drifter Risk-Technology Map

Republic / Tools

Deployment Scenario Mapping Tool

Single-page tool for mapping drifter deployment scenarios across geographic coordinates and strategic cartesian axes (technologyScore × riskScore). No build step required.

Features

  • Add/edit scenario form with Leaflet map and scatter chart (0–5 scale)
  • Editable, sortable, searchable scenario table with filters
  • Derived analytics: strategicTensionIndex = technologyScore × riskScore
  • Quadrant logic: A (high tech / high risk), B (low tech / high risk), C (low tech / low risk), D (high tech / low risk)
  • Export filtered dataset as JSON or CSV

Run Locally

cd republic/drifter-risk-technology-map
python -m http.server 8080

Starter dataset includes 5 predefined Mediterranean SAR scenarios. External libs via CDN: Leaflet, Chart.js.