> ## Documentation Index
> Fetch the complete documentation index at: https://ratemyrentalco.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Trust and data rules

> Approved launch contracts for who can write what, drafts, claims, public reads, freshness, notifications, Turnstile, and no-duplicate submit.

**Approved** — 2026-12-01. Launch trust and data contracts before schema, RLS, and form-backed features. No implementation on this page.

Aligns with [Launch journeys](https://ratemyrentalco.com/docs/architecture/launch-journeys.md), [Data model](https://ratemyrentalco.com/docs/architecture/data-model.md), [Roles and dashboards](https://ratemyrentalco.com/docs/architecture/roles-and-dashboards.md), and the proposed [Forms and error recovery](https://ratemyrentalco.com/docs/harbor/forms-and-error-recovery.md) pattern.

## Who can write what

Authoritative checks live in authenticated server code. RLS is defense in depth. Do not allow broad anon writes. Use the service role only for trusted admin or system jobs—never in the browser.

| Entity | Read | Write |
| - | - | - |
| `profiles` | Own row (authenticated) | Own row; role flags only via onboarding/settings |
| `properties` | **Public** (browse + detail) | Owner of the row only (`is_owner` at write); no cross-owner edit |
| `reviews` | **Public** (on property detail) | Renter who owns the review only (`is_renter` at write); never as another user |
| Drafts (reviews / listings / claims) | Owner account only | Owner account only; never public |
| Claim evidence (if claim in cut) | Owner + trusted reviewers/ops | Claimant upload; staff decision only |

**Owner list vs claim:** Listing creates a property owned by the signer. Claim (if in cut) attaches ownership after verification—never silent overwrite of an existing owner.

## Drafts — privacy and retention

* Drafts are **private to the owning account**. Different accounts must not load or resume them.
* Persistence uses explicit **Save draft** / **Save changes** (per journeys). No silent cross-session autosave unless product later approves it.
* After session expiry: the same account may resume the saved draft; identify any fields that need re-entry.
* Do **not** put sensitive verification material in durable browser storage (`localStorage` / IndexedDB). Keep it server-side or ephemeral upload only.
* **Proposed retention:** keep an unsaved-to-submit draft until the owner submits, discards, or **90 days** of inactivity—then hard-delete the draft and orphan private attachments. Published reviews and properties follow product delete/edit rules, not this draft TTL.
* On submit success: promote to the public (or pending) record and remove or archive the draft so it cannot be re-submitted as new.

## Claim verification minimum (if claim in cut)

If owner claim ships in the launch cut, require **at least one** of:

1. A document or statement that reasonably ties the claimant to the address/unit (for example lease, tax, utility, or deed excerpt), **or**
2. Out-of-band confirmation through a channel RateMyRental controls (email/domain already on file for that property, or ops-assisted check).

**Process bar:** claim starts **pending** → staff/system **approved** (owner can edit) or **denied/contested** (status + next step; no auto-approve on upload alone). Contested or duplicate claims: explain the conflict; do not replace `owner_id` until resolved. Full vendor KYC / rich verification UX stays out unless separately approved.

If claim is **out of cut:** owners **list/create** only; no claim states in the Harbor map.

## Public vs authenticated reads

| Surface | Guest | Signed-in |
| - | - | - |
| Property browse / detail, published reviews | Yes | Yes |
| Own profile, dashboards, drafts, review history, owner portfolio | No | Role- and ownership-gated |
| Pending claim status / evidence | No | Claimant (and ops); not public |
| What becomes public on submit | Shown before submit | Same |

Public reads use the anon key under RLS. Dashboard and mutation paths use the user session.

## Freshness

| Data | Launch rule |
| - | - |
| Own successful write (review, property, draft, claim submit) | **Immediate read-after-write** for that actor on the next view of the same record |
| Others’ property/review content | **Request-time / navigation refresh** is enough—no realtime fan-out required for launch |
| Stale / partial / unavailable | When the UI decision depends on live data, show an explicit stale, partial, or unavailable state and a way to **recheck** (reload / revisit). Do not imply certainty when the source failed |
| Availability / vacancy (if shown) | Only if backed by an approved source; otherwise omit or mark unavailable—never invent |

Realtime subscriptions are optional post-launch unless a cut journey requires them.

## Critical notifications — only if those events are in cut

Enable only for events that ship. For each enabled critical event:

* **On-screen** durable status on the relevant record/dashboard (source of truth the person can reopen)
* **Transactional email** fallback when off-screen delivery is approved for that event (provider still TBD in stack docs)
* **Support route** named in the message (how to get help if delivery fails)
* **Missed delivery:** keep the durable in-product record; do not treat toast-only as sufficient

**Proposed critical set if in cut:** account/security (sign-in from new device / session revoke if offered); claim **approved / denied / contested**; consequential moderation that hides or locks a review or property the person owns.

**Out unless approved:** SMS, push, UI sound, broad marketing personalization (matches the journey cut).

## Turnstile and abuse surfaces

Verify Cloudflare **Turnstile** **server-side** before processing on:

* Public / anonymous contact or lead forms
* Auth-adjacent abuse-prone public flows (for example high-volume magic-link or OTP request) as implemented
* Any other unauthenticated write the product adds

Authenticated review / property / claim mutations rely on session + RLS + Zod; add Turnstile there only if abuse appears. Rate-limit OTP and submit endpoints. Do not rely on client-only bot checks.

## No-duplicate submit

* Every **Submit** / **Claim** / **Publish** path is **idempotent** for a given intent (idempotency key or equivalent server check)
* Interrupted submit: detect whether the prior attempt already succeeded → show the existing result; **do not** create a second review, property, or claim
* Safe client retry after network failure must not double-write
* One active draft per (user, property, form type) unless product later allows multiples; submitting consumes that draft

## Open product calls

| Call | Proposed default |
| - | - |
| Draft TTL | 90 days inactivity |
| Claim at launch | Per journeys cut — verification bar above if yes |
| Review photo uploads | Out until approved; if in, same private-until-publish + orphan cleanup |
| Critical email provider | TBD before enabling off-screen critical notifications |
| Pilot geography | Outside this trust doc; does not change RLS shape |

## Related

* [Launch journeys](https://ratemyrentalco.com/docs/architecture/launch-journeys.md)
* [Data model](https://ratemyrentalco.com/docs/architecture/data-model.md)
* [Forms baseline status](https://ratemyrentalco.com/docs/harbor/forms-baseline-status.md)
* [Launch-path Harbor map](https://ratemyrentalco.com/docs/harbor/launch-path-map.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.