Commit graph

42 commits

Author SHA1 Message Date
Sirius DevOps
2ec210aaa4 feat(map): Conflicts layer toggle from /api/conflicts
Default-off LAYERS row paints L.circleMarker theatres colored by
severity (war/high/elevated). Popup shows label, description, and
eventCount. Catalog is fetched once (not on moveend). A 404 hides
the toggle. Null lat/lon rows are skipped so they never pin at 0,0.
2026-08-31 21:37:10 -04:00
Sirius DevOps
c48788d4b6
fix(map): geofence delete, vessel snapshots, sentinel cache, news briefs
Geofences could be drawn but not removed. VesselAPI Hormuz dots vanished
on restart and DVR skipped between the 5 daily polls. Sentinel-1 re-hit
STAC on every pan and often painted a neighbouring swath. Executive
briefs truncated; ticker stayed empty unless something was critical.

- Layer-panel list + polygon popup DELETE /api/geofences/{id}
- Persist VesselAPI polls to vessels (UTC-day purge, DVR as-of, boot hydrate)
- Cache Sentinel-1 by 2° cell; pick covering scene; clip Leaflet tiles
- Retry truncated LLM JSON; ticker falls back to medium/low; 3-min HUD poll
2026-08-29 20:40:27 -04:00
Sirius DevOps
ac03442998 feat(map): chokepoint preset buttons on the Leaflet toolbar
Fetch GET /api/map/chokepoints once. Desktop buttons / phone <select>
fly to Hormuz, Bab el-Mandeb, Suez, Malacca, Taiwan. Turns Vessels on,
uses ?src=vesselapi on Hormuz, enables Sentinel-1 there, and never
POSTs /api/vessels/subscribe outside CONUS.
2026-08-29 14:12:02 -04:00
Sirius DevOps
fa06c1dc42 feat(map): Sentinel-1 SAR layer toggle (Leaflet)
Add a default-off Layers row that fetches GET /api/map/sentinel1?bbox=
only when enabled, then L.tileLayer(tileUrl) at opacity 0.8. HUD hints
for 404/429/502; moveend refetch while on. Same-origin tileUrl as-is.
2026-08-29 11:15:34 -04:00
Sirius DevOps
82ef815e20 fix(ui): stop map chrome overlapping on phone
Retune the 820px layout so GIBS sits as a full-width bar under the
header, LAYERS starts collapsed top-left, zoom stays top-right, and
the DVR row clears the ticker. Hide attribution and map-hint on phone
so NASA/RainViewer text no longer paints through MKT/NEWS.
2026-08-29 10:30:46 -04:00
Sirius DevOps
773d204f68 fix(ui): keep last Keys card above ticker on mobile
Stage uses 100dvh (100vh fallback) plus safe-area so the scrollport
ends above the dock. Subviews get extra bottom padding; phone key
forms wrap with 44px tap targets.
2026-08-29 09:47:27 -04:00
Sirius DevOps
a8ad9ba1ff fix(vessels): both AIS providers are first-class, not fallback
Layer-panel note and .env.example now match the two-key model:
AISStream (US live) and VesselAPI (Hormuz) run independently.
2026-08-29 00:58:57 -04:00
Sirius DevOps
20a266563c fix(aircraft): show planespotters photo in overlay popup
Planespotters 403s server clients whose User-Agent has no contact
email; compose default UA lacked one. Leaflet popup.update() also
re-ran the bindPopup factory and wiped the thumbnail after load.

- Send a contact UA on planespotters lookups; align compose default.
- Resize the popup without re-rendering content.
- Keep hex/src on live firefighter upserts so they get a photo too.
2026-08-28 23:28:28 -04:00
Sirius DevOps
665aaec22f feat(aircraft): planespotters.net photo in aircraft popup
Add planespotters.net latest-photo lookup for ADS-B aircraft.

- app/live_layers.py: fetch_planespotters_photo() (hex preferred, reg
  fallback) + _normalize_planespotter_photo(); 24h TTL cache (their ToS cap).
- app/main.py: GET /api/aircraft/photo?hex=...|reg=... (422/404/502).
- app/static/index.html: .ps-photo block in ADS-B popup; lazy load on
  popupopen; thumbnail links to photo page + photographer credit.

Server-side proxy, not browser fetch(): planespotters 403s any request
carrying an Origin header (every browser fetch() sends one). The thumbnail
binary is loaded by the browser straight from their CDN, never re-hosted.

