guanwei 1.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.
Files changed (157) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +202 -0
  3. package/README.md +247 -0
  4. package/dist/assets/index-CsOD5rSo.js +102 -0
  5. package/dist/assets/index-CsOD5rSo.js.map +1 -0
  6. package/dist/assets/index-DQx62TUr.css +1 -0
  7. package/dist/favicon.svg +12 -0
  8. package/dist/index.html +15 -0
  9. package/eslint.config.js +28 -0
  10. package/index.html +25 -0
  11. package/package.json +96 -0
  12. package/postcss.config.js +10 -0
  13. package/public/favicon.svg +12 -0
  14. package/scripts/guanwei +245 -0
  15. package/scripts/install.sh +79 -0
  16. package/scripts/release.sh +42 -0
  17. package/scripts/setup.bat +36 -0
  18. package/scripts/setup.sh +123 -0
  19. package/server/src/data/db.json +12059 -0
  20. package/server/src/data/guanwei.db +0 -0
  21. package/server/src/data/lifeContext.ts +423 -0
  22. package/server/src/data/spreads.ts +255 -0
  23. package/server/src/data/tarotCards.ts +2353 -0
  24. package/server/src/index.ts +71 -0
  25. package/server/src/routes/ai.ts +376 -0
  26. package/server/src/routes/divine.ts +140 -0
  27. package/server/src/routes/hour.ts +40 -0
  28. package/server/src/routes/tarot.ts +129 -0
  29. package/server/src/routes/users.ts +140 -0
  30. package/server/src/services/chartBrief.ts +131 -0
  31. package/server/src/services/divineStore.ts +188 -0
  32. package/server/src/services/hourInference.ts +150 -0
  33. package/server/src/services/llmProvider.ts +181 -0
  34. package/server/src/services/promptBuilder.ts +327 -0
  35. package/server/src/services/relativesCheck.ts +139 -0
  36. package/server/src/services/sixRelatives.ts +70 -0
  37. package/server/src/services/skills.ts +116 -0
  38. package/server/src/types/index.ts +104 -0
  39. package/server/src/utils/semanticAnalyzer.ts +555 -0
  40. package/server/src/utils/tarotEngine.ts +849 -0
  41. package/server/tsconfig.json +18 -0
  42. package/shared/core/data/classics.ts +276 -0
  43. package/shared/core/data/courses.ts +211 -0
  44. package/shared/core/data/duanyu.ts +148 -0
  45. package/shared/core/data/ganzhi.ts +53 -0
  46. package/shared/core/data/gua64.ts +93 -0
  47. package/shared/core/data/liuren.ts +18 -0
  48. package/shared/core/data/liuyao.ts +73 -0
  49. package/shared/core/data/qimen.ts +27 -0
  50. package/shared/core/data/region-full.ts +3 -0
  51. package/shared/core/data/region.ts +310 -0
  52. package/shared/core/data/tarotSpreads.ts +78 -0
  53. package/shared/core/data/xiaoliuren.ts +18 -0
  54. package/shared/core/data/ziwei.ts +97 -0
  55. package/shared/core/data/zodiac.ts +20 -0
  56. package/shared/core/engine/astrology.ts +169 -0
  57. package/shared/core/engine/bazi.ts +306 -0
  58. package/shared/core/engine/calendar.ts +127 -0
  59. package/shared/core/engine/daily.ts +133 -0
  60. package/shared/core/engine/liuren.ts +86 -0
  61. package/shared/core/engine/liuyao.ts +93 -0
  62. package/shared/core/engine/meihua.ts +87 -0
  63. package/shared/core/engine/qimen.ts +78 -0
  64. package/shared/core/engine/questionFit.ts +94 -0
  65. package/shared/core/engine/tarot.ts +69 -0
  66. package/shared/core/engine/trueSolarTime.ts +86 -0
  67. package/shared/core/engine/xiaoliuren.ts +19 -0
  68. package/shared/core/engine/ziwei.ts +217 -0
  69. package/shared/core/engine/ziweiInterpret.ts +161 -0
  70. package/shared/core/types.ts +206 -0
  71. package/src/App.tsx +69 -0
  72. package/src/arts/registry.ts +31 -0
  73. package/src/assets/react.svg +1 -0
  74. package/src/components/Backdrop.tsx +27 -0
  75. package/src/components/BambooArt.tsx +41 -0
  76. package/src/components/CalendarInput.tsx +131 -0
  77. package/src/components/DateInput.tsx +103 -0
  78. package/src/components/Disclaimer.tsx +12 -0
  79. package/src/components/Empty.tsx +8 -0
  80. package/src/components/ErrorBoundary.tsx +38 -0
  81. package/src/components/HomeSideAnchor.tsx +62 -0
  82. package/src/components/InkVein.tsx +10 -0
  83. package/src/components/LifeEventsInput.tsx +47 -0
  84. package/src/components/LocationPicker.tsx +117 -0
  85. package/src/components/Motes.tsx +65 -0
  86. package/src/components/Navigation.tsx +80 -0
  87. package/src/components/ProfileForm.tsx +40 -0
  88. package/src/components/ProfilePicker.tsx +40 -0
  89. package/src/components/QuestionFields.tsx +47 -0
  90. package/src/components/ReportView.tsx +211 -0
  91. package/src/components/ResultCard.tsx +40 -0
  92. package/src/components/SealButton.tsx +18 -0
  93. package/src/components/SiteFooter.tsx +17 -0
  94. package/src/components/SiteNav.tsx +103 -0
  95. package/src/components/SongDialog.tsx +64 -0
  96. package/src/components/SongSearchSelect.tsx +81 -0
  97. package/src/components/SongSelect.tsx +61 -0
  98. package/src/components/StarField.tsx +119 -0
  99. package/src/components/TarotCard.tsx +129 -0
  100. package/src/components/TimeShichenInput.tsx +29 -0
  101. package/src/components/arts/AstrologyArt.tsx +141 -0
  102. package/src/components/arts/BaziArt.tsx +269 -0
  103. package/src/components/arts/LiurenArt.tsx +87 -0
  104. package/src/components/arts/LiuyaoArt.tsx +111 -0
  105. package/src/components/arts/MeihuaArt.tsx +105 -0
  106. package/src/components/arts/QimenArt.tsx +86 -0
  107. package/src/components/arts/TarotArt.tsx +110 -0
  108. package/src/components/arts/XiaoliurenArt.tsx +93 -0
  109. package/src/components/arts/ZiweiArt.tsx +296 -0
  110. package/src/data/arts.ts +84 -0
  111. package/src/data/lifeContext.ts +423 -0
  112. package/src/data/sample-report.json +146 -0
  113. package/src/data/shichen.ts +21 -0
  114. package/src/data/spreads.ts +255 -0
  115. package/src/data/tarotCards.ts +2353 -0
  116. package/src/hooks/useAIInterpret.ts +76 -0
  117. package/src/hooks/useDivine.ts +39 -0
  118. package/src/hooks/useTheme.ts +29 -0
  119. package/src/index.css +190 -0
  120. package/src/lib/utils.ts +6 -0
  121. package/src/main.tsx +12 -0
  122. package/src/pages/AboutPage.tsx +25 -0
  123. package/src/pages/AcademyPage.tsx +128 -0
  124. package/src/pages/AstrologyPage.tsx +33 -0
  125. package/src/pages/AuthPage.tsx +263 -0
  126. package/src/pages/BaZiPage.tsx +33 -0
  127. package/src/pages/ClassicsPage.tsx +120 -0
  128. package/src/pages/DemoPage.tsx +161 -0
  129. package/src/pages/HistoryPage.tsx +133 -0
  130. package/src/pages/Home.tsx +179 -0
  131. package/src/pages/HomePage.tsx +174 -0
  132. package/src/pages/ModulePage.tsx +320 -0
  133. package/src/pages/SpreadEditor.tsx +230 -0
  134. package/src/pages/SpreadEditorPage.tsx +105 -0
  135. package/src/pages/SpreadLibrary.tsx +199 -0
  136. package/src/pages/SpreadLibraryPage.tsx +17 -0
  137. package/src/pages/TarotPage.tsx +738 -0
  138. package/src/pages/ZiWeiPage.tsx +33 -0
  139. package/src/services/api.ts +342 -0
  140. package/src/stores/useDivinationStore.ts +22 -0
  141. package/src/styles/song.css +1066 -0
  142. package/src/styles/tokens.css +60 -0
  143. package/src/types/index.ts +104 -0
  144. package/src/utils/astrologyCalc.ts +61 -0
  145. package/src/utils/comboEngine.ts +134 -0
  146. package/src/utils/dst.ts +24 -0
  147. package/src/utils/panTone.ts +206 -0
  148. package/src/utils/recordStore.ts +60 -0
  149. package/src/utils/semanticAnalyzer.ts +555 -0
  150. package/src/utils/spreadStorage.ts +32 -0
  151. package/src/utils/storage.ts +27 -0
  152. package/src/utils/tarotEngine.ts +849 -0
  153. package/src/utils/userStore.ts +234 -0
  154. package/src/vite-env.d.ts +1 -0
  155. package/tailwind.config.js +52 -0
  156. package/tsconfig.json +40 -0
  157. package/vite.config.ts +34 -0
