Nextbase Docs
Installation

Dev environment

Setup your dev environment for the Supabase Stripe Starter Kit. Link your repository to Supabase, setup env variables, and run your dev server.

Setup env variables

In your repository directory, you should have a .env.local.example file which looks like this. Create a .env.local file right e it but instead of dummy values like YOUR_SUPABASE_PROJECT_REF, fill the actual details.

    # supabase
    # These values never change when supabase is ran locally regardless of project
    NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321/
    NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
    SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
    SUPABASE_DATABASE_PASSWORD=postgres
    SUPABASE_JWT_SECRET=super-secret-jwt-token-with-at-least-32-characters-long
    # SUPABASE_PROJECT_REF=SUPABASE_PROJECT_REF
    # stripe
    STRIPE_SECRET_KEY=STRIPE_SECRET_KEY
    NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
    STRIPE_WEBHOOK_SECRET=STRIPE_WEBHOOK_SECRET
    # host
    NEXT_PUBLIC_SITE_URL=http://localhost:3000
    # email
    ADMIN_EMAIL=admin@myapp.com
    RESEND_API_KEY=RESEND_API_KEY
    # analytics
    # ultimate and pro
    NEXT_PUBLIC_POSTHOG_API_KEY=NEXT_PUBLIC_POSTHOG_API_KEY
    NEXT_PUBLIC_POSTHOG_APP_ID=NEXT_PUBLIC_POSTHOG_APP_ID
    NEXT_PUBLIC_POSTHOG_HOST=NEXT_PUBLIC_POSTHOG_HOST
    NEXT_PUBLIC_GA_ID=NEXT_PUBLIC_GA_ID
    UNKEY_ROOT_KEY=UNKEY_ROOT_KEY
    UNKEY_API_ID=UNKEY_API_ID

Run your dev server

We are ready to start our dev server. Run

pnpm dev

Our local development server is now running at localhost:3000.

On this page