Documentation index · updated 29 August 2026

SeaCommons Works Research Republic Map

Documentation hub

Project docs, technical notes and research in one readable index.

This page groups the active systems, the works archive and the research notes so the archive can be read by query, not only by scrolling. Each section points to a real page, a real file or a current surface.

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 is now an independent platform, live at seacommons.org. This documentation will migrate to live there directly; until then it stays here, kept in sync with the current API, drift and dashboard iteration.

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

Observe

Signals and environmental forcing

Distress messages, AIS vessel states and field sensors enter one correlation path. CMEMS currents and Open-Meteo wind supply the environmental forcing; mock inputs keep the same interfaces available for lab tests.

Compute

Drift, interception and priority

FastAPI coordinates OpenDrift and the analytical fallback, then returns trajectories, time cones and an impact point. Survival conditions, interception time and case priority remain separate outputs for operator review.

Record and deploy

Operational picture and evidence chain

The MapLibre dashboard exposes the case state while the forensic layer signs an append-only record. Vessel feeds, TimeZero export and the Raspberry Pi edge stack extend the same case structure across browser, bridge and remote node.

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 for historical and live case studies, plus an 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

The correlation model keeps infrasound and seismic input at the top of the stack, follows with hydrophone, ADS-B and AIS anomaly signals, and keeps TID, GNSS spoofing and traffic lower in the ranking. Thresholds stay split between alert and urgent states for review.

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

Note: the dev server stays running in the terminal by design. Once the page is visible, leave that process open and stop it manually with Ctrl+C only when you are done.

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 Public Documentation

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

Public Documentation

Drift Methodology

Ethics & Governance

Geopolitical Notes

Full API Reference

Works

Technical systems for Embassy, Treasury, Liability, Drifter and Consulate: physical components, runtime boundaries, data flow and public source where available.

Projects Open

Embassy

Liability

Drifter

Consulate

Research

A workbench for methods, writing, and references that are still being shaped into the public documentation.

Notes Open

Research Overview

Republic Map

Counter-cartography, fictional sovereignty and the construction of geopolitical space.

Map Open

Republic Map