Testing RLS policies, server action isolation, integration tests with real database, and E2E patterns.
Checklist
Auto-generated from the 8 rules this article references — each links to the enforceable rule.
References
Addresses
Rules
Enable RLS on every tableNever import server-only code in client componentsKeep server actions in dedicated filesTest RLS policies explicitlyTest server actions in isolationUse error.tsx for route-level error boundariesUse requireAuth() as the first call in every authenticated server actionUse (select auth.uid()) instead of auth.uid() in policies
Tags
nextjssupabase
More from this skill
Explore more rules and knowledge
BeforeMerge offers hundreds of code review rules, guides, and detection patterns to help your team ship better code.