Multi-tenant isolation
Every query against your business data is filtered by your account, and inventory, transactions, and procedures are additionally filtered by location.
- Account-level isolation: Every read and write is filtered by
accountIdvia centralized security helpers (verifyUserAccountAccessfor reads,verifyUserWriteAccessfor mutations). Cross-tenant data is unreachable by API design, not just by convention. - Entity-level isolation: Tables that hold per-location data — inventory, photos, transactions, transaction files, procedures, and equipment logs — are additionally filtered by the entity (location) you have selected. Switching entities in the app changes which data is fetched server-side, not what gets hidden in the UI.
- User identity from the server: The authenticated user ID is read from the Supabase session on every request — never accepted as client input — so a tampered request cannot impersonate another user.