@windrun-huaiin/diaomao 16.0.1 → 25.0.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.
Files changed (44) hide show
  1. package/.env.local.txt +147 -70
  2. package/.gitignore +6 -0
  3. package/README.md +3 -1
  4. package/dev-scripts.config.json +3 -4
  5. package/eslint.config.js +0 -1
  6. package/messages/en.json +74 -3
  7. package/next.config.ts +4 -17
  8. package/package.json +11 -12
  9. package/public/banner.webp +0 -0
  10. package/public/bug-off.png +0 -0
  11. package/public/bug-off.svg +1 -1
  12. package/public/favicon-16x16.png +0 -0
  13. package/public/favicon-180x180.png +0 -0
  14. package/public/favicon-32x32.png +0 -0
  15. package/public/favicon-512x512.png +0 -0
  16. package/public/favicon-base(75x75).png +0 -0
  17. package/public/favicon.ico +0 -0
  18. package/src/app/[locale]/(clerk)/layout.tsx +23 -29
  19. package/src/app/[locale]/(clerk)/sign-in/[[...sign-in]]/page.tsx +0 -9
  20. package/src/app/[locale]/(clerk)/sign-up/[[...sign-up]]/page.tsx +0 -9
  21. package/src/app/[locale]/(clerk)/waitlist/[[...waitlist]]/page.tsx +0 -9
  22. package/src/app/[locale]/(content)/blog/[[...slug]]/page.tsx +4 -3
  23. package/src/app/[locale]/(content)/blog/layout.tsx +2 -1
  24. package/src/app/[locale]/(content)/layout.tsx +20 -18
  25. package/src/app/[locale]/(home)/[...catchAll]/page.tsx +0 -9
  26. package/src/app/[locale]/(home)/layout.tsx +19 -14
  27. package/src/app/[locale]/(home)/legal/[[...slug]]/page.tsx +4 -3
  28. package/src/app/[locale]/(home)/legal/layout.tsx +2 -1
  29. package/src/app/[locale]/layout.config.tsx +105 -38
  30. package/src/app/[locale]/layout.tsx +22 -36
  31. package/src/app/api/blog/llm-content/route.ts +2 -1
  32. package/src/app/api/legal/llm-content/route.ts +2 -1
  33. package/src/components/hero.tsx +2 -2
  34. package/src/components/mdx-components.tsx +32 -146
  35. package/src/i18n.ts +2 -2
  36. package/src/lib/appConfig.ts +2 -10
  37. package/src/lib/content-source.ts +42 -0
  38. package/src/mdx/blog/index.mdx +3 -3
  39. package/src/mdx/blog/ioc.mdx +3 -3
  40. package/src/mdx/blog/readme.mdx +24 -36
  41. package/tsconfig.json +0 -3
  42. package/source.config.ts +0 -94
  43. package/src/lib/source-blog.ts +0 -11
  44. package/src/lib/source-legal.ts +0 -11
package/.env.local.txt CHANGED
@@ -1,120 +1,197 @@
1
- # website homepage url
1
+ ##===============================##
2
+ ## 👁️🌐Public Config👁️🌐 ##
3
+ ## - NON Key, Token, Secret, Pem. ##
4
+ ## - public url, api, id ##
5
+ ## - public ui control and switch ##
6
+ ## - public third-party config ##
7
+ ##===============================##
8
+
9
+ ## Website
10
+ NEXT_PUBLIC_APP_NAME="YOURS_app_name"
2
11
  NEXT_PUBLIC_BASE_URL=http://localhost:3000
12
+ # NEXT_PUBLIC_I18N_LOCALE_PREFIX_AS_NEEDED=false
3
13
 
4
- # your project github url
5
- NEXT_PUBLIC_GITHUB=https://github.com/caofanCPU/diaomao/
6
- NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/caofanCPU/diaomao/main
7
- NEXT_PUBLIC_STYLE_CDN_PROXY_URL=YOURS-
14
+ ## Github
15
+ NEXT_PUBLIC_GITHUB=https://github.com/YOURS_/YOURS_/
16
+ NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/YOURS_/YOURS_/main
8
17
 
