@windrun-huaiin/diaomao 11.1.0 → 11.1.2

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.
@@ -0,0 +1,32 @@
1
+ import nextConfig from "eslint-config-next";
2
+ import unusedImports from "eslint-plugin-unused-imports";
3
+
4
+ const config = [
5
+ ...nextConfig,
6
+ {
7
+ plugins: {
8
+ "unused-imports": unusedImports,
9
+ },
10
+ ignores: [
11
+ ".source/source.config.mjs",
12
+ // 其他文件或模式
13
+ ],
14
+ rules: {
15
+ // 关闭原生规则,启用 unused-imports 插件
16
+ "no-unused-vars": "off",
17
+ "@typescript-eslint/no-unused-vars": "off",
18
+ "unused-imports/no-unused-imports": "error",
19
+ "unused-imports/no-unused-vars": [
20
+ "error",
21
+ {
22
+ vars: "all",
23
+ varsIgnorePattern: "^_",
24
+ args: "after-used",
25
+ argsIgnorePattern: "^_",
26
+ },
27
+ ],
28
+ },
29
+ },
30
+ ];
31
+
32
+ export default config;
package/messages/en.json CHANGED
@@ -1,65 +1,65 @@
1
1
  {
2
2
  "home": {
3
3
  "title": "Diaomao",
4
- "banner": "Rethink | Redefine | Rebuild",
5
- "webTitle": "Diaomao AI-Orchestrated SaaS | Pricing, Credits, Docs & Stripe",
6
- "webDescription": "Ship an AI-era product site fast: Diaomao packs Next.js + Prisma + PostgreSQL + Stripe with orchestrated pricing, credit gates, docs, and navigationready for real payments and growth.",
7
- "keywords": "AI product template, Next.js SaaS, Stripe pricing, credit billing UI, Fumadocs, Prisma PostgreSQL, fingerprint onboarding, Money Price, Credit Overview"
4
+ "banner": "Ship Faster | Charge Smarter | Scale Fearlessly",
5
+ "webTitle": "Diaomao – The Ultimate AI SaaS Starter Kit with Stripe, Credits & Docs",
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"
8
8
  },
9
9
  "hero": {
10
- "mainTitle": "Build an AI-ready product with",
10
+ "mainTitle": "Ship a paid AI product with",
11
11
  "mainEyesOn": "Diaomao",
12
- "description": "An orchestrated template for the AI age: pricing that knows your users, credit engines that guide upgrades, docs and navigation that stay in sync, and Stripe flows that simply work.",
13
- "button": "Get Started",
14
- "about": "SSR-stable, mobile-respectful, with fingerprint-to-Clerk onboarding baked in",
15
- "heroImageAlt": "Diaomao AI product template showing pricing, credits, docs navigation, and gradients",
12
+ "description": "Pricing that upgrades itself. Credits that never leak. Docs that stay in sync. Stripe flows that just work. Diaomao is the full-stack chassis trusted by makers who refuse to waste another weekend on billing infrastructure.",
13
+ "button": "Get Diaomao →",
14
+ "about": "SSR-first • Mobile-perfected Fingerprint → Clerk seamless onboarding",
15
+ "heroImageAlt": "Diaomao Modern pricing, credit dashboard and documentation system",
16
16
  "heroImageUrl": "https://r2.d8ger.com/default.webp"
17
17
  },
18
18
  "usage": {
19
- "title": "Make it yours",
20
- "eyesOn": "in three moves",
21
- "description": "An AI + product-orchestrated base—configure, ship, and sell.",
19
+ "title": "From zero to paid users",
20
+ "eyesOn": "in 3 stupidly simple steps",
21
+ "description": "Everything is pre-wired. You just turn the knobs.",
22
22
  "steps": [
23
23
  {
24
- "title": "Wire the stack",
25
- "description": "Add Stripe secrets, PostgreSQL, and Clerk—InitUserContext + Prisma schema hydrate SSR pricing and credits on day one.",
26
- "iconKey": "MousePointerClick"
24
+ "title": "Connect your stack",
25
+ "description": "Drop in Stripe, PostgreSQL, and Clerk keys. Your pricing page and credit system instantly become user-aware on day one.",
26
+ "iconKey": "Zap"
27
27
  },
28
28
  {
29
- "title": "Orchestrate the product",
30
- "description": "Tune billing toggles, credit buckets, and CTA behaviors in config; Money Price and Credit Overview adapt to user state and device.",
31
- "iconKey": "Pencil"
29
+ "title": "Tune your config",
30
+ "description": "Switch between monthly, yearly, and one-time credit packs with a single config flag. Upgrade paths, discounts, and CTAs auto-adapt to each user.",
31
+ "iconKey": "Settings"
32
32
  },
33
33
  {
34
- "title": "Launch the story",
35
- "description": "Fumadocs + Header Mega Menu keep navigation and docs in sync; gradients and accessibility are pre-tuned across devices.",
36
- "iconKey": "Download"
34
+ "title": "Launch your story",
35
+ "description": "Beautiful docs, mega-menu navigation, and gradient-rich marketing pages all driven by the same MDX files. Ship updates without touching CSS.",
36
+ "iconKey": "Rocket"
37
37
  }
38
38
  ]
39
39
  },
40
40
  "faq": {
41
- "title": "Frequently Asked Questions",
42
- "description": "Core flows are prebuilt—these answers clarify what ships out of the box.",
43
- "items":[
41
+ "title": "Got questions?",
42
+ "description": "We’ve got answers.",
43
+ "items": [
44
44
  {
45
- "question": "What is Diaomao?",
46
- "answer": "An AI-era product template: Next.js + Prisma + PostgreSQL + Stripe, with Money Price, Credit Overview, fingerprint-to-Clerk onboarding, and Fumadocs navigation/docs."
45
+ "question": "What exactly is Diaomao?",
46
+ "answer": "The fastest way to launch a production-ready, monetized AI product. Next.js 14 + Prisma + PostgreSQL + Stripe + Clerk + beautiful docs — everything pre-built and battle-tested."
47
47
  },
48
48
  {
49
- "question": "Does it support both subscriptions and one-time credit packs?",
50
- "answer": "Yes. Money Price covers subscriptions and one-time credit packs; billing toggles are configurable, and upgrade buttons fall back to Portal/Checkout."
49
+ "question": "Can I sell both subscriptions AND one-time credit packs?",
50
+ "answer": "Absolutely. Toggle between monthly, yearly, and one-time purchases with a single config change. Upgrade buttons automatically route to Stripe Checkout or Customer Portal."
51
51
  },
52
52
  {
53
- "question": "How are anonymous users handled?",
54
- "answer": "First visit issues a fingerprint ID, starter credits, and records; after login the same context persists, balances stay intact, and SSR avoids first-screen flicker."
53
+ "question": "What happens to anonymous users?",
54
+ "answer": "They get a fingerprint ID and starter credits instantly. When they eventually sign in, their balance and history merge seamlessly zero data loss, zero flicker."
55
55
  },
56
56
  {
57
- "question": "Can I change the navigation and docs layout?",
58
- "answer": "Yes. Header supports mega menus, pinned mobile actions, and secondary buttons; Fumadocs is config-driven for cards, banners, and per-device ordering."
57
+ "question": "How hard is it to customize navigation & docs?",
58
+ "answer": "Dead easy. Mega-menu, mobile pinning, and docs are all driven by simple JSON/MDX config. Change once, updates everywhere."
59
59
  },
60
60
  {
61
- "question": "What Stripe lifecycle is covered?",
62
- "answer": "Checkout/Portal, async confirms, renewals, dunning, refunds, end-of-period cancel, and upgrade/downgrade all map to Transactions/Subscriptions with event.id + order_id idempotency."
61
+ "question": "Is the entire Stripe lifecycle handled?",
62
+ "answer": "Yes. Checkout, Portal, webhooks, renewals, dunning, refunds, upgrades/downgrades all idempotent and logged. You’ll never lose a payment event again."
63
63
  }
64
64
  ]
65
65
  },
@@ -226,29 +226,29 @@
226
226
  }
227
227
  },
