Skip to content

snstac/CloudTAK-Plugin-uDash

 
 

Repository files navigation

CloudTAK uDash Plugin

This plugin renders a native Vue detection feed inside CloudTAK and connects to a small backend that accepts webhook POSTs, persists a chronological detection log, and streams live updates back to the client.

What It Does

  • Accepts detection payloads matching sample_payload.json through a webhook endpoint.
  • Stores a bounded running log on disk in chronological order, oldest first.
  • Streams snapshots and new detections to the plugin over WebSocket.
  • Caches detections in browser localStorage so the feed survives plugin refresh and reload.
  • Uses a compact single-column card layout designed for narrow vertical scrolling.

Plugin Behavior

The CloudTAK view in lib/UDashContainer.vue now:

  • fetches the current detection log from the backend,
  • reconnects to a live WebSocket stream,
  • appends new detections to the bottom of the log,
  • keeps oldest detections at the top,
  • persists the backend URL and cached detections locally.

The backend URL is configurable from the plugin UI and is stored in localStorage.

Detection Payload

The expected input is the JSON structure shown in sample_payload.json. The backend extracts a compact normalized record with fields such as:

  • uid
  • callsign
  • manufacturer and model
  • remote ID and MAC
  • location and altitude
  • sensor metadata
  • confidence and hits
  • operator coordinates and address

Installation

  1. Copy or symlink this repo to ./api/web/plugins/.
  2. From ./api/web, run npm run build.
  3. Start the backend from server/.
  4. Open the plugin in CloudTAK and set the backend URL if it is not running at http://localhost:3080.

Backend Endpoints

The backend in server/server.js exposes:

  • POST /api/detection
  • POST /api/detections
  • POST /webhook/detection
  • GET /api/detections
  • GET /health
  • WS /ws

Any of the POST endpoints can receive the webhook payload.

Example Webhook Post

curl -X POST http://localhost:3080/webhook/detection \
  -H "Content-Type: application/json" \
  --data @sample_payload.json

Persistence

  • Server persistence: detections are written to server/data/detections.json.
  • Client persistence: detections and backend URL are cached in browser localStorage.

That combination lets the feed survive both browser-side plugin reloads and backend restarts.

CORS

The backend sends permissive CORS headers by default. For production, set CORS_ORIGIN to the CloudTAK origin before starting the server.

Example:

CORS_ORIGIN=https://your-cloudtak.example MAX_STORED_DETECTIONS=1000 npm start

Notes

  • The list is intentionally chronological rather than newest-first because this view is a running log.
  • The plugin does not depend on the old iframe or map-click forwarding path anymore.

About

CloudTAK Plugin uDash

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Vue 74.7%
  • JavaScript 19.3%
  • TypeScript 5.4%
  • Makefile 0.6%