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() |
Adapter tiers
Every adapter ships in each release and keeps working. They differ in how much testing and documentation they get (ADR 0094).
| Tier | Adapters | What it gets |
|---|---|---|
| Supported | Next.js, Hono, Expo Router, SvelteKit, TanStack Start, React Router | The full test matrix (unit and conformance tests, type tests, an example app), every guide, and triaged issues |
| Community | Astro, Edge Functions, Elysia, H3, Nuxt and Nitro 2, NestJS, Node, SolidStart | A smoke test that serves one request, a docs page with a community note, and fixes that may lag the supported tier |
New guides and features land on the supported adapters first. An adapter moves between the tiers when its usage changes: a community adapter that many apps run moves up, and a supported adapter that few apps run moves down in a minor release, with a changeset.
Last updated on