9
- ## https://supabase.com/docs/guides/database/connecting-to-postgres
10
- ## 直连模式supabase只支持ipv6;事务模式又不支持Prisma的预处理语句;所以必须降级为会话模式
11
- ## Project View -> Connect -> 查看连接方式以及限制
12
- # DATABASE_URL="postgresql://用户名.项目ID:[YOUR-PASSWORD]@服务厂商域名.pooler.supabase.com:5432/postgres?sslmode=require&schema=diaomao"
13
-
14
-
15
- # DB Config, replace YOUR port、db name、schema
16
- DATABASE_URL="postgresql://postgres:PASSWORD@localhost:5432/postgres?schema=diaomao"
17
-
18
-
19
- # purple, orange, indigo, emerald, rose
18
+ ## Website Theme Color config
19
+ ## purple:#AC62FD , orange:#F97316, indigo:#6366F1, emerald:#48C892, rose:#F43F5E
20
20
  NEXT_PUBLIC_STYLE_ICON_COLOR=orange
21
21
  NEXT_PUBLIC_STYLE_SVG_ICON_SIZE=18
22
+ NEXT_PUBLIC_STYLE_WATERMARK_TEXT=YOURS_
22
23
 
23
- NEXT_PUBLIC_STYLE_SHOW_BANNER=true
24
- NEXT_PUBLIC_STYLE_CLERK_PAGE_BANNER=false
25
- NEXT_PUBLIC_STYLE_CLERK_AUTH_IN_MODAL=true
26
24
 
27
- NEXT_PUBLIC_STYLE_WATERMARK_ENABLED=true
28
- NEXT_PUBLIC_STYLE_WATERMARK_TEXT=YOURS-
29
-
30
- # GoogleID TODO
31
- NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
32
- # MicrosoftID TODO
33
- NEXT_PUBLIC_MICROSOFT_CLARITY_ID=
34
-
35
- NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=YOURS-
36
-
37
- # Only-Use-In-Server, !!DO NOT USE IN CLIENT!!
38
- CLERK_SECRET_KEY=YOURS-
39
- CLERK_WEBHOOK_SECRET=YOURS-
40
- CLERK_DEBUG=false
41
-
42
- # sign-in url
25
+ ## Clerk Front config
43
26
  NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
44
27
  NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
45
- # sign-up url
46
28
  NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
47
29
  NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
48
-
49
- # waitlist-url
50
30
  NEXT_PUBLIC_CLERK_WAITLIST_URL=/waitlist
51
31
 
52
- # Enable Subscription Upgrade button
53
- ENABLE_STRIPE_SUBSCRIPTION_UPGRADE = true
54
- # Show Debug Status
55
- SHOW_FINGERPRINT_STATUS = true
56
-
57
- # Stripe Configuration
58
- STRIPE_PUBLISHABLE_KEY=YOURS-
59
- STRIPE_SECRET_KEY=YOURS-
60
- STRIPE_WEBHOOK_SECRET=YOURS-
61
- STRIPE_PRO_PRODUCT_ID=YOURS-
62
- STRIPE_ULTRA_PRODUCT_ID=YOURS-
63
- STRIPE_ONE_TIME_PRODUCT_ID=YOURS-
64
-
65
- MONEY_PRICE_MOCK_USER_ENABLED=false
66
- # 0-FreeUser | 1-MonthPro | 2-MonthUltra | 3-YearPro | 4-YearUltra
67
- MONEY_PRICE_MOCK_USER_TYPE=4
68
- # 激活的支付供应商
69
- ACTIVE_PAYMENT_PROVIDER=stripe
70
-
71
- # 积分初始化配置
72
- CREDITS_INIT_FREE_AMOUNT=1
73
- CREDITS_INIT_FREE_REGISTER_AMOUNT=2
74
- CREDITS_INIT_FREE_EXPIRED_DAYS=7
75
- CREDITS_ONE_TIME_EXPIRED_DAYS=30
76
-
77
- # Stripe Pro 月付配置
32
+ ## Media loading timeout
33
+ NEXT_PUBLIC_DELAYED_IMG_SECONDS=2
34
+ NEXT_PUBLIC_SUNO_EMBED_TIMEOUT_SECONDS=20
35
+
36
+ ## OpenRouter·AI base config
37
+ OPENROUTER_TIMEOUT_SECONDS=240
38
+ ## Text2Text openai/gpt-5-nano,
39
+ NEXT_PUBLIC_OPENROUTER_MODEL_NAME="x-ai/grok-4.1-fast"
40
+ ## Multi-Chat slide window length(turns)
41
+ NEXT_PUBLIC_CHAT_CONTEXT_WINDOW_TURNS=6
42
+ ## Mock Type, 0-Normal;1-Loading;2:TimeOut;3:PartTimeout;4PartAborted;5PartInterrupted
43
+ OPENROUTER_MOCK_TYPE=0
44
+ ## Loading time before show response content
45
+ OPENROUTER_MOCK_TIMEOUT_SECONDS=3
46
+ ## Stream mock delay(ms)
47
+ OPENROUTER_MOCK_STREAM_CHUNK_DELAY_MS=100
48
+ ## Stream mock slice words
49
+ OPENROUTER_MOCK_STREAM_CHUNK_SIZE=4
50
+
51
+
52
+ ## Stripe price config
53
+ # Stripe Pro Monthly
78
54
  STRIPE_PRO_MONTHLY_PRICE_ID=YOURS-
