The fastest way to build apps with Next.js and Supabase
Features · Demo · Clone and run locally · Feedback and issues · More Examples · License
- Works across the entire Next.js stack
- App Router
- Pages Router
- Middleware
- Client
- Server
- It just works!
- supabase-ssr. A package to configure Supabase Auth to use cookies
- Styling with Tailwind CSS
- Components with shadcn/ui
- Optional deployment with Supabase Vercel Integration and Vercel deploy
- Environment variables automatically assigned to Vercel project
You can view a fully working demo at demo-nextjs-with-supabase.vercel.app.
-
You'll first need a Supabase project which can be made via the Supabase dashboard
-
Then you'll need a Doppler project to manage your secrets (doppler.com).
-
Create a Next.js app using the Supabase Starter template npx command
pnpm dlx create-next-app -e with-supabase
-
Use
cd
to change into the app's directorycd name-of-new-app
-
Delete
.env.local.example
. We'll use Doppler to inject the secrets for use. -
Install and setup Doppler CLI.
-
You can now run the Next.js local development server:
doppler run -- pnpm dev
The starter kit should now be running on localhost:3000. Secrets get injected by Doppler.
-
This template comes with the default shadcn/ui style initialized. If you instead want other ui.shadcn styles, delete
components.json
and re-install shadcn/ui
Check out the docs for Local Development to also run Supabase locally.
Please file feedback and issues over on the Supabase GitHub org.
- Next.js Subscription Payments Starter
- Cookie-based Auth and the Next.js 13 App Router (free course)
- Supabase Auth and the Next.js App Router
Licensed under the MIT license, Copyright © trueberryless.
See LICENSE for more information.