All work
Case study2025 to 2026AI SaaSBeta

Terravive

Site intelligence that reads CAD and GIS files, with retrieval quality gated in CI.

1.0recall@3 on golden-set evals
Year2025 to 2026
RoleArchitected it, built the platform foundation
TypeAI SaaS
TeamIkonic Solutions

Overview

Terravive is a multi-tenant AI site-intelligence SaaS for architects. It brings everything known about a site into one place and answers questions about it, backed by the team's drawings, surveys and photos.

The problem

Architects needed one platform to ingest and query everything known about a site: PDFs, CAD, GIS, LiDAR, photos and audio. The answers had to be trustworthy enough to act on.

It also had to be a real multi-tenant product, with strict tenant isolation, billing and a fully type-safe contract between the API and the admin app.

My role

  • Architected the multimodal RAG pipeline: BullMQ workers (OCR, Whisper, Claude vision) ingest site data into pgvector.
  • Designed the LangGraph agent graph (planner, tool registry, input and output guardrails) on a multi-provider LLM layer.
  • Gated retrieval quality in CI with golden-set evals, plus nightly LLM-as-judge scoring and OpenTelemetry tracing.
  • Built the platform foundation: a type-safe Turborepo monorepo (NestJS 11 and Next.js 16) where one Drizzle schema drives the OpenAPI contract and typed TanStack Query hooks.

Approach

  • Hybrid retrieval: dense vectors and Postgres full-text search fused with RRF, then reranked with Cohere. Two indexes and a rerank call per query, but exact terms like drawing numbers and codes are found as well as meaning.
  • A LangGraph agent that plans, calls tools and checks its input and output against guardrails.
  • One LLM gateway over Claude, OpenAI and Groq, with failover, a circuit breaker, semantic caching and per-tenant budgets. More moving parts than one provider, but an outage or a runaway tenant can't take the product down.
  • A golden question set runs against a real pgvector database on every push. CI is slower, but retrieval regressions are caught before users see them. The paid LLM-judge tier stays off the blocking path because its verdicts drift with the judge model.
  • JWT and OAuth, RBAC, tenant isolation, audit logging, Stripe billing and PostHog feature flags on the same platform.

Architecture

Site filesPDF · CAD · GIS · LiDARIngestion workersBullMQ · OCR · WhisperPostgreSQLpgvector · DrizzleCore APINestJS 11 · tenants · RBACAgent graphLangGraph · guardrailsHybrid retrievervector + full-text · RRFCoherererankLLM gatewayClaude · OpenAI · Groq

A golden question set runs against a real pgvector database on every push. If recall or MRR drops, the build fails.

Terravive architecture: Next.js web app and NestJS core API; BullMQ ingestion workers write chunks and embeddings to PostgreSQL with pgvector; a LangGraph agent graph calls a hybrid retriever (vector plus full-text, RRF, Cohere rerank) and a multi-provider LLM gateway; a CI gate runs golden-set retrieval evals.
High-level view. Client data, prompts and internal names are left out.

Results

Retrieval quality is measured, not guessed: recall@3 of 1.0 and MRR of 0.90 on real site data, checked in CI on every push. Terravive is in beta.

1.0recall@3 on the golden set
0.90mean reciprocal rank
CIretrieval quality checked on every push

Visit the live site

Stack

RAGLangGraphpgvectorClaude / OpenAINestJS 11Next.js 16BullMQCohere RerankDrizzle ORMPostgreSQLOpenAPITanStack QueryOpenTelemetryStripePostHogTurborepo
Next case study
Kynos OS
An operating system for coaching businesses, with a text and voice AI companion.

Building something similar?

Tell me about it. I reply within 24 hours with questions, a rough approach, and whether I'm the right fit.