79
55
  STRIPE_PRO_MONTHLY_AMOUNT=10
80
56
  STRIPE_PRO_MONTHLY_CURRENCY=usd
81
57
  STRIPE_PRO_MONTHLY_CREDITS=100
82
58
 
83
- # Stripe Ultra 月付配置
59
+ # Stripe Ultra Monthly
84
60
  STRIPE_ULTRA_MONTHLY_PRICE_ID=YOURS-
85
61
  STRIPE_ULTRA_MONTHLY_AMOUNT=50
86
62
  STRIPE_ULTRA_MONTHLY_CURRENCY=usd
87
63
  STRIPE_ULTRA_MONTHLY_CREDITS=800
88
64
 
89
- # Stripe Pro 年付配置
65
+ # Stripe Pro Yearly, Stripe total price: 8x12=96
90
66
  STRIPE_PRO_YEARLY_PRICE_ID=YOURS-
91
67
  STRIPE_PRO_YEARLY_AMOUNT=8
92
68
  STRIPE_PRO_YEARLY_CURRENCY=usd
93
69
  STRIPE_PRO_YEARLY_CREDITS=1200
94
70
  STRIPE_PRO_DISCOUNT_PERCENT=20
95
71
 
96
- # Stripe Ultra 年付配置
72
+ # Stripe Ultra Yearly, Stripe total price: 40x12=480
97
73
  STRIPE_ULTRA_YEARLY_PRICE_ID=YOURS-
98
74
  STRIPE_ULTRA_YEARLY_AMOUNT=40
99
75
  STRIPE_ULTRA_YEARLY_CURRENCY=usd
100
76
  STRIPE_ULTRA_YEARLY_CREDITS=9600
101
77
  STRIPE_ULTRA_DISCOUNT_PERCENT=20
102
78
 
103
- # Stripe One-Time 即付配置-少
79
+ # Stripe One-Time Less
104
80
  STRIPE_ONE_TIME_LESS_PRICE_ID=YOURS-
105
81
  STRIPE_ONE_TIME_LESS_AMOUNT=5
106
82
  STRIPE_ONE_TIME_LESS_CURRENCY=usd
107
83
  STRIPE_ONE_TIME_LESS_CREDITS=5
108
84
 
109
- # Stripe One-Time 即付配置-中(默认)
85
+ # Stripe One-Time Mid(Default)
110
86
  STRIPE_ONE_TIME_MID_PRICE_ID=YOURS-
111
87
  STRIPE_ONE_TIME_MID_AMOUNT=10
112
88
  STRIPE_ONE_TIME_MID_CURRENCY=usd
113
89
  STRIPE_ONE_TIME_MID_CREDITS=10
114
90
 
115
- # Stripe One-Time 即付配置-多
91
+ # Stripe One-Time More
116
92
  STRIPE_ONE_TIME_MORE_PRICE_ID=YOURS-
117
93
  STRIPE_ONE_TIME_MORE_AMOUNT=20
118
94
  STRIPE_ONE_TIME_MORE_CURRENCY=usd
119
95
  STRIPE_ONE_TIME_MORE_CREDITS=20
120
96
 
