Zonatic is an experimental geospatial rule engine.
It focuses on a simple but often overlooked problem: how geographic boundaries are used to make explicit, deterministic decisions — not just drawn on a map.
This repository provides a hosted sandbox playground where anyone can:
- a sandbox API for evaluating boundary-based decisions
- an interactive sandbox UI for authoring and inspecting boundaries
Zonatic is:
- a boundary-based decision engine
- deterministic and auditable
- API-first and agent-friendly
- focused on rules, not UI
Zonatic is NOT:
- a tracking application
- a full SaaS platform
- a realtime GPS system
- an AI decision maker
AI (or LLMs) can control Zonatic, but never decide — the core logic remains explicit and deterministic.
Zonatic revolves around the idea of a sandbox.
A sandbox represents an isolated, temporary environment where:
- a geographic boundary is defined (GeoJSON)
- location checks are evaluated against that boundary
- decisions are deterministic and explainable
- state expires automatically
The sandbox exists in two forms:
- Sandbox API — for programmatic evaluation
- Sandbox UI — for interactive authoring and inspection
The sandbox UI lives in the sandbox/ directory.
This is the fastest way to try Zonatic without writing any code.
Call:
POST /sandbox
Response example:
{
"sandbox_id": "sbx_123abc",
"token": "sk_zonatic_xxxxx",
"endpoint": "/sandbox/sbx_123abc/check",
"expires_at": "2025-01-01T12:00:00Z"
}Each sandbox:
- is isolated
- supports one boundary
- expires automatically
Call:
PUT /sandbox/{id}/boundary
Body example (GeoJSON Polygon):
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[106.8, -6.2],
[106.81, -6.2],
[106.81, -6.21],
[106.8, -6.21],
[106.8, -6.2]
]
]
}
}
Call:
POST /sandbox/{id}/check
Body:
{
"lat": -6.2,
"lng": 106.8
}Response:
{
"status": "INSIDE",
"explanation": "Location is inside the defined boundary"
}This result is deterministic and explicit and explainable.
Zonatic is designed to be agent-friendly.
A common setup:
- Zonatic exposes a REST API
- ChatGPT (via Custom GPT Actions) calls the API
- ChatGPT explains results, but does not make decisions
Example prompt:
Check whether this coordinate is inside my boundary.
Zonatic:
- evaluates the rule
- returns a structured decision
ChatGPT:
- translates the result into natural language
This separation keeps the system auditable and safe.
The full API contract is defined in:
GET /openapi.yaml
Interactive documentation:
/docs/
- Core sandbox API: ✅
- Boundary evaluation: ✅
- Sandbox UI: ✅ (experimental)
- Swagger UI: ✅
- Hosting: experimental
- Persistence: in-memory (v0)
- group / collective presence checks
- expected absence / readiness rules
- MCP-compatible interfaces
- optional AI-assisted authoring (non-decision)
Apache License 2.0
Zonatic started as an exploration after building a small web component for drawing boundaries. The question that followed was simple:
After a boundary is defined — what decisions does it actually enable?
This repository is an attempt to answer that question, openly and incrementally.