api-supabase-routes
Installation
SKILL.md
API + Supabase Route Conventions
Shared handler recipe for both apps. Project overlays may add namespaces, CORS details, or stricter “no Server Actions” rules.
Handler flow
- Auth — reject unsigned users with 401
- Parse body — JSON → 400 on failure
- Validate — Zod
safeParse()→ 422 on failure - Query — Supabase scoped by owner (
user_id/ profile id) - Respond — entity-named JSON or standard error body