Deployment

Production Checklist

Environment variables

  1. NEXT_PUBLIC_SITE_URL should be set to your production domain (eg: https://yourapp.com)
  2. Your supabase Urls stay the same.
  3. Please consult your third party services for their production environment variable setting guidelines.

Supabase production checklist

  1. Ensure that you follow the supabase production checklist here
  2. If you are using Resend or any custom SMTP server (which you should on production), see how you can set it up here.

Enable Stripe live mode

  1. Enter live mode in stripe
  2. Grab the environment variables and ensure that you are entering the correct Stripe environment variables for in your hosting provider.

Setup Stripe webhooks

  • In the Stripe webhooks section setup a stripe webhook listener at https://yourapp.com/api/stripe/webhooks.
  • Click on Add an endpoint.
  • In the Listen to Stripe Events section add ` https://yourapp.com/api/stripe/webhooks ` as the endpoint.
  • Description is optional
  • Select ` Events on your account `.
  • Click on + Select events and select all events. Click on Add Events .
  • Click on Add ` Endpoint `. This will now sync Stripe to your product deployment.

First Deployment with Vercel

  1. https://vercel.com/guides/deploying-nextjs-with-vercel Follow this guide to setup Next.js deployment with Vercel.
  2. Deploy the app with and assign it your domain (eg: https://yourapp.com).

Stripe products

  1. Create at least one live mode product in Stripe so that it gets synced to your supabase database.
  2. It is important that your app is deployed and the Stripe webhooks are configured before you create a product in Stripe. Otherwise the product will not be synced to your supabase database.