← All work
BACKENDM1 in progress2026

housing_rs

A Rust-based real-estate intelligence platform. PostGIS spatial queries, XGBoost price modeling, and Claude API natural-language search — wired into one stack.

Role
Full-stack + architecture
Duration
2026 — in progress
Reading
2 min read
Stack
RustAxum 0.7sqlx 0.8PostgreSQL + PostGIShtmxAlpine.jsPython FastAPIClaude API

Product Shots

SCREENSHOTS · COMING SOON

Screenshots coming soon. Drop captures into public/works/<slug>/ and add a screenshots array to the mdx frontmatter.

public/works/housing-rs/01.png

Taiwan publishes real-estate transaction data — but it's scattered, hard to query, and lacks analysis. housing_rs unifies nationwide transactions, neighborhood POIs, ML-based valuation, and LLM natural-language search into one Rust platform. The goal: let an investor type "Find me a property in New Taipei under NT$10M near a metro station" and get structured results.

Problem

  • Government open data is messy, fragmented across APIs, and parsing-heavy
  • No tool combines transactions + neighborhood data + ML pricing — investors patch it together manually
  • Existing platforms are SPA + thin proxy — no real analysis

Solution

A Rust backend + ML microservice + LLM parser in three layers:

  1. Rust data pipeline: tokio-cron-scheduler pulls government ZIPs on schedule; sqlx writes to PostgreSQL; PostGIS indexes handle spatial POI queries.
  2. Python FastAPI ML service: XGBoost for valuation, Isolation Forest for outlier detection. Rust calls it over HTTP — keeps ML deps out of the Rust binary.
  3. Claude API LLM search: User queries like "New Taipei under NT$15M, < 5 years old, near metro" parse to structured JSON, then Rust translates to SQL.
  4. htmx + Alpine.js frontend: HTML over the wire — avoids SPA over-engineering. Leaflet for maps, ApexCharts for charts.

Stack

  • Web: Axum 0.7 (tower ecosystem) + tokio + sqlx 0.8 compile-time queries
  • DB: PostgreSQL 16 + PostGIS 3.4 (spatial indexing, nearest-neighbor)
  • ML: Python FastAPI + XGBoost + Isolation Forest (separate microservice)
  • LLM: Anthropic Claude API (structured output JSON mode)
  • Cache / Limit: moka cache, governor rate limiting
  • Deploy: Multi-stage Docker, healthchecks, request tracing

Outcomes

  • M1 complete: skeleton + DB schema + transaction-data ingestion pipeline
  • M2-M12 in plan: UI, map visualization, valuation accuracy benchmarking, LLM tool use
  • Target M6 MVP, with 50% of investor queries done via LLM interface

Lessons

  • Rust isn't only for HFT: sqlx compile-time query checks deliver huge maintenance value on mid-size projects — schema refactors no longer break SQL at runtime.
  • HTTP-isolating the ML service is the right call: Rust ML crate ecosystem isn't mature; forcing it locks you into bad choices.
  • LLM is not a SQL translator: Letting LLMs write SQL = open SQL injection. Structured JSON output, then your code translates to SQL — that's safe.

Interested in this project?

Or want something similar built? Let's chat.