An opinionated Next.js template built with TypeScript, Tailwind CSS, Supabase (Auth and Database), and ESLint.
NEXT_PUBLIC_SUPABASE_ANON_KEY=
NEXT_PUBLIC_SUPABASE_URL=
SUPABASE_ANON_KEY= # same as NEXT_PUBLIC version
SUPABASE_URL= # same as NEXT_PUBLIC version
SUPABASE_SERVICE_ROLE_KEY= #optional
If deploying to Vercel, you can use the Supabase integration to automatically set these environment variables. You can then pull these locally using
npx vercel env pull .env
Note: If you want to have multiple Supabase environments, you'll need to add the variables individually in the Vercel dashboard.
After creating a Supabase project, you'll need to also setup the Providers in the Auth section. This template currently has support for GitHub and Magic Link login.
You'll need to add the following secrets to your GitHub repository:
SUPABASE_PROJECT_ID
SUPABASE_DB_PASSWORD
SUPABASE_ACCESS_TOKEN
- Install the Supabase CLI
- Login to Supabase using
supabase login
- Link your project using
supabase link
- Run
supabase start
to start the local Supabase instance - Run
supabase db push
to push the database schema to the local instance - Run
supabase db stop
to stop the local instance
First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.