Building a Real Estate Listing Portal with Places Search, Verified Brokers, and Context Chat
Combine Data API multi-filter queries, Places address lookup, phone-verified sellers, context-card live chat between buyers and agents, and prepaid VIP listing credits on one isolated backend.

Property marketplaces and classifieds portals juggle multiple demanding pieces at once: flexible price/area filtering, clean address geocoding, phone-verified brokers, context-rich buyer messaging, and prepaid featured-listing credits.
Habify Base wires every single one of those pieces inside one cohesive BaaS project so small product teams can launch complete vertical marketplaces quickly.
1. Real Estate & Classifieds Architecture Map
Each marketplace participant, from home seekers to verified agents and moderators, maps directly to native platform features:
| Marketplace Feature | Habify Base Solution | Operational Note |
|---|---|---|
| Price, size & location filters | Data API $and/$or, range operators & exact count | Paginates approved listings cleanly from browsers |
| Address & coordinate lookup | Places Service (autocomplete, geocode, parcel) | Standardizes neighborhoods and pins accurately on maps |
| Verified agent accounts | Isolated phone OTP verification + anti-spam caps | Requires verified phone claims before publishing listings |
| Listing photos vs private deeds | Public R2 gallery · Private R2 verification docs | Keeps sensitive ownership papers inaccessible externally |
| Listing-aware buyer chat | Live Chat messages with embedded context_card | Opens buyer-broker conversations with property details attached |
| Prepaid VIP boost credits | Project Billing Kit wallets & automated receipts | Deducts credits atomically when boosting featured properties |
2. Moderated Listing Publication & Owner-Scoped Edits
Public property search queries return only status = 'published' rows, whereas verified agents can manage their own drafts under RLS:
CREATE TABLE public.property_listings (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
owner_id uuid NOT NULL,
title text NOT NULL,
district text NOT NULL,
price_vnd bigint NOT NULL,
area_m2 numeric(8,2) NOT NULL,
status text NOT NULL DEFAULT 'pending_review' CHECK (status IN ('pending_review', 'published', 'archived')),
is_vip boolean NOT NULL DEFAULT false,
created_at timestamptz NOT NULL DEFAULT now()
);
ALTER TABLE public.property_listings ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.property_listings FORCE ROW LEVEL SECURITY;
CREATE POLICY listings_read_published_or_own ON public.property_listings
FOR SELECT USING (
status = 'published'
OR owner_id::text = current_setting('app.current_user_id', true)
);
CREATE POLICY listings_owner_write ON public.property_listings
FOR INSERT WITH CHECK (owner_id::text = current_setting('app.current_user_id', true));3. Multi-Criteria Listing Filter & Sending Context Cards in Live Chat
Chain range and $or keyword filters in the browser for instant search, then attach a structured context_card directly inside live chat messages to the listing agent:
// 1. Lọc căn hộ 2-5 tỷ ở Thủ Đức hoặc Bình Thạnh (kèm đếm tổng trang)
const { data: listings, meta } = await habifyPublic.db
.from("property_listings")
.select("id,title,district,price_vnd,area_m2", { count: "exact" })
.and([
{ price_vnd: { gte: 2_000_000_000, lte: 5_000_000_000 } },
{ $or: [{ district: { eq: "Thủ Đức" } }, { district: { eq: "Bình Thạnh" } }] },
])
.order("is_vip", { ascending: false })
.range(0, 19);
// 2. Khách nhắn tin hỏi căn hộ đính kèm Context Card
await habifyPublic.chat.sendMessage(conversationId, {
type: "context_card",
body: "Chào bạn, căn hộ này còn trống vào cuối tuần xem nhà được không?",
context_card: {
listing_id: selected.id,
title: selected.title,
price_label: "3,45 tỷ",
},
});4. Selling Prepaid VIP Listing Credits with Built-In Wallets
Equip agencies with prepaid wallets via Project Billing Kit so brokers top up once via QR checkout and deduct credits per VIP boost or recurring monthly agent subscription, complete with automated e-invoicing.
Frequently Asked Questions
How are private ownership verification documents kept separate from public listing photos?
Public property photos store as public objects, while verification deeds upload privately through a server handler and open only via short-lived moderator signed URLs.
Does Places Service provide geocoding and location lookups tuned for Vietnam?
Yes. Places Service offers Vietnam-focused autocomplete, geocoding, and parcel lookup endpoints through the same SDK.
Can I build custom models beyond these blueprints, such as an internal CRM or homestay app?
Absolutely. Habify Base is a general-purpose PostgreSQL 18 BaaS: design any relational schema and compose any subset of the 11 Core Services.
Related Documentation & Guides
Launch This Architecture in Free Sandbox in 3 Minutes
Spin up an isolated PostgreSQL 18 database, grab your hb_pk_* / hb_sk_* keys, and wire @habifybase/sdk.