You will find the files at src/config/
. These files contains all the necessary settings for your project. Here are the required configuration files:
const config: Config = {
// REQUIRED - Name of the app
name: 'My Saas',
// REQUIRED — URL of the app
website:
process.env.NODE_ENV === 'production'
? 'https://example.com'
: 'http://localhost:3000',
// OPTIONAL — Theme of the app 'light' | 'dark' | 'system'
theme: {
general: 'light',
...
},
// REQUIRED — Payment processor Stripe or LemonSqueezy
paymentService: 'lemonsqueezy',
...
};
Authentication Configuration
const config: Config = {
...
auth: {
// REQUIRED — URL to redirect to after signing in ( e.g. '/dashboard' )
signInRedirectUrl: routes.dashboard,
// REQUIRED — URL to redirect to after signing up ( e.g. '/onboarding' )
signUpRedirectUrl: `${routes.verifyRequest}?type=email-verification`,
// REQUIRED — URL to redirect to after signing out ( e.g. '/' )
signOutRedirectUrl: routes.home,
// OPTIONAL — Enable sign up (true = enabled, false = disabled)
signUpEnabled: true,
// OPTIONAL — Additional authentication method besides OAuth => 'credentials' | 'magic-link' | null (null = only OAuth)
additionalAuthMethod: 'magic-link',
// OPTIONAL — Magic link expiration time in minutes
magicLinkExpiresIn: 60 * 24, // 24 hours
// OPTIONAL — Reset password expiration time in minutes
resetPasswordExpiresIn: 60 * 24, // 24 hours
},
...
};
SEO Configuration
const config: Config = {
...
// REQUIRED - SEO settings for (e.g. Title, Description)
seo: {
// REQUIRED — Title of the app
title: 'Page title',
// REQUIRED — Description of the app
description: 'Meta description',
},
...
};
Email Configuration
const config: Config = {
...
// REQUIRED - Email settings
email: {
server: {
host: "smtp.example.com", // SMTP server host
port: 587, // SMTP server port
auth: {
user: process.env.SMTP_USER, // SMTP server username
pass: process.env.SMTP_PASS, // SMTP server password
},
},
from:
process.env.NODE_ENV === 'production'
? 'no-reply@example.com'
: 'onboarding@resend.dev', // REQUIRED — Email address for sending emails
support: 'help@example.com', // REQUIRED — Email address for support
lists: {
waitlist: 'waitlist-tag', // OPTIONAL — ID or Name of the waitlist
},
},
...
};
Optional Features
Affiliate Program
Set up the affiliate program in the configuration file. The affiliate program will be displayed on the specified routes. See more about the affiliate program here.
const config: Config = {
...
affiliate: {
enabled: true, // Enable or disable the affiliate program
name: "Partner Program" // Lemonsqueezy affiliate program name
}
...
};
Set up the support widget in the configuration file. The support widget will be displayed on the specified routes. See more about the support widget here.
const config: Config = {
...
support: {
showOnRoutes: [routes.home] // OPTIONAL — Routes to show the support widget
}
...
};
Set up your social media links in the configuration file. These links will be displayed in the footer of your website.
const config: Config = {
...
socials: {
x: "https://x.com/example",
discord: "https://discord.gg/example",
youtube: "https://youtube.com/@example",
instagram: "https://instagram.com/example",
tiktok: "https://tiktok.com/@example",
}
...
};