Live Platform · Real estate
Peak resale platform
A resale market where every fact keeps its source, and nothing is overwritten silently.
131database functions
171automated tests
3surfaces
The broker workspace and the team system are sign-in only. The public side is on the Peak website page.
How data moves
InBroker listingsDocumentsPasted messages
↓Truth graphevery fact keeps its source
↓OutTrust ladderMatchingMoney ledgerMasked contacts
The data model
The data model at a glance
organizations ─< workspaces ─< members (role → read / write / delete / admin / contacts / legal / finance)
people ─< person_contacts (masked) · person_roles · broker_profiles · developer_profiles · companies
locations (Egypt gazetteer + clusters) ─< location_aliases market_packs (feddan / qirat / sahm)
assets (lands | units) ─< listing_claims ← an asset is not a listing
facts (typed · source · confidence · validity window · never overwritten) ─ fact_conflicts
documents ─< document_versions · document_links verifications · risk_flags
requirements ─< matches missions ─< mission_brokers · mission_submissions
deals ─< deal_parties · offers (counter-offer chain) · tasks
money_entries (immutable ledger: expected / actual, settle, reverse) · commissions
events (append-only ledger of every change) · audit_log (sensitive access)Excerpt, shortened. Facts, money and contacts can only be written through audited functions.
Under the hood
Contacts are masked unless the viewer has the right or a live disclosure
create or replace function peak.can_see_contact(ws uuid, person uuid) returns boolean
language sql stable security definer set search_path = peak, pg_temp as $$
select peak.has_cap(ws, 'contacts.read')
or exists (select 1 from peak.contact_disclosures d
where d.person_id = person
and d.disclosed_to = peak.my_member_id(ws)
and (d.expires_at is null or d.expires_at > now()));
$$;
create policy contacts_sel on peak.person_contacts for select to authenticated
using (peak.can_see_contact(workspace_id, person_id));The same pattern protects legal, personal and finance facts.
The details
- Assets and listings are separate: an asset is a land or unit, a listing is who offers it, at what price and with what authority.
- Facts are typed (source, calculated, inferred, verified) and carry a source, a confidence level and a validity window.
- An immutable money ledger: corrections are reversals and settlements, never edits.
- Contacts are masked by default and disclosed only through an audited, time-limited disclosure.
- Free-text place names in Arabic resolve to the area, city and cluster.
- The database migrations run in an in-memory Postgres on every test run, and the live schema is checked against the tested one.
Built with: JavaScript · Supabase / PostgreSQL · Vercel · installable web app
← All builds