docs: add documentation links to various components and configurations

This commit is contained in:
javayhu 2025-04-21 09:49:43 +08:00
parent 80b0ee0460
commit 35bcbb7a06
16 changed files with 46 additions and 2 deletions

View File

@ -6,7 +6,7 @@ MkSaaS is a complete Next.js boilerplate for building AI SaaS websites. Make mon
## Author ## Author
This project is created by [Fox](https://x.com/indie_maker_fox), the founder of MkSaaS LLC and the creator of [Mkdirs](https://mkdirs.com), [IndieHub](https://indiehub.best) and some other websites. This project is created by [Fox](https://x.com/indie_maker_fox), the founder of [MkSaaS](https://mksaas.com) and [Mkdirs](https://mkdirs.com).
## Documentation ## Documentation
@ -19,7 +19,7 @@ If you found anything that could be improved, please let me know.
- website: [mksaas.com](https://mksaas.com) - website: [mksaas.com](https://mksaas.com)
- demo: [demo.mksaas.com](https://demo.mksaas.com) - demo: [demo.mksaas.com](https://demo.mksaas.com)
- discord: [https://discord.gg/yVwpEtTT](https://discord.gg/yVwpEtTT) - discord: [https://discord.gg/yVwpEtTT](https://discord.gg/yVwpEtTT)
- documentation (WIP): [mksaas.com/docs](https://mksaas.com/docs) - documentation: [mksaas.com/docs](https://mksaas.com/docs)
- video (WIP): [www.youtube.com/@MkSaaSHQ](https://www.youtube.com/@MkSaaSHQ) - video (WIP): [www.youtube.com/@MkSaaSHQ](https://www.youtube.com/@MkSaaSHQ)
- roadmap (WIP): [issues/17](https://github.com/MkSaaSHQ/mksaas-template/issues/17) - roadmap (WIP): [issues/17](https://github.com/MkSaaSHQ/mksaas-template/issues/17)

View File

@ -10,6 +10,9 @@ import { UmamiAnalytics } from './umami-analytics';
* *
* 1. all the analytics components only work in production * 1. all the analytics components only work in production
* 2. only work if the environment variable for the analytics is set * 2. only work if the environment variable for the analytics is set
*
* docs:
* https://mksaas.com/docs/analytics
*/ */
export function Analytics() { export function Analytics() {
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {

View File

@ -35,6 +35,9 @@ const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
* it will not be applied until the component is mounted, * it will not be applied until the component is mounted,
* for better user experience, we recommend to replace the * for better user experience, we recommend to replace the
* default theme with the custom theme in global.css. * default theme with the custom theme in global.css.
*
* docs:
* https://mksaas.com/docs/themes
*/ */
export function ActiveThemeProvider({ export function ActiveThemeProvider({
children, children,

View File

@ -14,6 +14,9 @@ import { useTranslations } from 'next-intl';
* *
* NOTICE: used in client components only * NOTICE: used in client components only
* *
* docs:
* https://mksaas.com/docs/config/avatar
*
* @returns The avatar config with translated titles * @returns The avatar config with translated titles
*/ */
export function getAvatarLinks(): MenuItem[] { export function getAvatarLinks(): MenuItem[] {

View File

@ -9,6 +9,9 @@ import { useTranslations } from 'next-intl';
* *
* NOTICE: used in client components only * NOTICE: used in client components only
* *
* docs:
* https://mksaas.com/docs/config/footer
*
* @returns The footer config with translated titles * @returns The footer config with translated titles
*/ */
export function getFooterLinks(): NestedMenuItem[] { export function getFooterLinks(): NestedMenuItem[] {

View File

@ -39,6 +39,9 @@ import { useTranslations } from 'next-intl';
* *
* NOTICE: used in client components only * NOTICE: used in client components only
* *
* docs:
* https://mksaas.com/docs/config/navbar
*
* @returns The navbar config with translated titles and descriptions * @returns The navbar config with translated titles and descriptions
*/ */
export function getNavbarLinks(): NestedMenuItem[] { export function getNavbarLinks(): NestedMenuItem[] {

View File

@ -11,6 +11,9 @@ import { websiteConfig } from './website';
* If you need to get the price plans in server components, use getAllPricePlans instead. * If you need to get the price plans in server components, use getAllPricePlans instead.
* Use this function when showing the pricing table or the billing card to the user. * Use this function when showing the pricing table or the billing card to the user.
* *
* docs:
* https://mksaas.com/docs/config/price
*
* @returns The price plans with translated content * @returns The price plans with translated content
*/ */
export function getPricePlans(): Record<string, PricePlan> { export function getPricePlans(): Record<string, PricePlan> {

View File

@ -19,6 +19,9 @@ import { useTranslations } from 'next-intl';
* *
* NOTICE: used in client components only * NOTICE: used in client components only
* *
* docs:
* https://mksaas.com/docs/config/sidebar
*
* @returns The sidebar config with translated titles and descriptions * @returns The sidebar config with translated titles and descriptions
*/ */
export function getSidebarLinks(): NestedMenuItem[] { export function getSidebarLinks(): NestedMenuItem[] {

View File

@ -17,6 +17,9 @@ import { websiteConfig } from './website';
* *
* NOTICE: used in client components only * NOTICE: used in client components only
* *
* docs:
* https://mksaas.com/docs/config/social
*
* @returns The social config * @returns The social config
*/ */
export function getSocialLinks(): MenuItem[] { export function getSocialLinks(): MenuItem[] {

View File

@ -3,6 +3,9 @@ import type { WebsiteConfig } from '@/types';
/** /**
* website config, without translations * website config, without translations
*
* docs:
* https://mksaas.com/docs/config/website
*/ */
export const websiteConfig: WebsiteConfig = { export const websiteConfig: WebsiteConfig = {
metadata: { metadata: {

View File

@ -13,6 +13,10 @@ import type { Locale } from 'next-intl';
import { getUrlWithLocaleInCallbackUrl } from './urls/urls'; import { getUrlWithLocaleInCallbackUrl } from './urls/urls';
/** /**
* Better Auth configuration
*
* docs:
* https://mksaas.com/docs/auth
* https://www.better-auth.com/docs/reference/options * https://www.better-auth.com/docs/reference/options
*/ */
export const auth = betterAuth({ export const auth = betterAuth({

View File

@ -11,6 +11,7 @@ import {
type SendRawEmailParams, type SendRawEmailParams,
type SendTemplateParams, type SendTemplateParams,
} from './types'; } from './types';
/** /**
* Global mail provider instance * Global mail provider instance
*/ */

View File

@ -10,6 +10,9 @@ import { Resend } from 'resend';
/** /**
* Resend mail provider implementation * Resend mail provider implementation
*
* docs:
* https://mksaas.com/docs/email
*/ */
export class ResendProvider implements MailProvider { export class ResendProvider implements MailProvider {
private resend: Resend; private resend: Resend;

View File

@ -8,6 +8,9 @@ import { Resend } from 'resend';
/** /**
* Implementation of the NewsletterProvider interface using Resend * Implementation of the NewsletterProvider interface using Resend
*
* docs:
* https://mksaas.com/docs/newsletter
*/ */
export class ResendNewsletterProvider implements NewsletterProvider { export class ResendNewsletterProvider implements NewsletterProvider {
private resend: Resend; private resend: Resend;

View File

@ -24,6 +24,9 @@ import {
/** /**
* Stripe payment provider implementation * Stripe payment provider implementation
*
* docs:
* https://mksaas.com/docs/payment
*/ */
export class StripeProvider implements PaymentProvider { export class StripeProvider implements PaymentProvider {
private stripe: Stripe; private stripe: Stripe;

View File

@ -20,6 +20,9 @@ import {
/** /**
* Amazon S3 storage provider implementation * Amazon S3 storage provider implementation
* *
* docs:
* https://mksaas.com/docs/storage
*
* This provider works with Amazon S3 and compatible services like Cloudflare R2 * This provider works with Amazon S3 and compatible services like Cloudflare R2
* https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html * https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html
* https://www.npmjs.com/package/@aws-sdk/client-s3 * https://www.npmjs.com/package/@aws-sdk/client-s3