@windrun-huaiin/diaomao 31.1.3 → 31.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.local.txt CHANGED
@@ -13,12 +13,12 @@ NEXT_PUBLIC_BASE_URL=http://localhost:3000
13
13
 
14
14
  ## Github
15
15
  NEXT_PUBLIC_GITHUB=https://github.com/YOURS_/YOURS_/
16
- NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/YOURS_/YOURS_/main
16
+ NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/YOURS_/YOURS_/blob/main
17
17
 
18
18
 
19
19
  ## Website Theme Switch Mode
20
20
  ## light-only, dark-only, light-dark-system
21
- NEXT_PUBLIC_STYLE_THEME_MODE=light-dark-only
21
+ NEXT_PUBLIC_STYLE_THEME_MODE=light-dark-system
22
22
 
23
23
  ## Website Theme Color config
24
24
  ## purple:#AC62FD , orange:#F97316, indigo:#6366F1, emerald:#48C892, rose:#F43F5E
@@ -112,6 +112,7 @@
112
112
  "tailwindcss-animate",
113
113
  "ts-morph",
114
114
  "ts-node",
115
+ "turbo",
115
116
  "typescript",
116
117
  "unist-util-visit",
117
118
  "uuid",
package/messages/en.json CHANGED
@@ -4,7 +4,13 @@
4
4
  "banner": "Ship Faster | Charge Smarter | Scale Fearlessly",
5
5
  "webTitle": "Diaomao – The Ultimate AI SaaS Starter Kit with Stripe, Credits & Docs",
6
6
  "webDescription": "Next.js 14 + Prisma + PostgreSQL + Stripe + Clerk + Fumadocs. Production-ready pricing tiers, credit system, anonymous-to-auth onboarding, and beautiful docs — everything you need to launch and monetize your AI product in days, not months.",
7
- "keywords": "AI SaaS template, Next.js boilerplate, Stripe billing, credit-based pricing, anonymous onboarding, Fumadocs, Prisma PostgreSQL, Clerk authentication"
7
+ "keywords": "AI SaaS template, Next.js boilerplate, Stripe billing, credit-based pricing, anonymous onboarding, Fumadocs, Prisma PostgreSQL, Clerk authentication",
8
+ "openGraph": {
9
+ "image": "/share-og.png"
10
+ },
11
+ "twitter": {
12
+ "image": "/share-og.png"
13
+ }
8
14
  },
