Commit Graph

4 Commits

Author SHA1 Message Date
type-two
e4af0fb01d feat: Wave 7 — REAL live global shipping via aisstream.io
ais_bridge.py: a small daemon holding the aisstream.io websocket (free key,
server-side only), tracking every vessel heard (15-min freshness window) and
atomically writing ais_snapshot.json into the web root every 20 s. The
js/layers/ais.js layer polls that static file — no request-path server code,
identical under dev serve.py and prod nginx; rolling query bucket defeats CDN
caching. Verified locally: 15,844 live vessels within minutes of connect —
the Dover Strait separation lanes are visibly full of real traffic; click any
ship for name/MMSI/type/speed/course/status/destination (colored by type:
cargo green, tanker amber, passenger blue, fishing purple, anchored grey).
Live-only (hidden when scrubbed). Demo ships demoted to default-off; the
dormant browser-side AIS scaffold in ships.js stays inert (key would be
browser-exposed — the bridge supersedes it).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 11:29:00 +10:00
jing
1e5a241f05 gitignore API credentials (openskycredentials.json + secret patterns)
The OpenSky OAuth2 client credentials live in the repo dir as a JSON file;
gitignore them (and .env/*.secret/*credentials*.json) so they can never be
accidentally committed or shipped. They stay server-side only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 21:57:29 +10:00
jing
767884146d wave2 phase 4: historical record & replay (true time-travel)
Scrubbing off-live now REPLAYS actual recorded traffic instead of just hiding
aircraft (orbits were already computable in the past; live traffic was not).

- record.py (new, dev-only daemon): every 180s fetches through the local proxy
  (so the shared cache dedupes quota — never hits OpenSky directly), reduces to
  airborne essentials, zlib-compresses into SQLite data/history.db (WAL), keeps
  72h, prunes + checkpoints hourly. Wired into John's ~/.jobs heartbeat.
- serve.py: GET history/aircraft?t=<epoch_s> returns the nearest snapshot within
  ±10 min (read-only per-request sqlite connection — WAL means never locks the
  recorder), else a JSON 404.
- aircraft.js: onClockTick drives replay when not-live. Build loop factored into
  renderPlanes() shared by live + replay. Replayed aircraft show amber ("replay
  · <time> · N aircraft"); 404 → "no history for this time" + hide (this is the
  prod-without-recorder path too). Requests coalesce so a scrub landing mid-fetch
  still resolves to its final snapshot; debounced on requested-time distance.
- data/ gitignored (recorder db is local-only, never committed or deployed).

Verified: history endpoint hit/404/400; frontend replay across -1h/-2h/-3h maps
to distinct snapshots, 404 transitions, live-resume; recorder daemon writes
heartbeat + snapshots.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 16:30:17 +10:00
jing
0fec269512 Bootstrap: build spec for Opus 4.8, dev server with CORS proxy, preview config
SPEC.md is the complete execution plan: architecture, verified data-feed
CORS probes, per-layer component specs, verification protocol, and the
gated partly.party/godsigh deployment phase.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 11:50:09 +10:00