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

src/config/index.ts
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
  },
  affiliate: {
    // Affiliate marketing 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:

src/config/index.ts
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:

src/config/index.ts
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:

src/config/index.ts
blog: {
  pagination: 3,
}

📧 Mail Configuration

Configure email services:

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

Example:

src/config/index.ts
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:

src/config/index.ts
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:

src/config/index.ts
auth: {
  enableSocialLogin: true,
  enablePasswordLogin: true,
  redirectAfterSignIn: "/app/dashboard",
  redirectAfterLogout: "/",
}

⚙️ Settings Configuration

Configure application settings:

PropertyTypeDescription
account.canChangeEmailbooleanWhether users can change their email

Example:

src/config/index.ts
settings: {
  account: {
    canChangeEmail: true,
  },
}

📁 Storage Configuration

Configure file storage:

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

Example:

src/config/index.ts
storage: {
  provider: "s3",
  bucketNames: {
    avatars: process.env.NEXT_PUBLIC_AVATARS_BUCKET_NAME || "avatars",
  },
}

💳 Payment Configuration

Configure payment processing and pricing plans:

PropertyTypeDescription
provider"stripe" | "creem"Payment processor
currencystringCurrency code (e.g., "USD")
yearlyDiscountnumberAnnual discount percentage (e.g., 20)
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
isFreebooleanWhether this is a free plan
isEnterprisebooleanWhether this is an enterprise plan
isLifetimebooleanWhether this is a one-time payment plan
popularbooleanWhether to highlight as popular
highlightedbooleanWhether to highlight the plan
pricesPrice[]Array of price options

Price Structure

PropertyTypeDescription
typePaymentTypePayment type (ONE_TIME, SUBSCRIPTION)
interval"month" | "year"Subscription interval (monthly, yearly)
trialPeriodDaysnumberTrial period in days
priceIdstringStripe price ID
amountnumberPrice amount in currency units

Example:

src/config/index.ts
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,
    },
  },
},

💰 Affiliate Marketing Configuration

Configure affiliate marketing programs:

PropertyTypeDescription
affonso.enabledbooleanWhether to enable affiliate marketing
affonso.idstringAffonso affiliate marketing ID

Example:

src/config/index.ts
affiliate: {
  affonso: {
    enabled: false,
    id: process.env.NEXT_PUBLIC_AFFILIATE_AFFONSO_ID || "",
  },
}

🎯 Usage Examples

Accessing Configuration

src/config/index.ts
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:

src/config/index.ts
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! 🎉