LogoNEXTDEVKIT Docs

Website Configuration

Core settings for your NEXTDEVKIT website

The main configuration file that contains the core settings for the website. NEXTDEVKIT has already set up the default core settings for you, and you can customize the core settings in this file src/config/index.ts.

Core Configuration Structure

export const appConfig = {
  metadata: {
    // Website metadata and branding
  },
  ui: {
    // User interface settings
  },
  blog: {
    // Blog configuration
  },
  mail: {
    // Email service configuration
  },
  i18n: {
    // Internationalization settings
  },
  auth: {
    // Authentication settings
  },
  settings: {
    // Application settings
  },
  storage: {
    // Storage configuration
  },
  payment: {
    // Payment and pricing configuration
  },
} as const satisfies AppConfig;

🎨 Metadata Configuration

Controls the appearance and branding of your website:

PropertyTypeDescription
namestringApplication name displayed in the UI
titlestringSEO title for the website
descriptionstringSEO description for the website
imagesobjectLogo and social media images
keywordsstring[]SEO keywords for search engines

Images Configuration

PropertyTypeDescription
logoLightstringPath to logo for light mode
logoDarkstringPath to logo for dark mode
ogImagestringOpen Graph image for social sharing

Example:

metadata: {
  name: "NEXT DEV KIT",
  title: "NEXTDEVKIT - Next.js Starter Kit",
  description: "The Ultimate Next.js Starter Kit for Your Next Project",
  images: {
    logoLight: "/logo-light.svg",
    logoDark: "/logo-dark.svg",
    ogImage: "/og-image.png",
  },
  keywords: [
    "Next.js",
    "Starter Kit",
    "Next.js SaaS Template",
    "Next.js Boilerplate",
  ],
}

🎨 UI Configuration

Controls the user interface theme and appearance:

PropertyTypeDescription
theme.enabledbooleanWhether theme switching is enabled
theme.defaultMode"system" | "light" | "dark"Default theme mode

Example:

ui: {
  theme: {
    enabled: true,
    defaultMode: "system", // Choose from: light, dark, system
  },
}

📝 Blog Configuration

Configure the blog functionality:

PropertyTypeDescription
paginationnumberNumber of blog posts per page

Example:

blog: {
  pagination: 3,
}

📧 Mail Configuration

Configure email services:

PropertyTypeDescription
provider"resend" | "plunk"Email service provider
fromstringDefault sender email address
contactstringContact email for receiving emails

Example:

mail: {
  provider: "resend",
  from: "noreply@nextdevkit.com",
  contact: "contact@nextdevkit.com",
}

🌍 Internationalization (i18n) Configuration

Configure language support for your application:

PropertyTypeDescription
enabledbooleanWhether i18n is enabled
defaultLocalestringDefault language locale
localesRecord<string, { name: string }>Available languages
localeCookieNamestringCookie name for storing locale preference

Example:

i18n: {
  enabled: true,
  defaultLocale: "en",
  locales: {
    en: { name: "English" },
    zh: { name: "简体中文" },
  },
  localeCookieName: "NEXT_LOCALE",
}

🔐 Authentication Configuration

Configure authentication options:

PropertyTypeDescription
enableSocialLoginbooleanEnable social login providers
enablePasswordLoginbooleanEnable email/password authentication
redirectAfterSignInstringRedirect path after successful login
redirectAfterLogoutstringRedirect path after logout

Example:

auth: {
  enableSocialLogin: true,
  enablePasswordLogin: true,
  redirectAfterSignIn: "/app/dashboard",
  redirectAfterLogout: "/",
}

⚙️ Settings Configuration

Configure application settings:

PropertyTypeDescription
account.canChangeEmailbooleanWhether users can change their email

Example:

settings: {
  account: {
    canChangeEmail: true,
  },
}

📁 Storage Configuration

Configure file storage:

PropertyTypeDescription
providerstringStorage provider (e.g., "s3")
bucketNamesRecord<string, string>Named buckets for different file types

Example:

storage: {
  provider: "s3",
  bucketNames: {
    avatars: process.env.NEXT_PUBLIC_AVATARS_BUCKET_NAME || "avatars",
  },
}

💳 Payment Configuration

Configure payment processing and pricing plans:

PropertyTypeDescription
provider"stripe"Payment processor
currencystringCurrency code (e.g., "USD")
redirectAfterCheckoutstringRedirect path after successful payment
plansRecord<string, PricePlan>Available pricing plans

Pricing Plans Structure

Each plan in the plans object has the following structure:

PropertyTypeDescription
idstringUnique identifier for the plan
isLifetimebooleanWhether this is a lifetime plan
popularbooleanWhether to highlight as popular
highlightedbooleanWhether to highlight the plan
pricesPrice[]Array of price options

Price Structure

PropertyTypeDescription
typePaymentTypePayment type (ONE_TIME, RECURRING)
priceIdstringStripe price ID
amountnumberPrice amount in currency units

Example:

payment: {
  provider: "stripe",
  currency: "USD",
  yearlyDiscount: 20,
  redirectAfterCheckout: "/app/dashboard",
  plans: {
    free: {
      id: "free",
      isFree: true,
    },
    pro: {
      id: "pro",
      prices: [
        {
          type: PaymentType.SUBSCRIPTION,
          priceId: process.env.NEXT_PUBLIC_PRICE_ID_PRO_MONTHLY as string,
          amount: 9.9,
          interval: PlanInterval.MONTH,
          trialPeriodDays: 7,
        },
        {
          type: PaymentType.SUBSCRIPTION,
          priceId: process.env.NEXT_PUBLIC_PRICE_ID_PRO_YEARLY as string,
          amount: 99,
          interval: PlanInterval.YEAR,
          trialPeriodDays: 30,
        },
      ],
      popular: true,
    },
    lifetime: {
      id: "lifetime",
      prices: [
        {
          type: PaymentType.ONE_TIME,
          priceId: process.env.NEXT_PUBLIC_PRICE_ID_LIFETIME as string,
          amount: 399,
        },
      ],
      isLifetime: true,
    },
    enterprise: {
      id: "enterprise",
      isEnterprise: true,
      highlighted: true,
    },
  },
},

🎯 Usage Examples

Accessing Configuration

import { appConfig } from "@/config";

// Access metadata
const siteName = appConfig.metadata.name;
const siteTitle = appConfig.metadata.title;

// Access theme settings
const themeEnabled = appConfig.ui.theme.enabled;
const defaultMode = appConfig.ui.theme.defaultMode;

// Access payment plans
const allPlans = appConfig.payment.plans;
const nextjsPlan = appConfig.payment.plans.nextjs;

Type Safety

The configuration is fully typed with TypeScript:

import type { AppConfig } from "@/config/types";

// Configuration is type-safe
const config: AppConfig = {
  // TypeScript will enforce correct structure
};

📝 Best Practices

  1. Environment Variables: Use environment variables for sensitive data like API keys and price IDs
  2. Type Safety: Always use the provided TypeScript types
  3. Consistent Naming: Follow the existing naming conventions
  4. Documentation: Update this documentation when adding new configuration options
  5. Validation: Consider adding runtime validation for critical configuration values

🔧 Customization

To customize the configuration:

  1. Edit the config file: Modify src/config/index.ts
  2. Update types: Add new types to src/config/types.ts if needed
  3. Use throughout app: Access configuration via import { appConfig } from "@/config"
  4. Environment variables: Use .env files for environment-specific values

Your NEXTDEVKIT application configuration is now properly documented and ready for customization! 🎉