From 35bcbb7a0678d7b8a22aec1c792f2879ea3f3a36 Mon Sep 17 00:00:00 2001 From: javayhu Date: Mon, 21 Apr 2025 09:49:43 +0800 Subject: [PATCH] docs: add documentation links to various components and configurations --- README.md | 4 ++-- src/analytics/analytics.tsx | 3 +++ src/components/layout/active-theme-provider.tsx | 3 +++ src/config/avatar-config.tsx | 3 +++ src/config/footer-config.tsx | 3 +++ src/config/navbar-config.tsx | 3 +++ src/config/price-config.tsx | 3 +++ src/config/sidebar-config.tsx | 3 +++ src/config/social-config.tsx | 3 +++ src/config/website.tsx | 3 +++ src/lib/auth.ts | 4 ++++ src/mail/index.ts | 1 + src/mail/provider/resend.ts | 3 +++ src/newsletter/provider/resend.ts | 3 +++ src/payment/provider/stripe.ts | 3 +++ src/storage/provider/s3.ts | 3 +++ 16 files changed, 46 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c7f07d..365f342 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ MkSaaS is a complete Next.js boilerplate for building AI SaaS websites. Make mon ## 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 @@ -19,7 +19,7 @@ If you found anything that could be improved, please let me know. - website: [mksaas.com](https://mksaas.com) - demo: [demo.mksaas.com](https://demo.mksaas.com) - 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) - roadmap (WIP): [issues/17](https://github.com/MkSaaSHQ/mksaas-template/issues/17) diff --git a/src/analytics/analytics.tsx b/src/analytics/analytics.tsx index c4a315e..46cbfbc 100644 --- a/src/analytics/analytics.tsx +++ b/src/analytics/analytics.tsx @@ -10,6 +10,9 @@ import { UmamiAnalytics } from './umami-analytics'; * * 1. all the analytics components only work in production * 2. only work if the environment variable for the analytics is set + * + * docs: + * https://mksaas.com/docs/analytics */ export function Analytics() { if (process.env.NODE_ENV !== 'production') { diff --git a/src/components/layout/active-theme-provider.tsx b/src/components/layout/active-theme-provider.tsx index 9313174..412e553 100644 --- a/src/components/layout/active-theme-provider.tsx +++ b/src/components/layout/active-theme-provider.tsx @@ -35,6 +35,9 @@ const ThemeContext = createContext(undefined); * it will not be applied until the component is mounted, * for better user experience, we recommend to replace the * default theme with the custom theme in global.css. + * + * docs: + * https://mksaas.com/docs/themes */ export function ActiveThemeProvider({ children, diff --git a/src/config/avatar-config.tsx b/src/config/avatar-config.tsx index c77d60e..78d5083 100644 --- a/src/config/avatar-config.tsx +++ b/src/config/avatar-config.tsx @@ -14,6 +14,9 @@ import { useTranslations } from 'next-intl'; * * NOTICE: used in client components only * + * docs: + * https://mksaas.com/docs/config/avatar + * * @returns The avatar config with translated titles */ export function getAvatarLinks(): MenuItem[] { diff --git a/src/config/footer-config.tsx b/src/config/footer-config.tsx index e38f412..f71e386 100644 --- a/src/config/footer-config.tsx +++ b/src/config/footer-config.tsx @@ -9,6 +9,9 @@ import { useTranslations } from 'next-intl'; * * NOTICE: used in client components only * + * docs: + * https://mksaas.com/docs/config/footer + * * @returns The footer config with translated titles */ export function getFooterLinks(): NestedMenuItem[] { diff --git a/src/config/navbar-config.tsx b/src/config/navbar-config.tsx index 77982c2..5c2dfb5 100644 --- a/src/config/navbar-config.tsx +++ b/src/config/navbar-config.tsx @@ -39,6 +39,9 @@ import { useTranslations } from 'next-intl'; * * NOTICE: used in client components only * + * docs: + * https://mksaas.com/docs/config/navbar + * * @returns The navbar config with translated titles and descriptions */ export function getNavbarLinks(): NestedMenuItem[] { diff --git a/src/config/price-config.tsx b/src/config/price-config.tsx index 2604086..e9380cd 100644 --- a/src/config/price-config.tsx +++ b/src/config/price-config.tsx @@ -11,6 +11,9 @@ import { websiteConfig } from './website'; * 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. * + * docs: + * https://mksaas.com/docs/config/price + * * @returns The price plans with translated content */ export function getPricePlans(): Record { diff --git a/src/config/sidebar-config.tsx b/src/config/sidebar-config.tsx index 246b2c9..f040495 100644 --- a/src/config/sidebar-config.tsx +++ b/src/config/sidebar-config.tsx @@ -19,6 +19,9 @@ import { useTranslations } from 'next-intl'; * * NOTICE: used in client components only * + * docs: + * https://mksaas.com/docs/config/sidebar + * * @returns The sidebar config with translated titles and descriptions */ export function getSidebarLinks(): NestedMenuItem[] { diff --git a/src/config/social-config.tsx b/src/config/social-config.tsx index 4a26c40..597abd5 100644 --- a/src/config/social-config.tsx +++ b/src/config/social-config.tsx @@ -17,6 +17,9 @@ import { websiteConfig } from './website'; * * NOTICE: used in client components only * + * docs: + * https://mksaas.com/docs/config/social + * * @returns The social config */ export function getSocialLinks(): MenuItem[] { diff --git a/src/config/website.tsx b/src/config/website.tsx index 78bea9a..a8822f3 100644 --- a/src/config/website.tsx +++ b/src/config/website.tsx @@ -3,6 +3,9 @@ import type { WebsiteConfig } from '@/types'; /** * website config, without translations + * + * docs: + * https://mksaas.com/docs/config/website */ export const websiteConfig: WebsiteConfig = { metadata: { diff --git a/src/lib/auth.ts b/src/lib/auth.ts index fc31a6e..b411c79 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -13,6 +13,10 @@ import type { Locale } from 'next-intl'; import { getUrlWithLocaleInCallbackUrl } from './urls/urls'; /** + * Better Auth configuration + * + * docs: + * https://mksaas.com/docs/auth * https://www.better-auth.com/docs/reference/options */ export const auth = betterAuth({ diff --git a/src/mail/index.ts b/src/mail/index.ts index 1b0794b..c9e6bcf 100644 --- a/src/mail/index.ts +++ b/src/mail/index.ts @@ -11,6 +11,7 @@ import { type SendRawEmailParams, type SendTemplateParams, } from './types'; + /** * Global mail provider instance */ diff --git a/src/mail/provider/resend.ts b/src/mail/provider/resend.ts index 47c4e3a..ad93dc6 100644 --- a/src/mail/provider/resend.ts +++ b/src/mail/provider/resend.ts @@ -10,6 +10,9 @@ import { Resend } from 'resend'; /** * Resend mail provider implementation + * + * docs: + * https://mksaas.com/docs/email */ export class ResendProvider implements MailProvider { private resend: Resend; diff --git a/src/newsletter/provider/resend.ts b/src/newsletter/provider/resend.ts index 140d72e..d5865a7 100644 --- a/src/newsletter/provider/resend.ts +++ b/src/newsletter/provider/resend.ts @@ -8,6 +8,9 @@ import { Resend } from 'resend'; /** * Implementation of the NewsletterProvider interface using Resend + * + * docs: + * https://mksaas.com/docs/newsletter */ export class ResendNewsletterProvider implements NewsletterProvider { private resend: Resend; diff --git a/src/payment/provider/stripe.ts b/src/payment/provider/stripe.ts index e54351e..668650a 100644 --- a/src/payment/provider/stripe.ts +++ b/src/payment/provider/stripe.ts @@ -24,6 +24,9 @@ import { /** * Stripe payment provider implementation + * + * docs: + * https://mksaas.com/docs/payment */ export class StripeProvider implements PaymentProvider { private stripe: Stripe; diff --git a/src/storage/provider/s3.ts b/src/storage/provider/s3.ts index 6260de2..3c4abd0 100644 --- a/src/storage/provider/s3.ts +++ b/src/storage/provider/s3.ts @@ -20,6 +20,9 @@ import { /** * Amazon S3 storage provider implementation * + * docs: + * https://mksaas.com/docs/storage + * * This provider works with Amazon S3 and compatible services like Cloudflare R2 * https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html * https://www.npmjs.com/package/@aws-sdk/client-s3