Skip to main content
v1 is housing-only. Keep the schema property-centric. Introduce a generic listing model only when non-housing categories ship.

Entities

profiles

  • id matches auth.users.id
  • is_renter / is_owner drive dashboard access
  • last_dashboard is renter, owner, or null
  • Display fields (name, avatar) may be added as product needs them

properties

  • Owned by a profile with is_owner true at write time
  • Publicly readable for browse and detail pages

reviews

  • Written by a profile with is_renter true at write time
  • rating is an integer from 1 to 5
  • Publicly readable on property detail pages

RLS summary

Do not grant broad anon writes. Authenticated server code uses the user session so RLS applies. Prefer the service role only for trusted admin or system jobs, never in the browser.

Migrations

SQL migrations live in ratemyrental-web under supabase/migrations. Apply them with the Supabase CLI or the project SQL editor. See the web repo README for the current project ref.