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
| File | Role |
|---|---|
src/config/website-config.ts | Social handles + mail (fromEmail, supportEmail) |
src/config/social-config.ts | Builds the social-link list from website-config |
src/config/footer-config.ts | Footer columns (translated via next-intl) |
src/config/route-config.ts | The Routes enum — every internal path |
src/config/user-sidebar-config.ts | Dashboard sidebar nav (role-aware) |
src/config/docs-sidebar-config.ts | Manual docs sidebar links |
src/app/[locale]/layout.tsx | <head> metadata + metadataBase |
src/app/[locale]/(marketing)/opengraph-image.tsx | Social 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:
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.
Navigation
- Footer —
footer-config.tsexportsgetFooterLinks(t), grouping links into Product / Resources / Company / Legal columns. It takes a next-intl translatort, so column and link labels come frommessages/*.json; the hrefs come from theRoutesenum. - Routes —
route-config.tscentralises every internal path as aRoutesenum (Routes.Pricing,Routes.AuthLogin,Routes.Dashboard, …). Reference the enum instead of hardcoding strings so paths stay consistent. - Dashboard sidebar —
user-sidebar-config.tsexportsgetSidebarLinks()with role-aware items (roles: ["admin"]). WhenNEXT_PUBLIC_IS_DEMOistrue, admin links are shown to everyone for the demo.
Metadata
Page metadata is defined in the locale root layout, not in a config file:
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.
Links & contact
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/.