228
228
  "features": {
229
- "title": "Why Choose",
230
- "eyesOn": "Diaomao",
231
- "description": "An AI + product-orchestrated chassis: launch fast, charge with confidence.",
229
+ "title": "Everything you keep rebuilding",
230
+ "eyesOn": "Diaomao already solved",
231
+ "description": "Stop gluing together half-baked solutions. This is the template that ends the weekend billing nightmares.",
232
232
  "items": [
233
233
  {
234
234
  "title": "Money Price 2.0",
235
- "description": "Monthly/yearly/onetime switching keyed to user state, with discount badges, upgrade guards, and SSR defaults aligned.",
235
+ "description": "Monthly / Yearly / One-time toggle that instantly reflects the user’s current plan. Discount badges, upgrade guards, and SSR defaults — all automatic.",
236
236
  "iconKey": "Sparkles"
237
237
  },
238
238
  {
239
- "title": "Credit Overview UX",
240
- "description": "Buckets, expiry hints, and a CTA matrix; desktop modals and mobile redirects each follow best practices.",
239
+ "title": "Credit System",
240
+ "description": "Buckets, expiration tags, and smart CTAs. Desktop = modals. Mobile = redirects. Zero confusion, maximum upsells.",
241
241
  "iconKey": "Gift"
242
242
  },
243
243
  {
244
- "title": "Fingerprint to Clerk",
245
- "description": "Anonymous visitors get IDs and starter credits; login upgrades seamlessly with no balance loss, no flicker.",
246
- "iconKey": "MessageCircleMore"
244
+ "title": "Auth and Anonymous",
245
+ "description": "Fingerprint on first visit starter credits seamless merge on sign-in. No flicker, no balance loss, no support tickets.",
246
+ "iconKey": "Fingerprint"
247
247
  },
248
248
  {
249
- "title": "Docs & Nav System",
250
- "description": "Fumadocs + Header Mega Menu keep marketing and docs aligned; mobile can pin critical actions.",
251
- "iconKey": "MessageCircleMore"
249
+ "title": "Docs & Navigation",
250
+ "description": "Fumadocs + mega-menu header. One source of truth for marketing and documentation. Mobile pinning, dark mode, and accessibility included.",
251
+ "iconKey": "BookOpen"
252
252
  }
253
253
  ]
254
254
  },
