Docs
Changelog
What's new and what's changed in NTHMAP.
v0.5.0 — Vessel scale, route planner, sanctions (current)
- 60k+ vessels in DB — live AISStream gate (~12% pass rate, drops fishing/tugs/small craft) plus bulk NOAA Marine Cadastre import (~21k unique MMSIs per day-file, dedup across multiple year-spread files)
- OFAC sanctioned vessels — daily fetch of US Treasury SDN list, 1,400+ vessels, 🚫 badge auto-mirrored onto live AIS matches via MMSI join
- Route Planner — pick origin + destination ports (or coordinates), checkbox-toggle 12 maritime gateways (Suez, Panama, Malacca, Drake, Magellan, Kiel, Oresund, Corinth, Messina, NE/NW Passage, Gibraltar). Default-on for everything except polar passages. Returns total nm, ECA distance %, gateway transits. Save / edit / delete planners; click a saved row to reload + redraw on the map.
- Polygon Flow A↔B — Bloomberg-style: draw two polygons, count vessels that traveled A→B and B→A in the lookback window. Per-type breakdown.
- Vessels & Fleet table redesign — All / My / Top tabs. All paginated 50/page across the full database. My flattens all your group memberships with a Group column. Top buckets by vessel-type, top 10 per category by DWT.
- Infrastructure tables modal — same pattern: All / Top by Category, paginated, with country + name/operator search. 56 categories with counts auto-populated in dropdown.
- Scheduled queries — save any NL/filter/CLI query and run on a cadence. Pro: daily. Enterprise: hourly or every 10 min. Pause/resume/delete from the sidebar.
- In-browser CLI playground —
>_topbar icon opens a terminal modal. Same commands as the Python CLI; ↑/↓ history, tab completion, abort with one click, fixed-width vessel tables. - AI dock controls —
−minimize,×close (re-open via topbar ✨ icon, now the first action). AI dock is wide and centered, not sidebar-bound. - Globe sync — globe respects every sidebar layer toggle (vessels, infra, events, chokepoints). Chokepoint colors muted so "Normal" doesn't drown the view in blue. Removed price overlay.
- Map place labels — switched to CARTO Voyager / dark_all tiles so cities, countries, and ports are labelled like Google Maps.
- Free-tier infra allowlist — only 5 headline categories (refineries, ports, LNG, tank farms, crude terminals) for unauthenticated/free users. Lock icon (🔒) on disallowed categories in the sidebar. Token-bucket rate limit on
/api/searchand/api/vessels/search. - AISStream throughput — flush converted to
execute_values(was per-row), batch size 100→500, unknown-MMSI grace 5→25. Roughly 5× faster per row, more vessels discovered. - Vessel track 7-day —
/api/vessels/<mmsi>/trackextended to 7d (cap 30d), right-panel renders dashed polyline + start/end markers + inline SVG speed sparkline. - Supply chain snapshots — pre-computed weekly for every infrastructure asset (363 snapshots), fast-path on the API, falls back to live geo scan if missing.
- Pricing from DB — marketing pages and docs read tier prices from
app_settingsviaget_tier_prices(); no hardcoded dollar amounts anywhere. - AIS timestamp parser — handles Go-format
"2026-04-12 22:03:28.445814576 +0000 UTC"so flushes stop crashing. - Admin Live AIS Ingestion panel — positions/5m, vessels/5m, total/relevant/excluded counts, top vessel types in last hour.
nthmap-aisservice in the systemd grid.
v0.4.0 — Public site, docs, CLI, MCP
- Public marketing site at
/with hero, features, pricing, use cases, dev strip, and CTA - Documentation site at
/docswith markdown rendering, sidebar nav, 8 core pages - 16 vertical market use case articles at
/use-caseswith filterable index - Python CLI — single-file install, API-key based, pipe-friendly JSON/CSV/YAML output
- MCP server — stdio JSON-RPC server exposing every dataset as a tool for Claude/ChatGPT/Cursor
- API keys — Bearer token auth alongside session cookies, create/list/revoke endpoints, bcrypt hashed,
key_prefixlookup
v0.3.0 — Admin, i18n, smart loading
- Internal admin panel at
/adminwith users CRUD, app settings editor, translation editor, dashboard stats - Multi-language —
lang_labeltable with top 10 languages (en, zh, hi, es, ar, bn, pt, ru, ja, de), frontend loader, RTL support, per-user preference - AI saved prompts — per-user CRUD, clickable list in sidebar, usage tracking
- Collapsible accordion layer groups — each layer section in the sidebar is now a
<details>accordion - Per-layer filters — vessel speed/load moved into Vessels group, event severity filter added to Events group
- Smart zoom-out vessel loading — backend caps vessel count by zoom level (200 → 5000) and orders by
est_cargo_mtso the biggest ships stay visible at world view - Mobile responsive — sidebar slides over the map under 900px, compact topbar under 600px
- Light theme fix — switched to CARTO
light_nolabelsbasemap for better marker contrast
v0.2.0 — Performance + UX polish
- gzip compression on all JSON/JS/CSS responses —
/api/vesselswent from 63 KB to 12 KB - Viewport-gated vessel/infra/events fetching — only loads what's in view, debounced on
moveend - Cache headers — 1-year immutable on
/static/vendor/*,no-cachewith ETag revalidation on other static - Modal system — Promise-based
ntmAlert/ntmConfirm/ntmPrompt/ntmToast/ntmCustomreplaces every native browser dialog - New auth modal — tabbed Sign in / Sign up with rich brand header and Pro feature breakdown
- Sidebar collapse with slide animation, keyboard hotkey Cmd/Ctrl-\
- Avatar dropdown menu with language picker, tier pill, admin link, Sign out
v0.1.0 — MVP
Initial Phase 1 build per PLAN.md:
- Database: PostgreSQL 16 + PostGIS, 9 tables, seeded with 150 vessels, 169 infrastructure assets, 15 events, 12 prices, 8 chokepoints
- Backend: Flask blueprints for auth, map data, user features, AI (OpenAI), billing (Stripe), draw analysis
- Frontend: Leaflet (no WebGL requirement) + vanilla ES modules
- Layers: vessels (rotated triangle icons), infrastructure (typed badges + pipeline polylines), events (pulsing markers + radius circles), chokepoints (zone rectangles + count badges)
- Draw tool: Leaflet.draw polygons/rectangles/circles → PostGIS
ST_Withinanalysis → regional breakdown - AI integration: OpenAI chat completions via stdlib urllib (no SDK dependency)
- Stripe billing: checkout, customer portal, webhook handler
- Vessel motion simulator — runs as systemd service, moves vessels along heading every 30 seconds for dev demo