Role model
Each profile stores:is_renter— can use the renter dashboard and write reviewsis_owner— can use the owner dashboard and manage propertieslast_dashboard—renter,owner, or null (used after sign-in)
Sign-in and routing
Middleware rules
/dashboard/renter/**requiresis_renter/dashboard/owner/**requiresis_owner- If the requested dashboard is missing but the other role exists, redirect to the available dashboard
- If neither role is enabled, redirect to onboarding
- Update
last_dashboardwhen the person successfully enters a dashboard or uses the switcher
Dashboard switcher
Show the dashboard switcher only when bothis_renter and is_owner are true. Keep renter and owner navigation trees independent under their own route prefixes.
v1 permissions
Authoritative checks happen in authenticated server code. RLS enforces the same rules as defense in depth. See Data model.