@@ -297,7 +297,7 @@
297
297
  "sections": [
298
298
  {
299
299
  "title": "Configure before coding",
300
- "description": "Pricing, credits, navigation, and CTAs are config/translation-driven—tune parameters before touching code."
300
+ "description": "Pricing, credits, navigation, and CTAs are config-driven—tune parameters before touching code."
301
301
  },
302
302
  {
303
303
  "title": "Keep billing options",
@@ -305,7 +305,7 @@
305
305
  },
306
306
  {
307
307
  "title": "Honor device behaviors",
308
- "description": "Mobile uses redirects/auth then closes; desktop can modal—follow the design guide for scroll and close timing."
308
+ "description": "Mobile uses redirects/auth then closes; desktop can modal—follow the design guide."
309
309
  },
310
310
  {
311
311
  "title": "Prefer SSR context",
@@ -355,11 +355,11 @@
355
355
  "conclusion": "Plug in keys, tune config, fill copy—launch an AI-ready, revenue-ready, story-ready site in a week."
356
356
  },
357
357
  "cta": {
358
- "title": "Bring your AI product to life with",
358
+ "title": "Start shipping your AI idea with",
359
359
  "eyesOn": "Diaomao",
360
- "description1": "One template for pricing, credits, docs, navigation, and Stripe.",
361
- "description2": "Gradients, accessibility, and mobile behaviors are already tuned.",
362
- "button": "Get Started Now",
360
+ "description1": "One template. Every hard part solved.",
361
+ "description2": "Stripe, credits, auth— all production-ready out of the box.",
362
+ "button": "Get Diaomao Now",
363
363
  "url": "https://preview.reve.art/"
364
364
  },
365
365
  "languageDetection": {
@@ -381,7 +381,9 @@
381
381
  },
382
382
  "clerk": {
383
383
  "signIn": "Sign In",
384
- "signUp": "Sign Up"
384
+ "signUp": "Sign Up",
385
+ "signUpBonus": "+2",
386
+ "signUpBonusTooltip": "Sign up and get 2 free credits!"
385
387
  },
386
388
  "linkPreview": {
387
389
  "blog": "Blog",
package/messages/zh.json CHANGED
@@ -365,7 +365,9 @@
365
365
  },
366
366
  "clerk": {
367
367
  "signIn": "登录",
368
- "signUp": "注册"
368
+ "signUp": "注册",
369
+ "signUpBonus": "+2",
370
+ "signUpBonusTooltip": "注册就送2个积分!"
369
371
  },
370
372
  "linkPreview": {
371
373
  "blog": "博客",
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/diaomao",
3
- "version": "11.1.0",
3
+ "version": "11.1.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
+ "type": "module",
8
9
  "keywords": [
9
10
  "fumadocs",
10
11
  "clerk",
@@ -26,10 +27,10 @@
26
27
  "@radix-ui/react-slot": "^1.2.4",
27
28
  "@tailwindcss/typography": "^0.5.19",
28
29
  "@types/mdx": "^2.0.13",
29
- "@windrun-huaiin/base-ui": "^11.0.0",
30
- "@windrun-huaiin/lib": "^11.0.0",
31
- "@windrun-huaiin/third-ui": "^11.0.0",
32
- "@windrun-huaiin/backend-core": "^11.0.1",
30
+ "@windrun-huaiin/backend-core": "^11.0.3",
31
+ "@windrun-huaiin/base-ui": "^11.0.1",
32
+ "@windrun-huaiin/lib": "^11.0.1",
33
+ "@windrun-huaiin/third-ui": "^11.0.2",
33
34
  "autoprefixer": "^10.4.22",
34
35
  "class-variance-authority": "^0.7.1",
35
36
  "clsx": "^2.1.1",
@@ -42,7 +43,7 @@
42
43
  "katex": "^0.16.25",
43
44
  "lucide-react": "^0.525.0",
44
45
  "mermaid": "^11.12.1",
45
- "next": "16.0.0",
46
+ "next": "16.0.10",
46
47
  "next-intl": "^4.4.0",
47
48
  "next-themes": "^0.4.6",
48
49
  "react": "19.2.0",
@@ -55,7 +56,7 @@
55
56
  "remark-math": "^6.0.0",
56
57
  "remark-mdx": "^3.1.1",
57
58
  "shiki": "^3.15.0",
58
- "stripe": "19.3.0",
59
+ "stripe": "20.0.0",
59
60
  "svix": "^1.81.0",
60
61
  "swiper": "^12.0.3",
61
62
  "tailwind-merge": "^3.4.0",
@@ -76,7 +77,7 @@
76
77
  "@types/react-medium-image-zoom": "^3.0.3",
77
78
  "@types/uuid": "^10.0.0",
78
79
  "@typescript-eslint/parser": "^8.46.4",
79
- "@windrun-huaiin/dev-scripts": "^11.0.2",
80
+ "@windrun-huaiin/dev-scripts": "^11.0.3",
80
81
  "eslint": "^9.39.1",
81
82
  "eslint-config-next": "^16.0.0",
82
83
  "eslint-plugin-unused-imports": "^4.3.0",
@@ -99,7 +100,7 @@
99
100
  ".gitignore",
100
101
  "messages",
101
102
  ".env.local.txt",
102
- ".eslintrc.json",
103
+ "eslint.config.js",
103
104
  "components.json",
104
105
  "dev-scripts.config.json",
105
106
  "LICENSE",
@@ -120,7 +121,8 @@
120
121
  "build:dev": "pnpm generate-blog-index && prisma generate && next build",
121
122
  "build:prod": "prisma generate && next build",
122
123
  "start": "next start",
123
- "lint": "next lint",
124
+ "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
125
+ "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
124
126
  "deep-clean": "dev-scripts deep-clean",
125
127
  "d8": "pnpm run deep-clean",
126
128
  "easy-changeset": "dev-scripts easy-changeset",
@@ -51,7 +51,7 @@ export default async function Layout({
51
51
  >
52
52
  {children}
53
53
  </CustomHomeLayout>
54
- </FingerprintProvider>
54
+ </FingerprintProvider>
55
55
  );
56
56
  }
57
57
 
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
1
+
2
2
 
3
3
  import { type NextRequest, NextResponse } from 'next/server';
4
4
 
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
1
+
2
2
 
3
3
  import { type NextRequest, NextResponse } from 'next/server';
4
4
 
@@ -1,5 +1,4 @@
1
- /* eslint-disable react/no-unescaped-entities */
2
- import Image from "next/image"
1
+ import Image from "next/image"
3
2
  import { getTranslations } from 'next-intl/server'
4
3
  import { globalLucideIcons as icons} from '@windrun-huaiin/base-ui/components/server'
5
4
  import { GradientButton } from "@windrun-huaiin/third-ui/fuma/mdx"
@@ -119,7 +119,7 @@ export function getMDXComponents(
119
119
  );
120
120
  },
121
121
  // global image zoom
122
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
122
+
123
123
  img: (props) => <ImageZoom {...(props as any)} />,
124
124
  // global Mermaid component
125
125
  Mermaid: (props) => (
@@ -2,7 +2,7 @@
2
2
  title: Blog
3
3
  description: Articles and thoughts about various topics.
4
4
  icon: Rss
5
- date: 2025-11-28
5
+ date: 2025-12-16
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: 2025-11-28
4
+ date: 2025-12-16
5
5
  ---
6
6
 
7
7
 
package/src/proxy.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // Fix BigInt serialization issue globally
2
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2
+
3
3
  (BigInt.prototype as any).toJSON = function () {
4
4
  return this.toString();
5
5
  };
package/tsconfig.json CHANGED
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  "include": [
36
- "apps/zhengchengyan/next-env.d.ts",
36
+ "next-env.d.ts",
37
37
  "**/*.ts",
38
38
  "**/*.tsx",
39
39
  ".next/types/**/*.ts",
package/.eslintrc.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "extends": [
3
- "next/core-web-vitals",
4
- "eslint:recommended",
5
- "plugin:@typescript-eslint/recommended"
6
- ],
7
- "parser": "@typescript-eslint/parser",
8
- "plugins": [
9
- "@typescript-eslint",
10
- "unused-imports"
11
- ],
12
- "rules": {
13
- "no-unused-vars": "off",
14
- "@typescript-eslint/no-unused-vars": "off",
15
- "unused-imports/no-unused-imports": "error",
16
- "unused-imports/no-unused-vars": [
17
- "error",
18
- {
19
- "vars": "all",
20
- "varsIgnorePattern": "^_",
21
- "args": "after-used",
22
- "argsIgnorePattern": "^_"
23
- }
24
- ]
25
- }
26
- }