Checklist
Let's deploy your TurboStarter app to production!
When you're ready to deploy your project to production, follow this checklist.
This process may take a few hours and some trial and error, so buckle up — you're almost there!
Create Supabase project
Why it's necessary?
Creating a Supabase project is the foundational step to set up your database, authentication, and storage services in the cloud. This will serve as the backend for your SaaS application.
How to do it?
- Go to Supabase and sign up for an account if you don't already have one.
- Click on the Create a new project button.
- Enter your project name, region, and organization.
- Click on the Create project button.
Migrate database
Why it's necessary?
Pushing database migrations ensures that your database schema in the remote Supabase instance is configured to match TurboStarter's requirements. This step is crucial for the application to function correctly.
How to do it?
You basically have two possibilities of doing a migration:
TurboStarter comes with predefined Github Action to handle database migrations. You can find its definition in the .github/workflows/publish-db.yml
file.
What you need to do is to set your DATABASE_URL
as a secret for your Github repository.
Then, you can run the workflow which will publish the database schema to your remote database instance.
Setup auth redirect URLs
Why it's necessary?
Setting up the correct redirect URLs for authentication is critical for enabling OAuth flows and redirecting users correctly during authentication.
How to do it?
Set your APP URL in the Supabase project settings. Add the path /api/auth/callback
to the allowed URLs.
Configure OAuth Providers
Why it's necessary?
Configuring OAuth providers like Google ensures that users can log in using their existing accounts, enhancing user convenience and security. This is all done externally, in both Google and Supabase - not in the application code.
How to do it?
Set up the OAuth providers in your Supabase project settings. E.g. for Google Auth, you would need to create a Google Cloud project and set up the OAuth credentials.
Setup billing provider
Why it's necessary?
Well - you want to get paid, right? Setting up billing ensures that you can charge your users for using your SaaS application, enabling you to monetize your service and cover operational costs.
How to do it?
- Create a Stripe or Lemon Squeezy account.
- Update the environment variables with the correct values for your billing service.
- Point webhooks from Stripe or Lemon Squeezy to
/api/webhooks/billing
. - Refer to the relevant documentation for more details on setting up billing.
Environment variables
Why it's necessary?
Setting the correct environment variables is essential for the application to function correctly. These variables include API keys, database URLs, and other configuration details required for your app to connect to various services.
-
How to do it?
Use our
.env.example
files to get the correct environment variables for your project. Then add them to your hosting provider's environment variables. Redeploy the app once you have the URL to set in the environment variables.
Deploy web app to production
Why it's necessary?
Because your users are waiting! Deploying your Next.js app to a hosting provider makes it accessible to users worldwide, allowing them to interact with your application.
How to do it?
Deploy your Next.js app to Vercel or another hosting provider. Copy the deployment URL and set it in your Supabase project settings.
That's it! Your app is now live and accessible to your users, good job! 🎉
Other things to consider:
- Update the legal pages with your company's information (privacy policy, terms of service, etc.).
- Remove the placeholder blog and documentation content / or replace it with your own.
- Customize the authentication emails.
- Update the favicon and logo with your own branding.
- Update the FAQ and other static content with your own information.
Last updated on