Open source · MIT · Node.js 18+
An embeddable rules engine for location streams
Drop it into your Node.js process. Feed it position updates. Receive typed spatial events — enter, exit, approach, recede — synchronously, with no server, no network calls, and no external dependencies.
geo-stream · quickstart.ts
1import { GeoEngine } from '@jamesholcombe/geo-stream'23const engine = new GeoEngine()4 .registerZone('warehouse', warehousePolygon)5 .registerCircle('depot', 500, 300, 50) // cx, cy, radius (metres)6 .defineRule('fast-entry', rule =>7 rule.whenEnters('warehouse').speedAbove(15).emit('speeding-alert')8 )910// Feed in position updates — events come back synchronously11const events = engine.ingest([12 { id: 'driver-1', x: 505, y: 298, tMs: Date.now() },13])14// [{ kind: 'approach', id: 'driver-1', circle: 'depot', t_ms: ... }]
⚡
In-process, zero latency
A native Rust module. No server, no network hop, no round-trip per update. State lives in your process.
🔁
Deterministic
Same inputs always produce the same events in the same order. Replay, backtest, and unit test with exact reproducibility.
⏱️
Dwell and sequences
Debounce noisy boundary crossings with per-zone dwell thresholds. Detect ordered multi-stop routes with sequence rules.
🔌
Adapters included
EventEmitter, Kafka, and Redis Streams adapters ship in the box. Structural typing — no hard deps.
Get started in seconds
npm install @jamesholcombe/geo-streamPre-built native binaries for macOS, Linux, and Windows. No Rust toolchain required.
Read the docs →