97
+
98
+ ## Public Switch Control
99
+ NEXT_PUBLIC_STYLE_SHOW_BANNER=true
100
+ NEXT_PUBLIC_STYLE_CLERK_PAGE_BANNER=true
101
+ NEXT_PUBLIC_STYLE_CLERK_AUTH_IN_MODAL=false
102
+ NEXT_PUBLIC_STYLE_WATERMARK_ENABLED=true
103
+ NEXT_PUBLIC_DELAYED_IMG_ENABLED=true
104
+ CLERK_DEBUG=false
105
+ LOCAL_MD_CACHE_DISABLE=true
106
+
107
+
108
+ ##================================##
109
+ ## 🔒🔒Sensitive Config🔒🔒 ##
110
+ ## ⚠️🚨🚨 DO NOT ALLOW 🚨🚨⚠️ ##
111
+ ## 🚨Money relation config ##
112
+ ## ⚠️ Key, Token, Secret, Pem. ##
113
+ ## ⚠️ Private url, api, id, webhook ##
114
+ ## ⚠️ Special switch you wanna hide ##
115
+ ##================================##
116
+
117
+ ######### ---------------------------------- #########
118
+ ######### Money #############
119
+ ## 0-FreeUser | 1-MonthPro | 2-MonthUltra | 3-YearPro | 4-YearUltra
120
+ MONEY_PRICE_MOCK_USER_TYPE=4
121
+ ## Provider: stripe, apple, paypal
122
+ ACTIVE_PAYMENT_PROVIDER=stripe
123
+ ## Init Credits config
124
+ CREDITS_INIT_FREE_AMOUNT=1
125
+ CREDITS_INIT_FREE_REGISTER_AMOUNT=2
126
+ CREDITS_INIT_FREE_EXPIRED_DAYS=7
127
+ CREDITS_ONE_TIME_EXPIRED_DAYS=30
128
+
129
+ ## Supabase RLS Security Isolation Description
130
+ ## The project adopts: Frontend -> Backend Authentication -> Prisma Transaction Direct Connection (Account Permission Isolation) -> PostgresDB Dedicated Schema Access
131
+ ## No frontend role access is opened. Therefore, pay close attention to the creation SQL in init-schema, which contains sufficient permission isolation and security control
132
+
133
+ ## Project->Database->Settings->ResetPassword
134
+ #### Transaction Mode, IPv4 supported, great concurrency performance, Prisma prepared statements not supported
135
+ ## DATABASE_URL="postgresql://YOURS_app.PROJECT_ID:PASSWORD@SERVER_HOST.pooler.supabase.com:6543/postgres?sslmode=require&schema=YOURS&pgbouncer=true"
136
+ #### Session Mode, IPv4 supported, consumes connections with slightly poorer concurrency performance, but supports Prisma prepared statements
137
+ ## DATABASE_URL="postgresql://YOURS_app.PROJECT_ID:PASSWORD@SERVER_HOST.pooler.supabase.com:5432/postgres?sslmode=require&schema=YOURS"
138
+
139
+ # DB Config, Local Supabase Docker Image
140
+ ## 🚨⚠️Superuser Account Access🚨⚠️, extremely high risk, will completely invalidate multi-schema permission isolation for one database
141
+ ## DATABASE_URL="postgresql://postgres:YOURS_PASSWORD@localhost:5432/postgres?schema=YOURS"
142
+ ## Project dedicated account access, recommended
143
+ # DB Config, replace YOUR port、db name、schema
144
+ DATABASE_URL="postgresql://YOURS_app:YOURS_PASSWORD@localhost:5432/postgres?schema=YOURS"
145
+
146
+ ## Clerk Front/Backend config
147
+ NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=YOURS-
148
+ CLERK_SECRET_KEY=YOURS-
149
+ CLERK_WEBHOOK_SECRET=YOURS-
150
+
151
+ # Stripe Configuration
152
+ # Wind's local-dev Sandbox
153
+ STRIPE_PUBLISHABLE_KEY=YOURS-
154
+ STRIPE_SECRET_KEY=YOURS-
155
+ STRIPE_WEBHOOK_SECRET=YOURS-
156
+
157
+ ## OpenRouter KEY
158
+ ## Use different key for projects
159
+ OPENROUTER_API_KEY="YOURS-"
160
+
161
+ ## Upstash
162
+ # Upstash Redis Config
163
+ UPSTASH_REDIS_REST_URL="https://XXX.upstash.io"
164
+ UPSTASH_REDIS_REST_TOKEN="XXX"
165
+ # Upstash QStash Config
166
+ QSTASH_URL="https://XXX.upstash.io"
167
+ QSTASH_TOKEN="XXX"
168
+ QSTASH_CURRENT_SIGNING_KEY="XXX"
169
+ QSTASH_NEXT_SIGNING_KEY="XXX"
170
+
171
+ NEXT_PUBLIC_QSTASH_CACHE_TASK_URL=https://YOURS.com/api/XXXXX
172
+
173
+ ######### ---------------------------------- #########
174
+ ######### Private url, api, id, webhook #########
175
+ NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
176
+ NEXT_PUBLIC_MICROSOFT_CLARITY_ID=
177
+
178
+ NEXT_PUBLIC_STYLE_CDN_PROXY_URL=https://XXXX
179
+ NEXT_PUBLIC_QSTASH_CACHE_TASK_URL=https://YOURS.com/api/XXXXX
180
+
181
+ ## FAQ config, maybe outdate
182
+ WINDRUN_HUAIIN_FAQ_BASE_URL=https://xxxx
183
+ WINDRUN_HUAIIN_FAQ_CLIENT_ID=client_XXXX
184
+ WINDRUN_HUAIIN_FAQ_KEY_VERSION=XXXX
185
+ NEXT_PUBLIC_WINDRUN_HUAIIN_FAQ_PK=YOURS-
186
+ WINDRUN_HUAIIN_FAQ_SK=YOURS-
187
+ WINDRUN_HUAIIN_SDK_DEBUG=false
188
+ WINDRUN_HUAIIN_FAQ_OUTER_CACHE_ENABLED=false
189
+
190
+ ######### ---------------------------------- #########
191
+ ######### Special switch you wanna hide #########
192
+ ## ⚠️ Sensitive Switch COntrol
193
+ SHOW_FINGERPRINT_STATUS=true
194
+ OPENROUTER_ENABLE_MOCK=true
195
+ NEXT_PUBLIC_OPENROUTER_DEBUG=true
196
+ ENABLE_STRIPE_SUBSCRIPTION_UPGRADE=true
197
+ MONEY_PRICE_MOCK_USER_ENABLED=false
package/.gitignore CHANGED
@@ -1,3 +1,6 @@
1
+ .zshrc*
2
+ .zsh_history
3
+ .zprofile
1
4
  next-env.d.ts
2
5
  # Logs
3
6
  logs
@@ -140,3 +143,6 @@ dist
140
143
 
141
144
 
142
145
  /generated/prisma
146
+ .gitnexus
147
+ AGENTS.md
148
+ CLAUDE.md
package/README.md CHANGED
@@ -1 +1,3 @@
1
- # TODO
1
+ # TODO
2
+
3
+ SATETY!
@@ -62,11 +62,13 @@
62
62
  "@types/react",
63
63
  "@types/react-dom",
64
64
  "@typescript-eslint/parser",
65
- "@windrun-huaiin/backend-core",
65
+ "@windrun-huaiin/contracts",
66
66
  "@windrun-huaiin/base-ui",
67
67
  "@windrun-huaiin/dev-scripts",
68
68
  "@windrun-huaiin/lib",
69
69
  "@windrun-huaiin/third-ui",
70
+ "@windrun-huaiin/backend-core",
71
+ "@windrun-huaiin/fumadocs-local-md",
70
72
  "autoprefixer",
71
73
  "baseline-browser-mapping",
72
74
  "class-variance-authority",
@@ -77,9 +79,6 @@
77
79
  "eslint-plugin-unused-imports",
78
80
  "fast-glob",
79
81
  "fumadocs-core",
80
- "fumadocs-docgen",
81
- "fumadocs-mdx",
82
- "fumadocs-typescript",
83
82
  "fumadocs-ui",
84
83
  "katex",
85
84
  "lucide-react",
package/eslint.config.js CHANGED
@@ -8,7 +8,6 @@ const config = [
8
8
  "unused-imports": unusedImports,
9
9
  },
10
10
  ignores: [
11
- ".source/source.config.mjs",
12
11
  // 其他文件或模式
13
12
  ],
14
13
  rules: {
package/messages/en.json CHANGED
@@ -398,14 +398,85 @@
398
398
  "searchNoResult": "No results found",
399
399
  "toc": "On this page",
400
400
  "tocNoHeadings": "No Headings",
401
- "lastUpdate": "Last updated on",
401
+ "lastUpdate": "Last updated",
402
402
  "emptyLastUpdate": "Ooops, Ages ago!",
403
403
  "chooseLanguage": "Choose a language",
404
404
  "nextPage": "Next Page",
405
405
  "previousPage": "Previous Page",
406
406
  "chooseTheme": "Theme",
407
- "copyMarkdown": "Copy page as Markdown",
407
+ "copyMarkdown": "Copy as Markdown",
408
408
  "copyMarkdownDone": "Copied!",
409
- "editOnGithub": "Edit this page on GitHub"
409
+ "editOnGithub": "Edit on GitHub"
410
+ },
411
+ "fingerprint": {
412
+ "panel": {
413
+ "toggleAriaLabel": "Fingerprint panel",
414
+ "title": "Fingerprint Panel",
415
+ "testModeLabel": "Test",
416
+ "closeAriaLabel": "Close fingerprint panel"
417
+ },
418
+ "sections": {
419
+ "user": "User",
420
+ "creditsInfo": "Credits Info",
421
+ "subscription": "Subscription",
422
+ "concurrentBaseInfo": "Concurrent Base Info"
423
+ },
424
+ "labels": {
425
+ "userId": "UserID",
426
+ "nickName": "NickName",
427
+ "fingerprintId": "FingerprintID",
428
+ "clerkUserId": "ClerkUserID",
429
+ "email": "Email",
430
+ "stripeCusId": "StripeCusID",
431
+ "createdAt": "CreatedAt",
432
+ "plan": "Plan",
433
+ "period": "Period",
434
+ "allocated": "Allocated",
435
+ "subId": "SubID",
436
+ "orderId": "OrderID",
437
+ "priceId": "PriceID",
438
+ "realBrowser": "Real Browser",
439
+ "testOverride": "Test Override"
440
+ },
441
+ "creditBuckets": {
442
+ "paid": "Paid",
443
+ "oneTimePaid": "OneTimePaid",
444
+ "free": "Free"
445
+ },
446
+ "placeholders": {
447
+ "subscriptionStatusNever": "Never",
448
+ "subscriptionPeriodUnavailable": "Unavailable",
449
+ "noCreditsYet": "No Credits Yet",
450
+ "noRecords": "No records",
451
+ "noTestExecutedYet": "No test executed yet.",
452
+ "none": "None",
453
+ "unknownError": "Unknown error"
454
+ },
455
+ "status": {
456
+ "pending": "pending",
457
+ "idle": "idle"
458
+ },
459
+ "actions": {
460
+ "frontendPreventionTest": "Frontend Prevention Test",
461
+ "backendIdempotencyTest": "Backend Idempotency Test",
462
+ "generateNewTestFingerprintAriaLabel": "Generate new test fingerprint",
463
+ "dismissErrorAriaLabel": "Dismiss error"
464
+ },
465
+ "messages": {
466
+ "testFingerprintNotReady": "Test fingerprint override is not ready yet.",
467
+ "runningFrontendPreventionTest": "Running Frontend Prevention Test with fingerprint: {fingerprintId}",
468
+ "frontendPreventionTestFinished": "Frontend Prevention Test finished. Active test fingerprint: {fingerprintId}",
469
+ "frontendPreventionTestFailed": "Frontend Prevention Test failed: {error}",
470
+ "failedToInitializeAnonymousUser": "Failed to initialize anonymous user",
471
+ "runningBackendIdempotencyTest": "Running Backend Idempotency Test with fingerprint: {fingerprintId}",
472
+ "backendIdempotencyTestDone": "Backend Idempotency Test done.",
473
+ "backendIdempotencyTestFailed": "Backend Idempotency Test failed: {error}",
474
+ "generatedTestFingerprintOverride": "Generated test fingerprint override: {fingerprintId}",
475
+ "createdCount": "created={count}",
476
+ "reusedCount": "reused={count}",
477
+ "failedCount": "failed={count}",
478
+ "createdUserIds": "createdUserIds=[{value}]",
479
+ "failedStatuses": "failedStatuses=[{value}]"
480
+ }
410
481
  }
411
482
  }
package/next.config.ts CHANGED
@@ -1,11 +1,8 @@
1
1
  import createNextIntlPlugin from 'next-intl/plugin';
2
- import { createMDX } from 'fumadocs-mdx/next';
3
2
  import { NextConfig } from 'next';
4
3
 
5
4
  const withNextIntl = createNextIntlPlugin('./src/i18n.ts');
6
5
 
7
- const withMDX = createMDX();
8
-
9
6
  /** @type {import('next').NextConfig} */
