LogoTanStarter Docs
LogoTanStarter Docs
HomepageIntroductionCodebaseGetting StartedEnvironments
Configuration
Deployment

Integrations

CloudflareDatabaseAuthenticationEmailNewsletterStoragePaymentNotificationsAnalyticsChatboxAffiliates

Customization

MetadataPagesLanding PageBlogComponentsUser ManagementAPI Key Management

Codebase

Project StructureFormatting & LintingEditor SetupUpdating the Codebase
X (Twitter)

Website Configuration

Core settings for your TanStarter website

The main configuration file that contains the core settings for the website.

TanStarter has already set up the default core settings for you, and you can customize the core settings in this file src/config/website.ts.

src/config/website.ts
export const websiteConfig: WebsiteConfig = {
  ui: {
    // UI settings
  },
  metadata: {
    // Metadata settings
  },
  social: {
    // Social media settings
  },
  auth: {
    // Auth settings
  },
  blog: {
    // Blog settings
  },
  affiliates: {
    // Affiliates settings
  },
  mail: {
    // Mail settings
  },
  newsletter: {
    // Newsletter settings
  },
  notification: {
    // Notification settings
  },
  storage: {
    // Storage settings
  },
  payment: {
    // Payment settings
  },
};

UI

Controls the appearance of your website.

Mode

Controls the light/dark mode settings:

PropertyTypeDescription
defaultMode'light' | 'dark' | 'system'Sets the default display mode
enableSwitchbooleanWhen true, allows users to toggle between light/dark modes

Example:

src/config/website.ts
ui: {
  mode: {
    defaultMode: 'system', // Choose from: light, dark, system
    enableSwitch: true,    // Allow users to switch modes
  },
}

Metadata

Controls the metadata of your website. The metadata configuration consists of several subsections:

Basic Information

Defines the basic metadata for the website:

PropertyTypeDescription
namestringWebsite name, used for branding
titlestringWebsite title, used for browser tabs and SEO
descriptionstringWebsite description, used for search engines and social media previews

Example:

src/config/website.ts
metadata: {
  name: messages.site.name,
  title: messages.site.title,
  description: messages.site.description,
  // ...
}

Images

Defines the images used for branding and social sharing:

PropertyTypeDescription
ogImagestringURL to the Open Graph image used for social media previews
logoLightstringURL to your logo image for light mode
logoDarkstringURL to your logo image for dark mode

Example:

src/config/website.ts
metadata: {
  images: {
    ogImage: '/og.png',      // Open Graph image for social sharing
    logoLight: '/logo.png',  // Logo displayed in light mode
    logoDark: '/logo-dark.png', // Logo displayed in dark mode
  },
  // ...
}

You can find more about customizing the images in the Images documentation.

Social Media

Configure links to your social media profiles. In TanStarter, social is a top-level key in websiteConfig (not nested under metadata):

PropertyTypeDescription
githubstringURL to GitHub profile or repository
twitterstringURL to Twitter/X profile
blueSkystringURL to Bluesky profile
discordstringURL to Discord server
mastodonstringURL to Mastodon profile
linkedinstringURL to LinkedIn profile
youtubestringURL to YouTube channel
facebookstringURL to Facebook page
instagramstringURL to Instagram profile
tiktokstringURL to TikTok profile
telegramstringURL to Telegram group or channel

Example:

src/config/website.ts
social: {
  github: 'https://github.com/YourOrganization',
  twitter: 'https://x.com/YourHandle',
  discord: 'https://discord.gg/your-invitation-code',
  youtube: 'https://youtube.com/@YourChannel',
}

These social media links are used by the Social Media Configuration to generate the appropriate links across the website.

Auth

Configure authentication options for your website:

PropertyTypeDescription
enablebooleanWhen true, enables authentication
enableGoogleLoginbooleanWhen true, enables Google login
enableCredentialLoginbooleanWhen true, enables credential login
enableDeleteAccountbooleanWhen true, allows users to delete their account

Example:

src/config/website.ts
auth: {
  enable: true,
  enableGoogleLogin: true,
  enableCredentialLogin: true,
  enableDeleteAccount: true,
}

TanStarter supports Google OAuth and email/password authentication. You can selectively disable specific providers using these configuration options:

  • Set enableGoogleLogin to false to remove Google login option
  • Set enableCredentialLogin to false to remove credential login

Note: Please ensure at least one login method is enabled, otherwise users will not be able to log in.

You can find more about authentication options in the Authentication documentation.

Blog

Configure the blog functionality:

PropertyTypeDescription
enablebooleanWhether to enable the blog or not, default is true
paginationSizenumberNumber of posts to display per page

Example:

src/config/website.ts
blog: {
  enable: true,
  paginationSize: 6,
}

If you don't need the blog functionality, you can set enable to false, then the blog menus will not be shown in the navbar and footer, and the blog related pages will not be included in the sitemap.

You can find more about blog configuration in the Blog documentation.

Mail

Configure email services:

PropertyTypeDescription
enablebooleanWhether to enable email functionality, default is true
provider'resend'Email service provider (currently only Resend is supported)
fromEmailstringContact email for sending emails
supportEmailstringContact email for receiving emails

Example:

mail: {
  enable: true,
  provider: 'resend',
  fromEmail: 'contact@example.com',
  supportEmail: 'support@example.com',
}

You can find more about mail configuration in the Email documentation.

Newsletter

Configure newsletter services:

PropertyTypeDescription
enablebooleanWhether to enable the newsletter or not, default is true
provider'resend'Newsletter service provider (currently only Resend is supported)
autoSubscribeAfterSignUpbooleanWhether to automatically subscribe users after sign up