@@ -0,0 +1,255 @@
1
+ import type { Spread } from '../types/index.js';
2
+
3
+ export const defaultSpreads: Spread[] = [
4
+ // ===== 极简牌阵 =====
5
+ {
6
+ id: 'one-card',
7
+ name: '一张牌',
8
+ description: '抽取单张牌,快速获得当下指引。适合日常的"我该怎么做"',
9
+ category: 'basic',
10
+ scene: ['general', 'spiritual'],
11
+ positions: [
12
+ { id: 0, name: '指引', description: '此刻你需要知道的信息', x: 50, y: 50 },
13
+ ],
14
+ },
15
+ {
16
+ id: 'two-options',
17
+ name: '二选一',
18
+ description: '面对两个选择时,分别抽取一张牌对比能量',
19
+ category: 'basic',
20
+ scene: ['career', 'general'],
21
+ positions: [
22
+ { id: 0, name: '选项A', description: '第一个选择的能量', x: 25, y: 50 },
23
+ { id: 1, name: '选项B', description: '第二个选择的能量', x: 75, y: 50 },
24
+ ],
25
+ },
26
+
27
+ // ===== 简单牌阵(3张)=====
28
+ {
29
+ id: 'three-card',
30
+ name: '过去-现在-未来',
31
+ description: '经典时间线牌阵,展示问题从根源到发展的轨迹',
32
+ category: 'basic',
33
+ scene: ['general', 'career', 'love', 'wealth'],
34
+ positions: [
35
+ { id: 0, name: '过去', description: '已经过去的根源与铺垫', x: 20, y: 50 },
36
+ { id: 1, name: '现在', description: '当下的核心状况', x: 50, y: 50 },
37
+ { id: 2, name: '未来', description: '若不改变的自然趋势', x: 80, y: 50 },
38
+ ],
39
+ },
40
+ {
41
+ id: 'mind-body-spirit',
42
+ name: '身-心-灵',
43
+ description: '从身体、情绪、精神三个层面解读内在平衡',
44
+ category: 'basic',
45
+ scene: ['health', 'spiritual', 'general'],
46
+ positions: [
47
+ { id: 0, name: '身体', description: '身体层面需要关注的事', x: 50, y: 20 },
48
+ { id: 1, name: '心智', description: '思维与情绪的课题', x: 50, y: 50 },
49
+ { id: 2, name: '灵性', description: '灵魂与高层自我的指引', x: 50, y: 80 },
50
+ ],
51
+ },
52
+
53
+ // ===== 中等牌阵(4-5张)=====
54
+ {
55
+ id: 'problem-solution',
56
+ name: '问题-障碍-建议-结果',
57
+ description: '清晰呈现问题的成因、阻碍、行动建议与最终走向',
58
+ category: 'basic',
59
+ scene: ['general', 'career', 'wealth'],
60
+ positions: [
61
+ { id: 0, name: '问题本质', description: '这件事的核心是什么', x: 50, y: 15 },
62
+ { id: 1, name: '主要障碍', description: '阻碍你前进的能量', x: 20, y: 50 },
63
+ { id: 2, name: '建议行动', description: '可以采取的具体行动', x: 80, y: 50 },
64
+ { id: 3, name: '可能结果', description: '若跟随建议的方向', x: 50, y: 85 },
65
+ ],
66
+ },
67
+ {
68
+ id: 'five-elements',
69
+ name: '五元素牌阵',
70
+ description: '从土、水、火、风、以太五元素全方位分析能量',
71
+ category: 'basic',
72
+ scene: ['spiritual', 'health'],
73
+ positions: [
74
+ { id: 0, name: '土(稳定)', description: '物质基础与现实层面', x: 50, y: 15 },
75
+ { id: 1, name: '水(情感)', description: '感受、直觉与潜意识', x: 20, y: 50 },
76
+ { id: 2, name: '火(行动)', description: '激情、意志与创造力', x: 80, y: 50 },
77
+ { id: 3, name: '风(思维)', description: '思想、沟通与决策', x: 35, y: 85 },
78
+ { id: 4, name: '以太(灵性)', description: '高层指引与灵魂目的', x: 65, y: 85 },
79
+ ],
80
+ },
81
+ {
82
+ id: 'relationship',
83
+ name: '关系牌阵',
84
+ description: '探索两性关系中双方的能量、基础与未来走向',
85
+ category: 'basic',
86
+ scene: ['love', 'family'],
87
+ positions: [
88
+ { id: 0, name: '你', description: '你在关系中的状态与需求', x: 25, y: 30 },
89
+ { id: 1, name: '对方', description: '对方在关系中的状态', x: 75, y: 30 },
90
+ { id: 2, name: '关系基础', description: '连接你们的核心', x: 50, y: 55 },
91
+ { id: 3, name: '你的期待', description: '你希望从关系中得到什么', x: 25, y: 75 },
92
+ { id: 4, name: '对方期待', description: '对方希望从关系中得到什么', x: 75, y: 75 },
93
+ ],
94
+ },
95
+ {
96
+ id: 'career-pyramid',
97
+ name: '事业金字塔',
98
+ description: '从现实基础、当前状态、挑战、技能、未来五个维度分析职业',
99
+ category: 'basic',
100
+ scene: ['career', 'wealth'],
101
+ positions: [
102
+ { id: 0, name: '当前岗位', description: '你现在的工作状态', x: 50, y: 15 },
103
+ { id: 1, name: '核心能力', description: '你最强的职业技能', x: 25, y: 40 },
104
+ { id: 2, name: '主要挑战', description: '阻碍职业发展的因素', x: 75, y: 40 },
105
+ { id: 3, name: '发展建议', description: '提升的关键方向', x: 35, y: 70 },
106
+ { id: 4, name: '未来可能', description: '若持续努力会达到的位置', x: 65, y: 70 },
107
+ ],
108
+ },
109
+ {
110
+ id: 'wealth-flow',
111
+ name: '财务之流',
112
+ description: '分析收入来源、支出习惯、潜在机遇与财务心态',
113
+ category: 'basic',
114
+ scene: ['wealth'],
115
+ positions: [
116
+ { id: 0, name: '收入源', description: '金钱流入的渠道', x: 20, y: 30 },
117
+ { id: 1, name: '支出项', description: '金钱流出的方向', x: 80, y: 30 },
118
+ { id: 2, name: '潜在机遇', description: '尚未发现的财富机会', x: 50, y: 55 },
119
+ { id: 3, name: '财务心态', description: '你与金钱的关系', x: 50, y: 85 },
120
+ ],
121
+ },
122
+ {
123
+ id: 'lost-and-found',
124
+ name: '寻物牌阵',
125
+ description: '寻找失物、宠物或确定方向的位置线索',
126
+ category: 'basic',
127
+ scene: ['general'],
128
+ positions: [
129
+ { id: 0, name: '当前位置', description: '物件大致所在区域', x: 50, y: 20 },
130
+ { id: 1, name: '环境线索', description: '它所在环境的特征', x: 20, y: 50 },
131
+ { id: 2, name: '情感线索', description: '它与你的情绪连接', x: 80, y: 50 },
132
+ { id: 3, name: '寻找路径', description: '重新找到它的步骤', x: 50, y: 80 },
133
+ ],
134
+ },
135
+
136
+ // ===== 复杂牌阵(6-10张)=====
137
+ {
138
+ id: 'horseshoe',
139
+ name: '马蹄牌阵',
140
+ description: 'U形排列,从过去到未来加上建议与障碍的综合牌阵',
141
+ category: 'advanced',
142
+ scene: ['general', 'career'],
143
+ positions: [
144
+ { id: 0, name: '过去', description: '已经发生的影响', x: 15, y: 20 },
145
+ { id: 1, name: '现在', description: '当下的核心', x: 15, y: 50 },
146
+ { id: 2, name: '未来', description: '潜在的发展', x: 15, y: 80 },
147
+ { id: 3, name: '建议', description: '可以采取的行动', x: 50, y: 80 },
148
+ { id: 4, name: '外力', description: '周围环境的影响', x: 85, y: 80 },
149
+ { id: 5, name: '障碍', description: '需要克服的困难', x: 85, y: 50 },
150
+ { id: 6, name: '结果', description: '最终的走向', x: 85, y: 20 },
151
+ ],
152
+ },
153
+ {
154
+ id: 'celtic-cross',
155
+ name: '凯尔特十字',
156
+ description: '最经典深入的牌阵,十个位置全面分析问题各层面',
157
+ category: 'advanced',
158
+ scene: ['general'],
159
+ positions: [
160
+ { id: 0, name: '现状', description: '当前问题的核心', x: 50, y: 45 },
161
+ { id: 1, name: '阻碍', description: '你面对的挑战', x: 50, y: 45 },
162
+ { id: 2, name: '潜意识', description: '问题的根基', x: 30, y: 65 },
163
+ { id: 3, name: '过去', description: '过去的根源', x: 30, y: 25 },
164
+ { id: 4, name: '目标', description: '你的期望', x: 70, y: 25 },
165
+ { id: 5, name: '近期', description: '即将发生的事', x: 70, y: 65 },
166
+ { id: 6, name: '自我', description: '你的态度与感受', x: 88, y: 20 },
167
+ { id: 7, name: '环境', description: '外部的影响', x: 88, y: 40 },
168
+ { id: 8, name: '希望/恐惧', description: '内心的期待与担心', x: 88, y: 60 },
169
+ { id: 9, name: '结果', description: '最终的发展', x: 88, y: 80 },
170
+ ],
171
+ },
172
+ {
173
+ id: 'decision-balance',
174
+ name: '决策平衡',
175
+ description: '面对重大决定时,分析利弊、自我与外部视角',
176
+ category: 'advanced',
177
+ scene: ['career', 'general'],
178
+ positions: [
179
+ { id: 0, name: '当前处境', description: '做决定前的状态', x: 50, y: 15 },
180
+ { id: 1, name: '选项A优势', description: '选A的益处', x: 20, y: 35 },
181
+ { id: 2, name: '选项A风险', description: '选A的代价', x: 20, y: 65 },
182
+ { id: 3, name: '选项B优势', description: '选B的益处', x: 80, y: 35 },
183
+ { id: 4, name: '选项B风险', description: '选B的代价', x: 80, y: 65 },
184
+ { id: 5, name: '建议方向', description: '宇宙给的倾向', x: 50, y: 85 },
185
+ ],
186
+ },
187
+ {
188
+ id: 'healing-spread',
189
+ name: '心理治愈牌阵',
190
+ description: '针对情绪创伤与内心困境的疗愈指引',
191
+ category: 'advanced',
192
+ scene: ['health', 'spiritual'],
193
+ positions: [
194
+ { id: 0, name: '当前伤痛', description: '你正在经历的痛苦', x: 50, y: 15 },
195
+ { id: 1, name: '伤痛根源', description: '这个痛从哪里来', x: 20, y: 40 },
196
+ { id: 2, name: '你的反应', description: '你现在的应对方式', x: 80, y: 40 },
197
+ { id: 3, name: '内在资源', description: '你已经具备的疗愈力', x: 20, y: 70 },
198
+ { id: 4, name: '外在支持', description: '可以帮助你的人或事', x: 80, y: 70 },
199
+ { id: 5, name: '疗愈方向', description: '下一步该走向哪里', x: 50, y: 90 },
200
+ ],
201
+ },
202
+ {
203
+ id: 'soul-journey',
204
+ name: '灵魂之旅',
205
+ description: '探索灵性成长、业力模式与灵魂目的',
206
+ category: 'advanced',
207
+ scene: ['spiritual'],
208
+ positions: [
209
+ { id: 0, name: '灵魂起源', description: '你今生的起点', x: 50, y: 15 },
210
+ { id: 1, name: '今生课题', description: '你需要学习的事', x: 25, y: 35 },
211
+ { id: 2, name: '天赋礼物', description: '你带来的能力', x: 75, y: 35 },
212
+ { id: 3, name: '业力模式', description: '需要转化的循环', x: 25, y: 65 },
213
+ { id: 4, name: '内在阴影', description: '需要面对的暗面', x: 75, y: 65 },
214
+ { id: 5, name: '灵魂目的', description: '这一世的核心目的', x: 50, y: 85 },
215
+ { id: 6, name: '高层指引', description: '宇宙给你的方向', x: 50, y: 50 },
216
+ ],
217
+ },
218
+ {
219
+ id: 'self-exploration',
220
+ name: '自我探索',
221
+ description: '深入探索内在自我、欲望、恐惧、优势与成长',
222
+ category: 'basic',
223
+ scene: ['spiritual', 'general'],
224
+ positions: [
225
+ { id: 0, name: '自我认知', description: '你如何看待自己', x: 50, y: 20 },
226
+ { id: 1, name: '欲望', description: '你真正渴望的', x: 25, y: 45 },
227
+ { id: 2, name: '恐惧', description: '内心深处的担心', x: 75, y: 45 },
228
+ { id: 3, name: '优势', description: '你独特的力量', x: 25, y: 75 },
229
+ { id: 4, name: '成长', description: '需要发展的方向', x: 75, y: 75 },
230
+ ],
231
+ },
232
+
233
+ // ===== 年度牌阵(12张)=====
234
+ {
235
+ id: 'yearly',
236
+ name: '年度运势',
237
+ description: '为每个月抽取一张牌,描绘全年12个月的能量走向',
238
+ category: 'advanced',
239
+ scene: ['general'],
240
+ positions: [
241
+ { id: 0, name: '一月', description: '一月的主题', x: 10, y: 50 },
242
+ { id: 1, name: '二月', description: '二月的主题', x: 18, y: 50 },
243
+ { id: 2, name: '三月', description: '三月的主题', x: 26, y: 50 },
244
+ { id: 3, name: '四月', description: '四月的主题', x: 34, y: 50 },
245
+ { id: 4, name: '五月', description: '五月的主题', x: 42, y: 50 },
246
+ { id: 5, name: '六月', description: '六月的主题', x: 50, y: 50 },
247
+ { id: 6, name: '七月', description: '七月的主题', x: 58, y: 50 },
248
+ { id: 7, name: '八月', description: '八月的主题', x: 66, y: 50 },
249
+ { id: 8, name: '九月', description: '九月的主题', x: 74, y: 50 },
250
+ { id: 9, name: '十月', description: '十月的主题', x: 82, y: 50 },
251
+ { id: 10, name: '十一月', description: '十一月的主题', x: 90, y: 50 },
252
+ { id: 11, name: '十二月', description: '十二月的主题', x: 95, y: 50 },
253
+ ],
254
+ },
255
+ ];