App Configuration & Branding

How to configure the site name, URLs, metadata, and other app-level settings.

Last updated:

Site settings in the database

BloggFast stores site-wide configuration in the SiteSettings database table (a singleton record with id "default"). Admin users can edit these at /admin/settings. Settings include:

FieldDescriptionDefault
siteNameYour blog's display nameAI Blog
siteDescriptionDefault meta description for SEO
siteUrlProduction URL of your site
logoUrlURL to your logo image
ogImageUrlDefault Open Graph image URL
featuredSlugSlug of the article featured in the hero section
twitterHandleYour Twitter/X handle for SEO meta tags
socialLinksJSON object with social media URLs{}
trendingLogicAlgorithm for trending articles: score or viewsscore

Tip

Run the seed script (npm run db:seed) to create the default SiteSettings and AiSettings records. Without them, the settings pages in the admin will show empty forms.

Global metadata in layout.tsx

The root src/app/layout.tsx exports a metadata object that sets default title, description, and Open Graph tags for all pages. Override this on any individual page by exporting a metadata object from that page's page.tsx, or using generateMetadata for dynamic pages.

Next.js configuration

Key settings in next.config.ts:

next.config.ts
const nextConfig: NextConfig = {
  reactCompiler: true,  // Enables React Compiler for automatic memoization
  images: {
    remotePatterns: [
      { protocol: "https", hostname: "cdn.sanity.io" },        // Sanity images
      { protocol: "https", hostname: "images.unsplash.com" },  // Stock photos
      { protocol: "https", hostname: "lh3.googleusercontent.com" }, // Google avatars
      { protocol: "https", hostname: "avatars.githubusercontent.com" }, // GitHub avatars
    ],
  },
  experimental: {
    serverActions: {
      bodySizeLimit: "4mb",  // Increased for image uploads
      allowedOrigins: ["demo.blogg.fast", "blogg.fast", "*.blogg.fast"],
    },
  },
};

Update the allowedOrigins array to include your production domain when deploying. This is required for Server Actions to work correctly from your domain.

Add any additional image hostnames you use (e.g., your own CDN, S3 bucket, or other image providers) to the remotePatterns array.

Quick branding changes

For the most common branding customizations:

WhatWhere to change
Site name & descriptionAdmin Dashboard → Settings → Site Settings (updates the database)
FaviconReplace src/app/favicon.ico
Colorssrc/app/globals.css → CSS custom properties / Tailwind v4 theme
Fontssrc/app/layout.tsx → Google Font imports via next/font
LogoUpdate the logo component in your navbar component
Social linksAdmin Dashboard → Settings → Site Settings → Social Links (JSON field)
Allowed image domainsnext.config.tsimages.remotePatterns
Server Action originsnext.config.tsexperimental.serverActions.allowedOrigins