Site, Navigation & Metadata

Configure site metadata, navigation, and branding.

Site-wide settings live in src/config. These plain TypeScript modules drive branding, navigation, social links, and routes, while page metadata (title, description, metadataBase) is set in the root locale layout.

Important files

FileRole
src/config/website-config.tsSocial handles + mail (fromEmail, supportEmail)
src/config/social-config.tsBuilds the social-link list from website-config
src/config/footer-config.tsFooter columns (translated via next-intl)
src/config/route-config.tsThe Routes enum — every internal path
src/config/user-sidebar-config.tsDashboard sidebar nav (role-aware)
src/config/docs-sidebar-config.tsManual docs sidebar links
src/app/[locale]/layout.tsx<head> metadata + metadataBase
src/app/[locale]/(marketing)/opengraph-image.tsxSocial share image

Branding & contact: website-config.ts

This is the first file to edit when you rebrand. It holds social profile URLs and the addresses used for outgoing and inbound mail:

src/config/website-config.ts
export const websiteConfig: WebsiteConfig = {
  metadata: {
    social: {
      github: "https://github.com/your-username",
      twitter: "https://twitter.com/your-username",
      // linkedin, facebook, instagram, tiktok, telegram…
    },
  },
  mail: {
    provider: "resend",
    fromEmail: "SoarStarter <noreply@mail.soarstarter.com>",
    supportEmail: "contact@soarstarter.com",
  },
};

social-config.ts reads these values and returns only the links that are set, so removing a handle removes its icon. fromEmail/supportEmail feed the email flows.

  • Footerfooter-config.ts exports getFooterLinks(t), grouping links into Product / Resources / Company / Legal columns. It takes a next-intl translator t, so column and link labels come from messages/*.json; the hrefs come from the Routes enum.
  • Routesroute-config.ts centralises every internal path as a Routes enum (Routes.Pricing, Routes.AuthLogin, Routes.Dashboard, …). Reference the enum instead of hardcoding strings so paths stay consistent.
  • Dashboard sidebaruser-sidebar-config.ts exports getSidebarLinks() with role-aware items (roles: ["admin"]). When NEXT_PUBLIC_IS_DEMO is true, admin links are shown to everyone for the demo.

Metadata

Page metadata is defined in the locale root layout, not in a config file:

src/app/[locale]/layout.tsx
export const metadata: Metadata = {
  metadataBase: new URL(
    process.env.NEXT_PUBLIC_SITE_URL ?? "https://soarstarter.com",
  ),
  title: "SoarStarter Next",
  description:
    "SoarStarter is a production-oriented SaaS template built with Next.js…",
};

metadataBase resolves relative Open Graph / canonical URLs, so set NEXT_PUBLIC_SITE_URL in production. Individual pages can export their own metadata or generateMetadata to override the title and description.

The Open Graph image is not centralized. The social share card is its own file, (marketing)/opengraph-image.tsx, rendered with next/og — editing website-config.ts or the layout does not change it. Update that component (or replace it with a static opengraph-image.png) separately.

Rebrand checklist

Names & copy

Set the title/description in src/app/[locale]/layout.tsx, and update user-facing strings in messages/en.json and messages/zh.json.

Update social handles and fromEmail/supportEmail in website-config.ts. Adjust footer columns in footer-config.ts if your sections differ.

URLs

Set NEXT_PUBLIC_SITE_URL so metadataBase and absolute links are correct.

Share image & favicon

Edit (marketing)/opengraph-image.tsx and replace the icons under src/app/[locale] / public/.

On this page