Skip to content
CoreHub.
All projects

HavenFind

LiveWeb app

Real estate discovery portal with an interactive map and advanced property filters.

Stack

  • Next.js
  • TypeScript
  • Tailwind CSS
  • Leaflet
  • OpenStreetMap
  • Neon Postgres
  • PostGIS
  • Drizzle ORM
  • Netlify

What to demo

  1. Pan the map and watch clustered pins update with a spatial query
  2. Filter by price, bedrooms, size and amenities
  3. Estimate a mortgage and bookmark a property

Architecture

  • Listings sit in a PostGIS geometry column with a GIST index, and the API filters by the visible map bounds, price, beds and amenities in one query.
  • Leaflet touches window, so the map loads client-only with next/dynamic, and panning keeps the same marker array when the visible homes are unchanged so open popups survive.
  • Filters live in the URL, parsed and serialised by one zod-validated module, so links are shareable and invalid URLs fall back to defaults.
  • Saved homes use localStorage through useSyncExternalStore with an empty server snapshot, so there are no hydration mismatches.
  • Viewing bookings come from one slot generator shared by the form and the API, with a unique index on listing and slot as the final guard against double bookings.