Tests: 4 unit + 4 API contract (38 pass in the two files).
2026-08-28 22:58:04 -04:00
Sirius DevOps
49ee5fe7a3 feat: 23:00 daily news recap; prompts drop futures
Summarizer still runs the 15-min analyst, plus a 24h breaking-news recap
at 23:00 America/New_York. HUD pins kind=daily_recap. Prompts ignore
futures/market tape.
2026-08-28 22:53:31 -04:00
Sirius DevOps
d81ea68dec fix: pipeline reliability — WS, summarizer, ingest, health
Stop the live HUD reconnect storm (nginx WS snippet + backoff), copy
intel/nous_client into the summarizer image, and make event ingest
idempotent on URL. GDELT uses the DOC API; NWS no longer sends bbox;
FIRMS is one ON CONFLICT batch; GET /api/aircraft serves last-known.
Health reports freshness without 503ing docker. EONET + CISA KEV added.
2026-08-28 21:49:05 -04:00
c6bfc50705 Merge pull request 'feat: classify aircraft/vessels as military vs civilian in popups' (#12) from feat/ac-vessel-intel into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 4m11s
2026-08-28 20:58:51 -04:00
Sirius DevOps
ca15885e7f feat: classify aircraft/vessels as military vs civilian in popups
Aircraft: readsb dbFlags bit0, then ICAO combat types / US-DoD hex /
callsign. Popup shows type, operator, alt, vs, squawk, emitter class.
Vessels: ITU ship type 35 = military, 50/51/55 = government; cargo/
tanker/passenger/etc otherwise. Popup shows kind, flag, dest, nav,
IMO, size. Magenta glyphs = military, gold = law/gov.
2026-08-28 21:00:20 -04:00
Sirius DevOps
8643153954 feat: continuous news scrape + 15-min analyst, expand urls.txt
Scraper loops with NEWS_SCRAPE_INTERVAL_S (default 10s after each
crawl). Summarizer runs every NEWS_SUMMARIZE_INTERVAL_S (default 900)
over the last 15 minutes of articles. Feed list replaced from the
k8s scrapy-urls configmap (334 sources).
2026-08-28 20:53:32 -04:00
Sirius DevOps
700f56ef51 fix: hydrate camera popup from GET /api/cameras/{id}
List payload is slim (no URLs). YouTube thumbs need source_url from the
detail endpoint, so the popup fetches the full row before rendering.
2026-08-28 20:04:53 -04:00
Sirius DevOps
496d13b8b0 feat: critical news pins on the osint map 2026-08-28 17:06:55 -04:00
Sirius DevOps
3b4dd49253 feat: news ticker shows flagged hourly items 2026-08-28 17:06:55 -04:00
Sirius DevOps
610666ef6a feat: settings model selector for news summarizer 2026-08-28 17:06:55 -04:00
Sirius DevOps
f50268ef81 feat: register NOUS_API_KEY in dashboard keystore 2026-08-28 17:06:55 -04:00
Sirius DevOps
5ea9a4e879 feat: lean-Pi WS fan-out, geofences, DVR playback, fire/aircraft correlation
Phase 1: in-memory ConnectionManager viewport fan-out, 500ms map debounce,
cachetools TTLCache, background masscan/ffmpeg, compose memory caps.

Phase 2: PostGIS geofences + ST_Intersects alerts, Timescale 1-min CAGGs
and timestamp playback, FIRMS/WFIGS x firefighting ADS-B within 20 miles.

No Redis/Kafka/Celery.
2026-08-28 09:35:18 -04:00
Sirius DevOps
32320635dc feat: AIS stream follows the map viewport
All checks were successful
build-and-deploy / build (push) Successful in 2m32s
The Vessels layer now retunes the server-side AISStream subscription to the
client viewport instead of a static AISSTREAM_BBOX. The frontend POSTs its
quantized viewport box to /api/vessels/subscribe on moveend; the ais_stream
worker coalesces and applies it at the service's 1 subscription/s cap, then
last-known positions for the new area arrive within a couple of seconds (the
frontend does one follow-up fetch after retuning). Bounds the in-memory
vessel store across regions. Key stays server-side.
2026-08-27 21:50:38 -04:00
Sirius DevOps
0a7a9236d6 fix: restore news ticker on the map HUD
Boot deferred news to the News view for overlay speed. Bring the footer
ticker back after map init starts; article bodies stay off the wire.
2026-08-27 21:47:22 -04:00
Sirius DevOps
734c310d2c perf: abort stale overlay fetches, skip same-cell rebuilds, update markers in place
moveend aborts in-flight overlay JSON and skips work when the 0.01° cell
is unchanged. Live aircraft/trains/vessels diff-update by id. Camera popup
HTML is built on open. Alert/perimeter polygons paint on canvas.
2026-08-27 21:23:25 -04:00
Sirius DevOps
8f89994201 perf: slim fires/cameras/events/news map payloads
Heatmap uses {lat,lon,i,c}. Camera list drops URLs (detail via GET
/api/cameras/{id}). Event blips skip body. News omits content unless
include_content=true.
2026-08-27 21:19:42 -04:00
Sirius DevOps
07638288a9 perf: faster map boot — zoom-gate heavy layers, static basemap, defer HUD, lazy HLS
World view no longer fetches cameras/NWS/WFIGS. Default Blue Marble so init
does not wait on GIBS times. News/summary/events load with their views.
hls.min.js loads only on the first HLS camera popup.
2026-08-27 21:12:58 -04:00
Sirius DevOps
ce5207e060 feat: distinct heading-aware marker symbols for live feeds (aircraft/trains/vessels)
Replace the shared colored-dot renderPoints for live feeds with per-feed SVG
glyphs on heading-aware divIcons:
- Aircraft: plane silhouette rotated by heading, color-coded by alt
- Trains: railcar glyph (respecting per-train iconColor), rotated when heading present
- Vessels: sailboat glyph rotated by heading, color by speed (teal/gray)

Icons are cached per (feed, color, heading) so thousands of markers reuse a
bounded set of L.divIcon instances. Rotation is applied to the inner glyph
span only (never the marker container), keeping clustering, spiderfy, and
iconAnchor intact. Missing/NaN heading falls back to an upright glyph.
Color values are sanitized against style-attribute breakout.
2026-08-27 20:50:35 -04:00
Sirius DevOps
f779b1f225 feat: toggleable live map feeds (ADS-B, trains, AIS, radar, WFIGS, NWS)
Wire the free data streams from docs/free-data-streams.md into the
dashboard as layer-panel toggles. Third-party APIs are proxied/cached
in FastAPI; raster tiles (IEM, RainViewer, GIBS) stay in the browser.

- Aircraft via ADSB.lol viewport poll (bbox required, radius ≤ 150 nm)
- Amtraker trains, NHC storms, WFIGS incidents/perimeters
- NWS + IEM SBW as /api/weather-alerts (does not collide with /api/alerts)
- AISStream worker is server-side only and idles without AISSTREAM_API_KEY
- Caltrans CWWP2 D1–D12 camera parser; FIRMS dual-write NOAA-20/21
2026-08-27 19:08:30 -04:00
Sirius DevOps
2a433a41e9 map: port master popup-guard fix — real popup state via events, close on zoom/drag
Master's b2369bc fixed cameras vanishing after opening a popup and zooming:
Leaflet 1.9.4's Map.closePopup() never nulls map._popup, so the old
'if (map._popup) return' guard skipped every overlay reload forever after
the first popup. Port the fix into the redesigned frontend: track popup
state via popupopen/popupclose, close on user zoom/drag so moveend reloads
always run, and keep the autopan skip for the popup's own pan.
2026-08-27 17:48:39 -04:00
Sirius DevOps
51e906c41f Merge remote-tracking branch 'forgejo/master' into frontend-overhaul
# Conflicts:
#	app/static/index.html
2026-08-27 17:33:12 -04:00
Sirius DevOps
12f01a17a9 frontend: Ghost-in-the-Shell overhaul — map-first landing, HUD chrome, event blips, tickers
- Map is now the landing view: full-viewport NASA GIBS globe, existing
  fires/cameras/HLS map machinery preserved verbatim
- New 'Event Blips' layer: geolocated ingest events, color-coded by source,
  bbox/since/has_coords filters added to GET /api/events
- Weather / Flights(ADS-B) / Vessels(AIS) layer slots reserved (feed pending)
- Market ticker strip with configurable symbols — auto-promotes to LIVE when
  GET /api/market returns {symbols:[...]} (contract documented in Settings)
- Breaking-news ticker: LLM exec-summary flash + headline marquee, 15-min cycle
- Dropdown nav (Map/News/Events/Alerts/Entities/Ingest/API Keys/Settings),
  Settings view (localStorage: symbols, map layer defaults), System panel
- Section-9 theme: near-black navy, cyan/magenta accents, Orbitron/Rajdhani/
  Share Tech Mono, chamfered HUD panels, scanlines, boot splash, UTC clock
- Fix: events.camera enum value missing from models.py/schemas.py caused 500s
  on every events query once camera events flowed in (migration 004 added it
  to the DB enum only)
2026-08-27 17:22:14 -04:00
Sirius DevOps
5cea0a5940 map: cluster camera markers so cameras stay visible when zoomed in
All checks were successful
build-and-deploy / build (push) Successful in 4m33s
Zooming in replaced the marker group with a bbox subset, so dense world
views (5k dots) thinned to a handful of pins — or zero on a wrapped world
copy, where currentBBox collapsed to a sliver and the API returned ~nothing.
Cameras only seemed to exist when zoomed out.

- vendor leaflet.markercluster 1.5.3; camera markers now render as numbered
  neon-green clusters at low zoom and split into individual dots as you zoom,
  so camera coverage is visible at every zoom level (spiderfy at max zoom)
- guard against null lat/lon rows (no phantom markers at 0,0)
- stale-response guard for loadCams/loadFires: rapid wheel zoom can resolve
  fetches out of order and a stale bbox response blanked the map
- serve index.html with Cache-Control: no-cache so the browser never keeps
  serving a pre-deploy copy after fixes land
2026-08-27 17:00:09 -04:00
Sirius DevOps
6f0fc8dbe3 cameras: unwrap Leaflet world copies so California bbox hits ALERTWest
All checks were successful
build-and-deploy / build (push) Successful in 2m54s
Viewing CA on a wrapped map copy clamped both edges to 180, so the API
returned the newest 2000 feeds (mostly VDOT HLS in Virginia) and the CA
viewport was empty. Normalize longitudes into [-180,180] and load 5000.
2026-08-27 16:03:50 -04:00
Sirius DevOps
1145ce8ec1 cameras: fix world-zoom bbox collapsing to ~48 pins
All checks were successful
build-and-deploy / build (push) Successful in 2m23s
Leaflet worldCopyJump at zoom 2 reports longitudes outside ±180; clamping
them independently produced west>=east or a thin sliver. Low zoom now
queries the full world, and the API ignores inverted bboxes.
2026-08-27 15:59:22 -04:00
Sirius DevOps
0c7f80655e cameras: Live-Environment-Streams + HLS.js player
All checks were successful
build-and-deploy / build (push) Successful in 3m8s
Ingest ~4.2k direct HLS/YouTube feeds (VDOT, MDSHA, DelDOT, Iowa DOT,
OpenCCTV, etc.) from the public GeoJSON catalog. Popup plays HLS via a
CORS-safe playlist proxy + vendored hls.js, YouTube via embed, with
ffmpeg-MJPEG fallback. ALERTWest rows now use a stable camera id so
hourly scrapes do not duplicate.
2026-08-27 15:54:54 -04:00
Sirius DevOps
f3c35c2230 cameras: ingest ALERTCalifornia/ALERTWest official public JPEGs
All checks were successful
build-and-deploy / build (push) Successful in 3m36s
Adds the documented getCameraDataByLoc API (~10k public wildfire, DOT,
and FAA stills with lat/lon). Masscan will not produce viewable feeds;
this will. Map bbox fetch raised to 2000 markers.
2026-08-27 15:46:49 -04:00
Sirius DevOps
12262d1562 cameras: RTSP preview via ffmpeg, stop opening VLC, drop masscan to 200pps
All checks were successful
build-and-deploy / build (push) Successful in 2m23s
Masscan finds are rtsp:// with no snapshot_url, so the popup skipped the
<img> and the leftover source link handed the OS an rtsp:// URL (VLC).

- Popup always hits /api/cameras/{id}/snapshot (HTTP stills, then one
  ffmpeg frame grab). No credentials. 10s hard timeout.
- rtsp:// is rendered as text, never as an href.
- ffmpeg added to the app image for the RTSP still/MJPEG path.
- Default MASSCAN_RATE 200 (1k/10k saturated the home uplink).
2026-08-24 23:36:34 -04:00
Sirius DevOps
250dbbb5df Camera popups: live MJPEG preview via /api/cameras/{id}/stream passthrough, snapshot fallback, taller thumb
All checks were successful
build-and-deploy / build (push) Successful in 1m52s
2026-08-24 21:38:46 -04:00
Sirius DevOps
acbf5cc56d Add news feed panel to dashboard: exec summary pinned + scrolling headlines + 15min auto-refresh
Some checks failed
build-and-deploy / build (push) Has been cancelled
- New News tab consuming GET /api/news (headlines: source domain badge,
  relative timestamp, link-out target=_blank) and GET /api/news/summaries
  (latest executive summary pinned in a glowing briefing card).
- Four states handled: loading, empty (summarizer idle w/o GEMINI key),
  error, success; HTML-escaped titles/domains (newsEsc).
- Lightweight markdown renderer for summary bodies (bold/headers/lists).
- Auto-refresh every 15min (NEWS_REFRESH_MS) + lazy load on tab open + manual
  refresh button.
- Stretch hook: if articles ever carry lat/lon, headline pins plot on the
  GIBS map (renderNewsPins) + geotag indicator in the feed.
- Dark neon styling matching existing dashboard theme.
2026-08-24 18:06:43 -04:00
Sirius DevOps
aec3ecae9a Map: FIRMS heatmap + camera thumbnail popups + unified layer panel
All checks were successful
build-and-deploy / build (push) Successful in 1m37s
- Vendored leaflet.heat 0.2.0; fires overlay is now a real heatmap
  (L.heatLayer) with intensity driven by brightness or VIIRS confidence
  (color mode selector) and a since= time filter (6h/24h/48h/7d/30d/all).
- Camera markers now open popups with the live snapshot thumbnail proxied
  through GET /api/cameras/{id}/snapshot (backend TTL cache) + full
  metadata (vendor, device, discovery source, first/last seen, coords,
  source link); missing-snapshot cams show a placeholder instead of 404.
- New collapsible Layers panel (dark neon) over the map: per-layer
  visibility toggles, opacity sliders (basemap/fires/cameras), live
  counts legend, and a fire heat-intensity ramp that swaps for the
  confidence legend in confidence mode.
- Clamp currentBBox() to world bounds so /api/cameras doesn't 422 at low
  zoom (worldCopyJump spans multiple copies).
- Skip overlay reloads on moveend while a popup is open — popup autopan
  no longer rebuilds the marker group and closes the popup.
- Zoom control moved to top-right so it doesn't collide with the panel.
2026-08-24 18:03:21 -04:00
Sirius DevOps
3aa6f265bb Add NASA GIBS satellite basemap world map tab (Leaflet)
Some checks failed
build-and-deploy / build (push) Failing after 5s
Interactive world map panel for the dashboard:
- Vendored Leaflet 1.9.4 under app/static/vendor/leaflet/ (served via
  new /static mount on the FastAPI app)
- New Map tab: GIBS WMTS raster basemap (BlueMarble_ShadedRelief_Bathymetry,
  VIIRS/MODIS/Aqua CorrectedReflectance_TrueColor, VIIRS_DayNightBand),
  layer picker + UTC date selector (Latest/-7d/-30d quick picks)
- /api/map/layers: curated GIBS catalog (tms, format, has_time, max_zoom)
- /api/map/times: per-layer date windows from GIBS Domains XML (6h cache,
  graceful 502 on GIBS hiccup; static layers 422)
- Fire hotspots (existing /api/fires) + open cameras (/api/cameras) as
  toggleable bbox-scoped overlays; dark UI matching dashboard theme
2026-08-24 17:35:44 -04:00
Sirius DevOps
627990efde Add NASA FIRMS active-fire ingest + /api/fires; API keys management page
Coherent merge of two coordinated features on the shared working tree:

FIRMS fire heatmap (backend, t_6e404c14):
- app/fire_sources.py: fetch FIRMS VIIRS area CSV (free MAP_KEY) -> NATS events.fire
- fires hypertable (TimescaleDB, 1-day chunks) with natural-key PK
  (latitude, longitude, acq_time, satellite); idempotent ON CONFLICT DO NOTHING
- alembic/versions/002_fires.py; GET /api/fires?bbox=&since= (JSON only)
- POST /api/ingest/fires; ~15 min poll loop (FIRMS_INTERVAL=900) in ingester
- env-driven config (FIRMS_MAP_KEY/DATASET/BBOX/INTERVAL); docs/firms.md covers
  the zero-cost GIBS VIIRS_SNPP_Thermal_Anomalies_375m_All tile alternative
- 18 tests (parser, mapping, idempotency, API contract) verified vs real
  TimescaleDB+PostGIS (localhost/osint-dashboard-pg image)

API keys page (frontend, t_4433cff2):
- app/keystore.py: api_keys table (self-creating), FIRMS/GEMINI/TELEGRAM
  registry with format validation, ****last4 masking, get_api_key()
- GET/POST/DELETE /api/keys (never returns full values); Keys tab in index.html

DB_NULL_POOL env switch in app/database.py enables a NullPool for tests /
short-lived processes that open a fresh event loop per unit.
2026-08-24 15:37:42 -04:00
sirius0xdev
93b8b89639
first commit 2026-06-04 20:30:04 -04:00