Configuration
Learn how to configure your supastarter application.
supastarter is a highly flexible and customizable starter kit and allow you to configure the project to your needs. You can find the main config file in the config/index.ts
file in the repository.
This section will cover all configuration options and when to use them.
Config file
You can find the configuration object in the config/index.ts
file in the repository.
Use cases
The configuration options enable you to set up lots of different use cases. Here are some examples:
Deploy marketing page only
If you want to deploy the marketing page only, you can set the ui.saas.enabled
option to false
. This will disable the saas part of the application and redirect requests to the marketing page.
To not have to manually set this option while developing locally, you can define an environment variable NEXT_PUBLIC_SAAS_ENABLED
in your .env
file and use this in the file file.
This way you can set the deployed version to false
while enabling the development version to true
.
Disable marketing page
If you want to ship the marketing page separately and just use the SaaS part of supastarter, you can simply disable the marketing part of the application. This will redirect all requests to the SaaS part or the login page if the user is not authenticated.
Multi-tenant application
If you want to use supastarter as a multi-tenant application, you can use the following configuration. This will
- require users to be in an organization
- hide the organization from the user
- redirect users to the organization page after sign in
With this setup, you can have two different behaviors for creating organizations.
- Users can create an initial organizations (and no further)
- Only admins can create organizations
To enable the second behavior, you can set the auth.enableSignup
option to false
. This way users can only join if they are invited to an organization and organizations can only be created by admins.
Enable/disable onboarding
There is a prepared onboarding form, which allows users to set up their profile after sign up. If you want to disable it, you can set the users.enableOnboarding
option to false
.
Attach billing to users or organizations
You can attach billing to users or organizations. To enable this for either one, you can set the enableBilling
option to true
.
In theory, you can have both enabled at the same time, but for most use cases you want to attach it to only one of them.
Disable organizations
If you don't want to use organizations, you can set the organizations.enable
option to false
. This will disable the organizations feature totally.
Customize authentication
You can easily (de)activate authentication methods like social login, passkeys, password login and magic links.