A comprehensive guide to using and customizing this SaaS starter template to build your own subscription-based web application.
This section describes the complete process for locally running the application, including Supabase and Stripe integration.
For proper connection of the application to the remote (production) Supabase project, several steps need to be performed through the Supabase CLI.
First, you need to authenticate in the Supabase CLI using the command:
When executed, you will be prompted to enter an access token, which can be obtained in your user account at supabase.com/account/tokens.
After successful login, you need to link the local project with a specific Supabase project. This is done by entering the unique project identifier, the so-called project reference, which is part of the URL of the given Supabase project.
After linking, all existing migrations are deployed to the database using the command:
This step ensures that the database structure in the remote environment corresponds to the design defined in the project.
Note: Before applying migrations, it is recommended to check their content to avoid unwanted changes in the production database.
Create a .env
file in the root directory of the project and add the following variables:
After successfully connecting to the backend services and setting up the configuration variables, you need to install all the necessary dependencies for the frontend part of the application. This is done with the following command in the terminal:
Start the application in development mode with the command:
This will start the local server and the application will be available at:
This mode allows continuous testing and debugging of the application during development.
Stripe integration is not necessary for basic startup, but it is recommended for full application functionality. Stripe keys need to be inserted into the .env file - these keys are available on the Stripe website.
This template uses Supabase for authentication. To configure authentication:
To set up Stripe for subscription payments: