@windrun-huaiin/diaomao 11.0.0 → 11.1.1
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/messages/en.json +52 -52
- package/package.json +8 -8
- package/src/app/[locale]/(clerk)/layout.tsx +1 -1
- package/src/app/[locale]/(home)/layout.tsx +1 -1
- package/src/app/[locale]/(home)/pricing/page.tsx +1 -1
- package/src/mdx/blog/index.mdx +1 -1
- package/src/mdx/blog/ioc.mdx +1 -1
- package/src/lib/fingerprint-config.ts +0 -6
- package/src/lib/money-price-helper.ts +0 -61
package/messages/en.json
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"home": {
|
|
3
3
|
"title": "Diaomao",
|
|
4
|
-
"banner": "
|
|
5
|
-
"webTitle": "Diaomao AI
|
|
6
|
-
"webDescription": "
|
|
7
|
-
"keywords": "AI
|
|
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": "
|
|
10
|
+
"mainTitle": "Ship a paid AI product with",
|
|
11
11
|
"mainEyesOn": "Diaomao",
|
|
12
|
-
"description": "
|
|
13
|
-
"button": "Get
|
|
14
|
-
"about": "SSR-
|
|
15
|
-
"heroImageAlt": "Diaomao
|
|
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": "
|
|
20
|
-
"eyesOn": "in
|
|
21
|
-
"description": "
|
|
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": "
|
|
25
|
-
"description": "
|
|
26
|
-
"iconKey": "
|
|
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": "
|
|
30
|
-
"description": "
|
|
31
|
-
"iconKey": "
|
|
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
|
|
35
|
-
"description": "
|
|
36
|
-
"iconKey": "
|
|
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": "
|
|
42
|
-
"description": "
|
|
43
|
-
"items":[
|
|
41
|
+
"title": "Got questions?",
|
|
42
|
+
"description": "We’ve got answers.",
|
|
43
|
+
"items": [
|
|
44
44
|
{
|
|
45
|
-
"question": "What is Diaomao?",
|
|
46
|
-
"answer": "
|
|
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": "
|
|
50
|
-
"answer": "
|
|
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": "
|
|
54
|
-
"answer": "
|
|
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": "
|
|
58
|
-
"answer": "
|
|
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": "
|
|
62
|
-
"answer": "Checkout
|
|
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": "
|
|
230
|
-
"eyesOn": "Diaomao",
|
|
231
|
-
"description": "
|
|
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/
|
|
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
|
|
240
|
-
"description": "Buckets,
|
|
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": "
|
|
245
|
-
"description": "
|
|
246
|
-
"iconKey": "
|
|
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 &
|
|
250
|
-
"description": "Fumadocs +
|
|
251
|
-
"iconKey": "
|
|
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
|
|
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
|
|
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": "
|
|
358
|
+
"title": "Start shipping your AI idea with",
|
|
359
359
|
"eyesOn": "Diaomao",
|
|
360
|
-
"description1": "One template
|
|
361
|
-
"description2": "
|
|
362
|
-
"button": "Get
|
|
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": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windrun-huaiin/diaomao",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@radix-ui/react-slot": "^1.2.4",
|
|
27
27
|
"@tailwindcss/typography": "^0.5.19",
|
|
28
28
|
"@types/mdx": "^2.0.13",
|
|
29
|
-
"@windrun-huaiin/
|
|
30
|
-
"@windrun-huaiin/
|
|
31
|
-
"@windrun-huaiin/
|
|
32
|
-
"@windrun-huaiin/
|
|
29
|
+
"@windrun-huaiin/backend-core": "^11.0.2",
|
|
30
|
+
"@windrun-huaiin/base-ui": "^11.0.1",
|
|
31
|
+
"@windrun-huaiin/lib": "^11.0.1",
|
|
32
|
+
"@windrun-huaiin/third-ui": "^11.0.1",
|
|
33
33
|
"autoprefixer": "^10.4.22",
|
|
34
34
|
"class-variance-authority": "^0.7.1",
|
|
35
35
|
"clsx": "^2.1.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"katex": "^0.16.25",
|
|
43
43
|
"lucide-react": "^0.525.0",
|
|
44
44
|
"mermaid": "^11.12.1",
|
|
45
|
-
"next": "16.0.
|
|
45
|
+
"next": "16.0.10",
|
|
46
46
|
"next-intl": "^4.4.0",
|
|
47
47
|
"next-themes": "^0.4.6",
|
|
48
48
|
"react": "19.2.0",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@types/react-medium-image-zoom": "^3.0.3",
|
|
77
77
|
"@types/uuid": "^10.0.0",
|
|
78
78
|
"@typescript-eslint/parser": "^8.46.4",
|
|
79
|
-
"@windrun-huaiin/dev-scripts": "^
|
|
79
|
+
"@windrun-huaiin/dev-scripts": "^11.0.3",
|
|
80
80
|
"eslint": "^9.39.1",
|
|
81
81
|
"eslint-config-next": "^16.0.0",
|
|
82
82
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"core-list-route": "dev-scripts backend-core routes:list",
|
|
135
135
|
"core-sync-route": "dev-scripts backend-core routes:sync",
|
|
136
136
|
"core-sync-schema": "dev-scripts backend-core prisma:sync",
|
|
137
|
-
"core-sync-sql": "dev-scripts backend-core migrations:sync",
|
|
137
|
+
"core-sync-sql": "dev-scripts backend-core migrations:sync --schema diaomao --dest database",
|
|
138
138
|
"whoareyou": "dev-scripts generate-nextjs-architecture -v",
|
|
139
139
|
"windrun": "pnpm remove @windrun-huaiin/base-ui @windrun-huaiin/lib @windrun-huaiin/third-ui @windrun-huaiin/backend-core @windrun-huaiin/dev-scripts && pnpm add @windrun-huaiin/base-ui@latest @windrun-huaiin/lib@latest @windrun-huaiin/third-ui@latest @windrun-huaiin/backend-core@latest && pnpm add -D @windrun-huaiin/dev-scripts@latest",
|
|
140
140
|
"windrun3": "pnpm remove @windrun-huaiin/third-ui && pnpm add @windrun-huaiin/third-ui@latest",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import { baseOptions } from '@/app/[locale]/layout.config';
|
|
11
11
|
import { clerkPageBanner } from '@/lib/appConfig';
|
|
12
|
-
import { fingerprintConfig } from '
|
|
12
|
+
import { fingerprintConfig } from '@windrun-huaiin/backend-core/lib';
|
|
13
13
|
import { CustomHomeLayout } from '@windrun-huaiin/third-ui/fuma/base';
|
|
14
14
|
import { FingerprintProvider } from '@windrun-huaiin/third-ui/fingerprint';
|
|
15
15
|
import { type HomeLayoutProps } from 'fumadocs-ui/layouts/home';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { baseOptions, homeNavLinks, levelNavLinks } from '@/app/[locale]/layout.config';
|
|
2
2
|
import { showBanner } from '@/lib/appConfig';
|
|
3
|
-
import { fingerprintConfig } from '
|
|
3
|
+
import { fingerprintConfig } from '@windrun-huaiin/backend-core/lib';
|
|
4
4
|
import { FingerprintProvider } from '@windrun-huaiin/third-ui/fingerprint';
|
|
5
5
|
import { CustomHomeLayout } from '@windrun-huaiin/third-ui/fuma/base';
|
|
6
6
|
import { type HomeLayoutProps } from 'fumadocs-ui/layouts/home';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { appConfig } from '@/lib/appConfig';
|
|
3
3
|
import { moneyPriceConfig } from '@windrun-huaiin/backend-core/lib';
|
|
4
|
-
import { getMoneyPriceInitUserContext } from '
|
|
4
|
+
import { getMoneyPriceInitUserContext } from '@windrun-huaiin/backend-core/lib';
|
|
5
5
|
import { FingerprintStatus } from "@windrun-huaiin/third-ui/fingerprint";
|
|
6
6
|
import { MoneyPrice } from "@windrun-huaiin/third-ui/main/server";
|
|
7
7
|
|
package/src/mdx/blog/index.mdx
CHANGED
package/src/mdx/blog/ioc.mdx
CHANGED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { auth } from '@clerk/nextjs/server';
|
|
2
|
-
import { cookies, headers } from 'next/headers';
|
|
3
|
-
import {
|
|
4
|
-
extractFingerprintFromNextStores,
|
|
5
|
-
} from '@windrun-huaiin/third-ui/fingerprint/server';
|
|
6
|
-
import type { InitUserContext } from '@windrun-huaiin/third-ui/main/server';
|
|
7
|
-
import {
|
|
8
|
-
applyUserMockContext,
|
|
9
|
-
buildInitUserContextFromEntities,
|
|
10
|
-
fetchUserContextByClerkUserId,
|
|
11
|
-
} from '@windrun-huaiin/backend-core/context';
|
|
12
|
-
|
|
13
|
-
async function readFingerprintIdFromRequest(): Promise<string | null> {
|
|
14
|
-
const cookieStore = await cookies();
|
|
15
|
-
const headerList = await headers();
|
|
16
|
-
|
|
17
|
-
return extractFingerprintFromNextStores({
|
|
18
|
-
headers: headerList,
|
|
19
|
-
cookies: cookieStore,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export async function getMoneyPriceInitUserContext(): Promise<InitUserContext> {
|
|
24
|
-
const { userId: clerkUserId } = await auth();
|
|
25
|
-
|
|
26
|
-
if (clerkUserId) {
|
|
27
|
-
const userContext = await fetchUserContextByClerkUserId(clerkUserId);
|
|
28
|
-
if (!userContext) {
|
|
29
|
-
return {
|
|
30
|
-
fingerprintId: null,
|
|
31
|
-
xUser: null,
|
|
32
|
-
xCredit: null,
|
|
33
|
-
xSubscription: null,
|
|
34
|
-
isClerkAuthenticated: false,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const initUserContext = buildInitUserContextFromEntities({
|
|
39
|
-
user: userContext.user,
|
|
40
|
-
credit: userContext.credit,
|
|
41
|
-
subscription: userContext.subscription,
|
|
42
|
-
isClerkAuthenticated: true,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
return applyUserMockContext(initUserContext);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const fingerprintId = await readFingerprintIdFromRequest();
|
|
49
|
-
|
|
50
|
-
if (!fingerprintId) {
|
|
51
|
-
console.error("Not found fingerprintId from request! NEED CHECK!")
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return {
|
|
55
|
-
fingerprintId,
|
|
56
|
-
xUser: null,
|
|
57
|
-
xCredit: null,
|
|
58
|
-
xSubscription: null,
|
|
59
|
-
isClerkAuthenticated: false,
|
|
60
|
-
};
|
|
61
|
-
}
|