← all work08 / 14 · ch. 04 — ship

VienenRaíces

Search for a home the way you’d say it.

A real-estate portal for Peru, Cusco first: natural-language search in Spanish or English interpreted by a model and ranked by fit, with price and demand models running behind it.

Kindproduct
StatusLive
PlatformWeb
Year2026
Screenshot 2
Screenshot 1
About

Houses, flats and land, for sale and for rent. The difference is the search box: you type what you need in your own words — area, budget, bedrooms — and a model turns it into structured filters (Claude with structured outputs, an offline heuristic fallback in both languages, and a cache keyed by the query so repeated searches cost nothing). Results are ranked by a score that blends semantic similarity from pgvector embeddings with a fit score for the things you asked for, price closeness and text completeness; if nothing matches, a second relaxed pass widens the net and says so.

Underneath is one Supabase project — Postgres 17 with pgvector and PostGIS, 19 tables, 40-plus row-level-security policies. The app only ever holds the publishable key: authorisation lives entirely in the database, and anything privileged goes through narrow security-definer RPCs. A Python worker trains a gradient-boosting price model on log price with quantile bands, writes an estimate and a verdict — below, in line with, or above the market — onto every active listing, and computes a demand index per district from searches, views and leads.

Around that: listing import from a URL, feeds from agency CRMs, saved searches with alerts, appointment booking with anti-overlap constraints, a report-style listing page with price analysis and zone insights, and a split results view with a synchronised map. Live at vienenraices.com.

What's in it
  • Natural-language search in Spanish or English → structured filters, with an offline fallback and a query cache
  • Ranking = pgvector semantic similarity + a fit score; relaxed second pass when nothing matches
  • Row-level security as the only authorisation layer; the app never sees a service key
  • Gradient-boosting price model with quantile bands and a per-listing market verdict
  • Demand index per district from searches, views and leads
  • Listing import from a URL, CRM feeds, saved searches with alerts, appointment booking
  • Report-style listing page and a split list-and-map results view
Stack
Next.js 16TypeScriptSupabasePostgreSQLpgvectorPostGISPythonscikit-learnClaude APIMapLibreSolo developer