Application Configuration

Learn how to setup the overall settings of your Next.js Supabase application

The application configuration is set at apps/web/config/app.config.ts. This configuration stores some overall variables for your application.

This configuration is set at application-level. The configuration gets propagated to the packages that the app imports, so you can control the behavior and logic of the package. This also allows you to host multiple apps in the same monorepo, as every application defines its own configuration.

The recommendation is to not update this directly - instead, please define the environment variables below and override the default behavior. The configuration is validated using the Zod schema AppConfigSchema, so if something is off, you'll see the errors.

const appConfig = AppConfigSchema.parse({ name: process.env.NEXT_PUBLIC_PRODUCT_NAME, title: process.env.NEXT_PUBLIC_SITE_TITLE, description: process.env.NEXT_PUBLIC_SITE_DESCRIPTION, url: process.env.NEXT_PUBLIC_SITE_URL, locale: process.env.NEXT_PUBLIC_DEFAULT_LOCALE, theme: process.env.NEXT_PUBLIC_DEFAULT_THEME_MODE, themeColor: process.env.NEXT_PUBLIC_THEME_COLOR, themeColorDark: process.env.NEXT_PUBLIC_THEME_COLOR_DARK, production, });

For example, to set the product name and app URL, you'd update the variables:

NEXT_PUBLIC_SITE_URL=https://myapp.com NEXT_PUBLIC_PRODUCT_NAME="My wonderful AI App"

Subscribe to our Newsletter
Get the latest updates about React, Remix, Next.js, Firebase, Supabase and Tailwind CSS