Example:

src/config/website.ts
newsletter: {
  enable: true,
  provider: 'resend',
  autoSubscribeAfterSignUp: true,
}

If you don't need the newsletter functionality, you can set enable to false, then the subscription status will not be shown in the notification settings page.

You can find more about newsletter configuration in the Newsletter documentation.

Storage

Configure file storage:

PropertyTypeDescription
enablebooleanWhether to enable the storage or not, default is true
provider'r2'Storage provider (currently only R2 is supported)
maxFileSizenumberMaximum file size in bytes
allowedTypesstring[]Allowed file MIME types
userFilesFolderstringFolder name for user uploaded files

Example:

src/config/website.ts
storage: {
  enable: true,
  provider: 'r2',
  maxFileSize: DEFAULT_MAX_FILE_SIZE,
  allowedTypes: DEFAULT_ALLOWED_TYPES,
  userFilesFolder: DEFAULT_USER_FILES_FOLDER,
}

If you don't need the storage functionality, you can set enable to false, then the update avatar functionality in the settings page will not be available.

You can find more about storage configuration in the Storage documentation.

Notification

Configure notification services:

PropertyTypeDescription
enablebooleanWhether to enable notification functionality, default is true
provider'discord'Notification provider (currently only Discord is supported)

Example:

src/config/website.ts
notification: {
  enable: true,
  provider: 'discord',
}

You can find more about notification configuration in the Notification documentation.

Affiliates

Configure affiliate program settings:

PropertyTypeDescription
enablebooleanWhether to enable affiliate functionality, default is false
provider'affonso' | 'promotekit'The affiliate provider to use

Example:

src/config/website.ts
affiliates: {
  enable: true,
  provider: 'affonso', // or 'promotekit'
}

You can find more about affiliates configuration in the Affiliates documentation.

Payment

Configure payment processing services. The payment section includes both the payment provider settings and price plan configuration:

PropertyTypeDescription
enablebooleanWhether to enable the payment or not, default is true
provider'stripe'Payment processor (currently only Stripe is supported)
priceobjectPrice plans configuration (see below)

Example:

src/config/website.ts
payment: {
  enable: true,
  provider: 'stripe',
  price: {
    plans: {
      // ... price plans
    },
  },
}

You can find more about payment configuration in the Payment documentation.

Price Plans

Each price plan in the payment.price.plans object can have the following properties:

PropertyTypeDescription
idstringUnique identifier for the plan
namestring?Display name of the plan
descriptionstring?Description of the plan features
featuresstring[]?List of features included in this plan
limitsstring[]?List of limits for this plan
pricesPrice[]List of price options for the plan (monthly, yearly, one-time, etc.)
isFreebooleanWhether this is a free plan
isLifetimebooleanWhether this is a lifetime (one-time payment) plan
popularboolean?Whether to highlight this plan as popular
disabledboolean?Whether to disable this plan in UI

The prices array contains objects with the following structure:

PropertyTypeDescription
type'subscription' | 'one_time'Type of payment (subscription or one-time)
priceIdstringStripe price ID (not product ID)
amountnumberPrice amount in currency units (dollars, euros, etc.)
currencystringCurrency code (e.g., USD)
interval'month' | 'year'?Billing interval for recurring payments
trialPeriodDaysnumber?Free trial period in days
allowPromotionCodeboolean?Whether to allow promotion code for this price
disabledboolean?Whether to disable this price in UI

TanStarter uses three price plans by default: Free plan, Pro subscription plan (monthly/yearly), and Lifetime plan (one-time payment), as shown in the website configuration:

src/config/website.ts
price: {
  plans: {
    free: {
      id: 'free',
      prices: [],
      isFree: true,
      isLifetime: false,
    },
    pro: {
      id: 'pro',
      prices: [
        {
          type: 'subscription',
          priceId: clientEnv.VITE_STRIPE_PRICE_PRO_MONTHLY!,
          amount: 990,
          currency: 'USD',
          interval: 'month',
          trialPeriodDays: 7,
        },
        {
          type: 'subscription',
          priceId: clientEnv.VITE_STRIPE_PRICE_PRO_YEARLY!,
          amount: 9900,
          currency: 'USD',
          interval: 'year',
          trialPeriodDays: 7,
        },
      ],
      isFree: false,
      isLifetime: false,
      popular: true,
    },
    lifetime: {
      id: 'lifetime',
      prices: [
        {
          type: 'one_time',
          priceId: clientEnv.VITE_STRIPE_PRICE_LIFETIME!,
          amount: 19900,
          currency: 'USD',
          allowPromotionCode: true,
        },
      ],
      isFree: false,
      isLifetime: true,
    },
  },
},

When to set price plans or prices as disabled?

  • Set a price plan to disabled: true when the price plan is not available for new customers, but you need to keep it for existing users who have already purchased it.

  • Set a price to disabled: true when that specific price is not available anymore, but existing subscribers on that price should still be able to see it in the billing page.

You can find more about price configuration in the Payment documentation.

Next Steps

Now that you understand the website configuration, explore these related topics:

Navbar Configuration

Configure the navigation menu in the header

Footer Configuration

Configure the links in the website footer

Payment Integration

Set up payment processing with Stripe

Sidebar Configuration

Configure the navigation menu for dashboard

Table of Contents

UI
Mode
Metadata
Basic Information
Images
Social Media
Auth
Blog
Mail
Newsletter
Storage
Notification
Affiliates
Payment
Price Plans
Next Steps