Locus— AI-Orchestrated Geospatial Workspace
A single Next.js + Postgres app where four product modules share one geospatial datastore (PostGIS for geometry, pgvector for semantic search, tsvector for keyword). It showcases end-to-end AI orchestration — a streaming tool-calling agent (also exposed as an MCP server), hybrid RAG with a grounding gate, and structured LLM output — alongside real geospatial engineering (PostGIS trajectory analytics, marine routing, animated map playback). This is the reusable geo-AI template that Domus (below) productizes for real estate.
- Architected a single-database platform — one Postgres with PostGIS + pgvector + tsvector powering 4 modules, with no syncing between a separate vector DB and a geo DB.
- Built agentic AI orchestration: a streaming, multi-step tool-calling agent over 7 real geo tools, exposed both in-app and as a Model Context Protocol (MCP) server — one tool core, two surfaces.
- Engineered geospatial analytics in PostGIS: stay-point stop detection, elevation-gain hysteresis, sea-route pathfinding for ships, and time-based animated map playback.
- Implemented hybrid RAG (vector + keyword + spatial) with reciprocal-rank fusion and a grounding gate that declines out-of-corpus questions — cited answers, no hallucinations.
- Instrumented the whole pipeline with Langfuse + OpenTelemetry and a cross-module eval harness — LLM quality tracked as a first-class metric.