#36 · Geofence triggers — fire webhook when a marker enters/exits a region
+140 pts on merge
Claim on GitLab
Submit a merge request that closes this issue to earn points on merge — bounties stack on the standard
+40 merge_pr award. New to the repo? See the
Contributing guide,
and Local Development & SSO
to run the app locally (
cp .dev.vars.example .dev.vars && pnpm dev, after rebasing on main) and fully test your change before opening the MR.
Description
Context
TAK already tracks markers (positions). Adding geofences (named polygons stored in D1) and emitting webhooks on enter/exit makes the service useful for transport runs, perimeter alerts, training events.
Acceptance criteria
- [ ] POST
/api/geofencescreates a polygon (name, coords, owner) - [ ] Marker updates check geofence membership; transitions emit webhook to subscriber URL
- [ ] Webhook payload:
{ marker_id, geofence_id, transition: 'enter'|'exit', timestamp } - [ ] Subscribers stored per-geofence in D1; signed with shared secret
Technical hints
- Use Turf.js (or hand-rolled point-in-polygon) — Workers-compatible
- Read
apps/tak-service/docs/ldap-setup-progress.mdfor current state — auth is the prerequisite
--- *Submit a merge request that says Closes #<this issue iid> in the description. On merge to main, the GitLab webhook will auto-award your bounty + the standard merge_pr (40 pts) to your scoreboard account. Email on commit must match your Authentik email.*
Relevant files
No relevant files linked yet.
Hints
No hints yet.
Activity
No points have been awarded for this bounty yet.
Comments
Sign in to join the discussion.
No comments yet. Be the first to weigh in.