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). Designed, built, documented (OpenAPI/Swagger) and shipped to production solo, on a 100%-free stack.
- Architected a single-database platform (one Postgres with PostGIS + pgvector + tsvector) powering 4 modules — no syncing between a 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.
- Implemented hybrid RAG (vector + keyword + spatial) with reciprocal-rank fusion and a grounding gate that declines out-of-corpus questions — cited answers, no hallucinations.
- Engineered geospatial analytics in PostGIS: stay-point stop detection, elevation-gain hysteresis, sea-route pathfinding for ships, and time-based animated map playback.
- Added observability (Langfuse + OpenTelemetry), a cross-module eval harness, OpenAPI/Swagger docs and security headers; CI-clean (typecheck/lint/build) and deployed on Vercel.
- Kept the LLM provider swappable (Gemini ⇄ Ollama ⇄ paid in one line) on a 100%-free stack; i18n (EN/UK/PL), dark mode and a first-run onboarding tour.