9
15
  "hero": {
10
16
  "mainTitle": "Ship a paid AI product with",
package/next-env.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="next" />
2
2
  /// <reference types="next/image-types/global" />
3
- import "./.next/dev/types/routes.d.ts";
3
+ import "./.next/types/routes.d.ts";
4
4
 
5
5
  // NOTE: This file should not be edited
6
6
  // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/diaomao",
3
- "version": "31.1.3",
3
+ "version": "31.3.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -17,12 +17,12 @@
17
17
  "dependencies": {
18
18
  "@clerk/nextjs": "^7.3.3",
19
19
  "@types/mdx": "^2.0.13",
20
- "@windrun-huaiin/backend-core": "31.0.0",
20
+ "@windrun-huaiin/backend-core": "31.0.1",
21
21
  "@windrun-huaiin/base-ui": "31.0.0",
22
22
  "@windrun-huaiin/contracts": "31.0.0",
23
23
  "@windrun-huaiin/fumadocs-local-md": "31.0.0",
24
- "@windrun-huaiin/lib": "31.0.1",
25
- "@windrun-huaiin/third-ui": "31.2.0",
24
+ "@windrun-huaiin/lib": "31.0.3",
25
+ "@windrun-huaiin/third-ui": "31.3.3",
26
26
  "clsx": "^2.1.1",
27
27
  "lucide-react": "^0.577.0",
28
28
  "next": "16.1.6",
@@ -31,7 +31,7 @@
31
31
  "react": "19.2.4",
32
32
  "react-dom": "19.2.4",
33
33
  "tailwind-merge": "^3.5.0",
34
- "turbo": "^2.9.12"
34
+ "turbo": "^2.9.14"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@changesets/cli": "^2.29.8",
Binary file
@@ -8,7 +8,6 @@ const { Page, generateStaticParams, generateMetadata } = createFumaPage({
8
8
  sourceKey: sourceKey,
9
9
  mdxContentSource: () => siteDocs.getContentSource(sourceKey),
10
10
  getMDXComponents: siteDocs.getMDXComponents,
11
- mdxSourceDir: appConfig.mdxSourceDir[sourceKey],
12
11
  githubBaseUrl: appConfig.githubBaseUrl,
13
12
  copyButtonComponent: <LLMCopyButton />,
14
13
  showBreadcrumb: false,
@@ -7,7 +7,6 @@ const { Page, generateStaticParams, generateMetadata } = createFumaPage({
7
7
  sourceKey: sourceKey,
8
8
  mdxContentSource: () => siteDocs.getContentSource(sourceKey),
9
9
  getMDXComponents: siteDocs.getMDXComponents,
10
- mdxSourceDir: appConfig.mdxSourceDir[sourceKey],
11
10
  githubBaseUrl: appConfig.githubBaseUrl,
12
11
  supportedLocales: appConfig.i18n.locales as string[],
13
12
  showBreadcrumb: false,
@@ -1,11 +1,31 @@
1
1
 
2
2
  import { appConfig } from '@/lib/appConfig';
3
+ import { createLocalizedMetadata } from '@windrun-huaiin/third-ui/lib/seo-metadata';
3
4
  import { moneyPriceConfig } from '@windrun-huaiin/backend-core/config/money-price';
4
5
  import { FingerprintStatus } from '@windrun-huaiin/third-ui/fingerprint';
5
6
  import { buildMoneyPriceData } from '@windrun-huaiin/third-ui/main/money-price/server';
6
7
  import { cn } from '@windrun-huaiin/lib/utils';
7
8
  import { PricingClient } from './pricing-client';
8
9
 
10
+ export async function generateMetadata({
11
+ params,
12
+ }: {
13
+ params: Promise<{ locale: string }>;
14
+ }) {
15
+ const { locale } = await params;
16
+ return createLocalizedMetadata({
17
+ namespace: 'metadata.pricing',
18
+ url: {
19
+ locale,
20
+ pathname: '/pricing',
21
+ baseUrl: appConfig.baseUrl,
22
+ locales: appConfig.i18n.locales,
23
+ defaultLocale: appConfig.i18n.defaultLocale,
24
+ localePrefixAsNeeded: appConfig.i18n.localePrefixAsNeeded,
25
+ },
26
+ });
27
+ }
28
+
9
29
  export default async function Pricing({
10
30
  params,
11
31
  searchParams,
@@ -1,6 +1,6 @@
1
1
  import { appConfig, generatedLocales, localePrefixAsNeeded, defaultLocale, themeMode } from '@/lib/appConfig';
2
2
  import { getFumaTranslations } from '@windrun-huaiin/third-ui/fuma/fuma-translate-util';
3
- import { createLocalizedSiteMetadata } from '@windrun-huaiin/third-ui/lib/seo-metadata';
3
+ import { createLocalizedPageMetadata, createLocalizedSiteMetadata } from '@windrun-huaiin/third-ui/lib/seo-metadata';
4
4
  import { NProgressBar } from '@windrun-huaiin/third-ui/main';
5
5
  import { DocsRootProvider } from '@windrun-huaiin/third-ui/fuma/base/docs-root-provider';
6
6
  import { ClerkProviderClient } from '@windrun-huaiin/third-ui/clerk';
@@ -19,12 +19,24 @@ export async function generateMetadata({
19
19
  params: Promise<{ locale: string }>
20
20
  }) {
21
21
  const { locale } = await paramsPromise;
22
- return createLocalizedSiteMetadata({
22
+ const siteMetadata = await createLocalizedSiteMetadata({
23
23
  locale,
24
24
  baseUrl: appConfig.baseUrl,
25
25
  locales: appConfig.i18n.locales,
26
- defaultLocale,
27
- localePrefixAsNeeded,
26
+ defaultLocale: appConfig.i18n.defaultLocale,
27
+ localePrefixAsNeeded: appConfig.i18n.localePrefixAsNeeded,
28
+ });
29
+
30
+ return createLocalizedPageMetadata({
31
+ url: {
32
+ locale,
33
+ pathname: '/',
34
+ baseUrl: appConfig.baseUrl,
35
+ locales: appConfig.i18n.locales,
36
+ defaultLocale: appConfig.i18n.defaultLocale,
37
+ localePrefixAsNeeded: appConfig.i18n.localePrefixAsNeeded,
38
+ },
39
+ site: siteMetadata,
28
40
  });
29
41
  }
30
42
 
@@ -2,18 +2,21 @@
2
2
 
3
3
  import { type NextRequest, NextResponse } from 'next/server';
4
4
 
5
- import { siteDocs } from '@/lib/site-docs';
6
5
  import { appConfig } from '@/lib/appConfig';
6
+ import { resolveMdxSourceDir } from '@/lib/mdx-source';
7
+ import { siteDocs } from '@/lib/site-docs';
7
8
  import { LLMCopyHandler } from '@windrun-huaiin/third-ui/fuma/server/llm-copy-handler';
8
9
 
10
+ const sourceKey = 'blog';
11
+
9
12
  export async function GET(request: NextRequest) {
10
13
  const searchParams = request.nextUrl.searchParams;
11
14
  const locale = searchParams.get('locale') ?? appConfig.i18n.defaultLocale;
12
15
  const requestedPath = searchParams.get('path') || '';
13
- const blogSource = await siteDocs.getContentSource('blog');
16
+ const blogSource = await siteDocs.getContentSource(sourceKey);
14
17
 
15
18
  const result = await LLMCopyHandler({
16
- sourceDir: appConfig.mdxSourceDir.blog,
19
+ sourceDir: resolveMdxSourceDir(sourceKey),
17
20
  dataSource: blogSource,
18
21
  requestedPath,
19
22
  locale,
@@ -2,18 +2,20 @@
2
2
 
3
3
  import { type NextRequest, NextResponse } from 'next/server';
4
4
 
5
- import { siteDocs } from '@/lib/site-docs';
6
5
  import { appConfig } from '@/lib/appConfig';
6
+ import { resolveMdxSourceDir } from '@/lib/mdx-source';
7
+ import { siteDocs } from '@/lib/site-docs';
7
8
  import { LLMCopyHandler } from '@windrun-huaiin/third-ui/fuma/server/llm-copy-handler';
8
9
 
10
+ const sourceKey = 'legal';
9
11
  export async function GET(request: NextRequest) {
10
12
  const searchParams = request.nextUrl.searchParams;
11
13
  const locale = searchParams.get('locale') ?? appConfig.i18n.defaultLocale;
12
14
  const requestedPath = searchParams.get('path') || '';
13
- const legalSource = await siteDocs.getContentSource('legal');
15
+ const legalSource = await siteDocs.getContentSource(sourceKey);
14
16
 
15
17
  const result = await LLMCopyHandler({
16
- sourceDir: appConfig.mdxSourceDir.legal,
18
+ sourceDir: resolveMdxSourceDir(sourceKey),
17
19
  dataSource: legalSource,
18
20
  requestedPath,
19
21
  locale,
@@ -1,8 +1,9 @@
1
1
  import { appConfig } from '@/lib/appConfig';
2
+ import { resolveMdxSourceDir } from "@/lib/mdx-source";
2
3
  import { createSitemapHandler } from '@windrun-huaiin/third-ui/lib/server';
3
4
 
4
5
  export default createSitemapHandler(
5
6
  appConfig.baseUrl,
6
7
  appConfig.i18n.locales as string[],
7
- appConfig.mdxSourceDir.blog
8
+ resolveMdxSourceDir('blog'),
8
9
  );
@@ -0,0 +1,3 @@
1
+ export function resolveMdxSourceDir(sourceKey: string) {
2
+ return `src/mdx/${sourceKey}`;
3
+ }
@@ -2,7 +2,7 @@
2
2
  title: Blog
3
3
  description: Articles and thoughts about various topics.
4
4
  icon: RssIcon
5
- date: 2026-05-15
5
+ date: 2026-05-21
6
6
  ---
7
7
 
8
8
  ## Past List
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: Monthly Summary
3
3
  description: Index and Summary
4
- date: 2026-05-15
4
+ date: 2026-05-21
5
5
  ---
6
6
 
7
7