LogoMkSaaS Docs

Configuration

Learn how to configure your MkSaaS website

This guide provides a detailed reference for configuring your MkSaaS website.

Configuration Structure

The configuration is split into several files in the src/config directory, each responsible for a specific aspect of the website.

website.tsx
navbar-config.tsx
footer-config.tsx
sidebar-config.tsx
avatar-config.tsx
social-config.tsx
price-config.tsx

Q: What is the difference between the website configuration in src/config/website.tsx and the other configuration files in src/config/xxx.tsx?

A: The website.tsx file defines the core settings for the website, excluding locale-specific information, while the other configuration files are used to define the locale-specific content of the website.

WebsiteConfig can be used in both client and server components, while other configuration files can only be used in the client components.

Configuration Files

The configuration files are used to define the structure and content of the website.

Shared Types

The configuration uses consistent types across different menus:

Basic menu item with the following properties:

PropertyTypeDescription
titlestringDisplay text for the menu item
descriptionstringOptional description for dropdown items
iconReactNodeOptional icon component
hrefstringLink URL destination
externalbooleanWhether the link opens in a new tab
authorizeOnlystring[]User roles that can see this item
itemsMenuItem[]NestedMenuItem only, can have submenu items for dropdowns

Best Practices

  1. Use the Routes object (in src/routes.ts) for defining URLs to ensure consistency
  2. Keep translations in the appropriate locale files and use the translation functions
  3. Use consistent icons from the Lucide icon set
  4. For role-based items, always use the authorizeOnly property
  5. Client side components should use the functions (e.g., getNavbarLinks()) while server side components can import the raw configuration objects

Next Steps

Now that you understand the configuration structure, explore these related topics:

Table of Contents