Repository navigation
docs: add typechecked framework bridges for middleware entries - #168
Merged
Merged
Conversation
commit: |
tomaspozo
reviewed
Sep 22, 2026
mandarini
force-pushed
the
docs/framework-bridges
branch
from
September 23, 2026 10:45
bf89cda to
dc4a22a
Compare
mandarini
force-pushed
the
docs/framework-bridges
branch
from
September 28, 2026 11:14
2e3c05a to
506943c
Compare
tomaspozo
approved these changes
Sep 29, 2026
mandarini
force-pushed
the
docs/framework-bridges
branch
from
September 29, 2026 12:17
0410bb4 to
7baca95
Compare
mandarini
added a commit
to supabase/supabase
that referenced
this pull request
Sep 29, 2026
Adds a Frameworks partial to the `@supabase/server` reference, after Installing. It explains how to run `@supabase/middleware` entries inside Hono, H3, Elysia, NestJS, and TanStack Start through a copyable bridge, and how to move off the framework adapters: the auth trap (`withRequiredClaims` versus `withClaims`), the `userClaims` to `jwtClaims` field remap, how each framework scopes an entry array to a group of routes, what CORS and body access cost on NestJS, the step-by-step procedure, and a prompt to hand to a coding agent. The bridge code for all five frameworks lives in supabase/server#168 and is linked, not copied. Resolves [SDK-1599](https://linear.app/supabase/issue/SDK-1599) and [SDK-1862](https://linear.app/supabase/issue/SDK-1862): the retired `withSupabase({ middleware })` form is gone from the text. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added integration guidance and setup examples for Hono, H3/Nuxt, Elysia, NestJS, and TanStack Start, including framework-specific context, response, and route-scoping behavior. * Documented migration options for authentication requirements, changes to context and JWT claims, and differences in response and error handling. * Added a TanStack Start bridge example and migration and verification checklists. * Added the frameworks guide to the API reference navigation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
examples/frameworks/with a copyable, typechecked bridge and a minimal app for Hono, H3, Elysia, NestJS, and TanStack Start. Each bridge runs a@supabase/middlewareentry array inside the framework's own middleware slot, folds the pipeline once so entries keep their state across requests, and fails to compile at the call site on duplicate keys or missing prerequisites. A newtypecheck:examplesscript runs in CI and lint covers the folder. Nothing ships to npm, and the root package gains no dependency:examples/package.jsonis a private pnpm workspace package that holds what only the examples need (@tanstack/react-startand its React peers). Verified with typecheck, lint, the unit suite, negative compile cases, a runtime script that drives the Hono, H3, and Elysia bridges with real requests, and a runtime check of the TanStack Start body buffering. Tomás's five-app suite insupabase/server-examplesproduced the round-two findings this PR folds in: Nest CORS and body limits, Hono per-route scoping, and the TanStack Start bridge as a repo file. The guide that explains the bridges and the adapter migration is supabase/supabase#50514; tracked in SDK-1599.Blocks: supabase/supabase#50514