Frameworks
Overview
One adapter per framework runs withBetterSupabase in its middleware, so every route, loader and action gets the caller's repositories.
Each framework adapter is a subpath of better-supabase that runs
withBetterSupabase in the framework's own middleware or hook. The adapter
verifies the access token locally, builds the caller's repositories and
hands them to your routes, loaders, actions and server functions. Pick the
page for your framework; a framework without an adapter can use a bridge or
handle() from Other frameworks.
| Page | Covers |
|---|---|
| Next.js | The proxy, Server Components, route handlers, server actions and cache tags |
| Cache Components | Instant navigations, prefetching and role-aware UI with Cache Components |
| Hono | Middleware, Result-aware handlers and REST resources |
| oRPC | A middleware that adds the caller's repositories to the oRPC context |
| Expo Router | Server loaders, API routes and middleware |
| Edge Functions | Fetch handlers for Supabase Edge Functions, Deno, Bun and Workers |
| TanStack Start | Request middleware with the caller's repositories in every server function |
| SvelteKit | A handle hook with the caller's repositories on event.locals |
| React Router | Server middleware with the caller's repositories in loaders and actions |
| H3 and Nitro 3 | H3 2 middleware with the caller's repositories on event.context |
| Elysia | The caller's repositories derived into every route |
| Nuxt and Nitro 2 | The Nuxt module or toH3V1 as Nitro 2 server middleware |
| Node, Express, Fastify and Koa | node:http, Express, Fastify and Koa, with route guards |
| NestJS | NestJS middleware, @Ctx() and role guards |
| Astro | Astro middleware, page guards and Actions |
| SolidStart | Middleware for queries, actions and API routes |
| MCP servers | Tools from your tables and your own code, running as the signed-in user |
| Other frameworks | A bridge for any framework, or your own adapter with handle() |
Last updated on