10
7
  const nextConfig: NextConfig = {
11
8
  // Monorepo development config
@@ -13,14 +10,8 @@ const nextConfig: NextConfig = {
13
10
  '@windrun-huaiin/base-ui',
14
11
  '@windrun-huaiin/third-ui',
15
12
  '@windrun-huaiin/lib',
13
+ '@windrun-huaiin/fumadocs-local-md',
16
14
  ],
17
- // eslint: {
18
- // ignoreDuringBuilds: true,
19
- // },
20
- // typescript: {
21
- // ignoreBuildErrors: true,
22
- // },
23
-
24
15
  // mdx config
25
16
  reactStrictMode: true,
26
17
 
@@ -37,12 +28,6 @@ const nextConfig: NextConfig = {
37
28
  dangerouslyAllowSVG: true,
38
29
  contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
39
30
  },
40
-
41
- // experimental: {
42
- // webpackBuildWorker: true,
43
- // parallelServerBuildTraces: true,
44
- // parallelServerCompiles: true,
45
- // },
46
31
 
47
32
  // Ensuring outputFileTracingIncludes is a top-level property
48
33
  outputFileTracingIncludes: {
@@ -50,7 +35,9 @@ const nextConfig: NextConfig = {
50
35
  // Adjust the key if your API route path is different in the output structure
51
36
  '/api/blog/llm-content': ['./src/mdx/blog/**/*'],
52
37
  '/api/legal/llm-content': ['./src/mdx/legal/**/*'],
38
+ '/[locale]/blog/[[...slug]]': ['./src/mdx/blog/**/*'],
39
+ '/[locale]/legal/[[...slug]]': ['./src/mdx/legal/**/*'],
53
40
  }
54
41
  };
55
42
 
56
- export default withNextIntl(withMDX(nextConfig));
43
+ export default withNextIntl(nextConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/diaomao",
3
- "version": "16.0.1",
3
+ "version": "25.0.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,19 +27,18 @@
27
27
  "@radix-ui/react-slot": "^1.2.4",
28
28
  "@tailwindcss/typography": "^0.5.19",
29
29
  "@types/mdx": "^2.0.13",
30
- "@windrun-huaiin/backend-core": "15.1.0",
31
- "@windrun-huaiin/base-ui": "15.1.1",
32
- "@windrun-huaiin/lib": "15.1.1",
33
- "@windrun-huaiin/third-ui": "15.1.1",
30
+ "@windrun-huaiin/backend-core": "25.0.0",
31
+ "@windrun-huaiin/base-ui": "24.0.0",
32
+ "@windrun-huaiin/contracts": "22.0.0",
33
+ "@windrun-huaiin/fumadocs-local-md": "24.0.0",
34
+ "@windrun-huaiin/lib": "24.0.0",
35
+ "@windrun-huaiin/third-ui": "24.0.0",
34
36
  "autoprefixer": "^10.4.27",
35
37
  "class-variance-authority": "^0.7.1",
36
38
  "clsx": "^2.1.1",
37
39
  "date-fns": "^4.1.0",
38
- "fumadocs-core": "16.0.9",
39
- "fumadocs-docgen": "3.0.4",
40
- "fumadocs-mdx": "13.0.6",
41
- "fumadocs-typescript": "4.0.13",
42
- "fumadocs-ui": "16.0.9",
40
+ "fumadocs-core": "16.8.2",
41
+ "fumadocs-ui": "16.8.2",
43
42
  "katex": "^0.16.33",
44
43
  "lucide-react": "^0.577.0",
45
44
  "mermaid": "11.12.1",
@@ -56,7 +55,7 @@
56
55
  "remark-math": "^6.0.0",
57
56
  "remark-mdx": "^3.1.1",
58
57
  "shiki": "^4.0.0",
59
- "stripe": "20.0.0",
58
+ "stripe": "22.0.2",
60
59
  "svix": "^1.86.0",
61
60
  "swiper": "^12.1.2",
62
61
  "tailwind-merge": "^3.5.0",
@@ -75,7 +74,7 @@
75
74
  "@types/react": "^19.2.14",
76
75
  "@types/react-dom": "^19.2.3",
77
76
  "@typescript-eslint/parser": "^8.56.1",
78
- "@windrun-huaiin/dev-scripts": "^15.3.0",
77
+ "@windrun-huaiin/dev-scripts": "^24.0.0",
79
78
  "baseline-browser-mapping": "^2.10.0",
80
79
  "eslint": "^9.39.1",
81
80
  "eslint-config-next": "^16.1.6",
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
2
- stroke="#AC62FD" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
2
+ stroke="#FF6600" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
3
3
  class="lucide lucide-bug-off-icon lucide-bug-off">
4
4
  <path d="M15 7.13V6a3 3 0 0 0-5.14-2.1L8 2" />
5
5
  <path d="M14.12 3.88 16 2" />
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,21 +1,13 @@
1
- /**
2
- * @license
3
- * MIT License
4
- * Copyright (c) 2025 D8ger
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
1
  import { baseOptions } from '@/app/[locale]/layout.config';
11
- import { clerkPageBanner } from '@/lib/appConfig';
12
2
  import { fingerprintConfig } from '@windrun-huaiin/backend-core/lib';
13
- import { CustomHomeLayout } from '@windrun-huaiin/third-ui/fuma/base';
14
3
  import { FingerprintProvider } from '@windrun-huaiin/third-ui/fingerprint';
15
- import { type HomeLayoutProps } from 'fumadocs-ui/layouts/home';
4
+ import { SiteHomeLayout, type SiteHomeLayoutConfig } from '@windrun-huaiin/third-ui/fuma/base';
16
5
  import { ReactNode } from 'react';
6
+ import { clerkPageBanner, localePrefixAsNeeded, defaultLocale } from '@/lib/appConfig';
7
+ import { i18n } from '@/i18n';
8
+ import { appConfig } from '@/lib/appConfig';
17
9
 
18
- async function homeOptions(locale: string): Promise<HomeLayoutProps>{
10
+ async function homeOptions(locale: string): Promise<SiteHomeLayoutConfig> {
19
11
  const resolvedBaseOptions = await baseOptions(locale);
20
12
  return {
21
13
  ...resolvedBaseOptions,
@@ -31,8 +23,11 @@ export default async function RootLayout({
31
23
  }) {
32
24
  const { locale } = await params;
33
25
  const customeOptions = await homeOptions(locale);
34
- const homeLayoutOptions: HomeLayoutProps = {
26
+
27
+ const homeLayoutOptions: SiteHomeLayoutConfig = {
35
28
  ...customeOptions,
29
+ i18n,
30
+ githubUrl: appConfig.github,
36
31
  searchToggle: {
37
32
  enabled: false,
38
33
  },
@@ -43,21 +38,20 @@ export default async function RootLayout({
43
38
  };
44
39
  return (
45
40
  <FingerprintProvider config={fingerprintConfig}>
46
- <CustomHomeLayout
47
- locale={locale}
48
- options={homeLayoutOptions}
49
- showBanner={clerkPageBanner}
50
- showFooter={false}
51
- showGoToTop={false}
52
- floatingNav={true}
53
- actionOrders={{
54
- desktop: ['search', 'theme', 'github', 'i18n', 'secondary'],
55
- mobileBar: ['search', 'pinned', 'menu'],
56
- mobileMenu: ['theme', 'i18n', 'separator', 'secondary', 'github'],
57
- }}
58
- >
59
- {children}
60
- </CustomHomeLayout>
41
+ <SiteHomeLayout
42
+ locale={locale}
43
+ config={{
44
+ ...homeLayoutOptions,
45
+ localePrefixAsNeeded,
46
+ defaultLocale,
47
+ showBanner: clerkPageBanner,
48
+ showFooter: false,
49
+ showGoToTop: false,
50
+ floatingNav: true,
51
+ }}
52
+ >
53
+ {children}
54
+ </SiteHomeLayout>
61
55
  </FingerprintProvider>
62
56
  );
63
57
  }
@@ -1,12 +1,3 @@
1
- /**
2
- * @license
3
- * MIT License
4
- * Copyright (c) 2025 D8ger
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
1
  'use client';
11
2
 
12
3
  import { createSignInPageWithFingerprint } from '@windrun-huaiin/third-ui/clerk';
@@ -1,12 +1,3 @@
1
- /**
2
- * @license
3
- * MIT License
4
- * Copyright (c) 2025 D8ger
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
1
  'use client';
11
2
 
12
3
  import { createSignUpPageWithFingerprint } from '@windrun-huaiin/third-ui/clerk';
@@ -1,12 +1,3 @@
1
- /**
2
- * @license
3
- * MIT License
4
- * Copyright (c) 2025 D8ger
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
1
  'use client';
11
2
 
12
3
  import { createWaitlistPage } from '@windrun-huaiin/third-ui/clerk/server';