-
Notifications
You must be signed in to change notification settings - Fork 154
Description
Is your feature request related to a problem? Please describe.
The current demo is minimal and doesn’t reflect modern best practices or realistic usage with Supabase. I’d like to contribute a more complete demo setup while keeping the existing example intact for continuity.
To do this, I propose organizing the demo folder into versioned subdirectories so we can maintain Nuxt 3 and Nuxt 4 examples side‑by‑side:
demo/
nuxt3/ # Nuxt 3 demo (current demo with NUXT UI v3)
nuxt4/ # Nuxt 4 demo primarily to showcase Nuxt UI v4
Note: The Supabase features (e.g.,
.rpc()usage, RLS examples, and server‑side code) work in Nuxt 3 and Nuxt 4. The reason for a dedicatednuxt4demo is specifically to showcase Nuxt UI v4 in a realistic setup. As Nuxt UI v4 will be fully public, its more accessible to people and they can try and deploy it somewhere.
Describe the solution you'd like
Add two runnable demos with near‑feature parity:
Common features in both nuxt3 and nuxt4:
- Auth flow example (sign in/out, session handling, route protection/middleware, maybe user sign-up and Supabase Trigger setup)
- Supabase client usage with typed queries
.rpc()examples- Clear RLS (Row‑Level Security) example with a minimal schema + policy readme
- Server‑side examples (Nitro server routes /
server/apiusage) that securely call Supabase
Proposed folder structure
demo/
nuxt3/
README.md
.env.example
app/ # or pages/ depending on structure
server/
supabase/ # schema/example policies and seed
nuxt4/
README.md
.env.example
app/
server/
supabase/
Acceptance criteria
- Both demos start with
pnpm|npm|yarn installand a singledevcommand. - Both demos include a working auth example and protected route.
- Both demos include at least one
.rpc()example and a documented RLS scenario. - Server‑side example shows secure Supabase access (no secrets in client).
-
nuxt4demo uses Nuxt UI v4 components. - READMEs document setup (env vars), commands, and a quick tour of code.
Describe alternatives you've considered
- Only updating the current demo once Nuxt UI v4 is released.
Additional context
This change is non‑breaking and additive. It aims to give users a realistic, modern starting point for Nuxt + Supabase, while keeping the existing demo available and familiar.
I would start, once Nuxt UI v4 is officially released and production ready.