Implement three divination modes, learn pages, and PM2 deploy on port 3130.

Add liuyao/bazi/combined flows with shared calc and AI infrastructure, 64-gua learn routes, and update Ubuntu PM2 deployment docs for port 3130.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-10 20:19:49 +08:00
parent d141623070
commit fff77dac3f
41 changed files with 2590 additions and 385 deletions
+72
View File
@@ -0,0 +1,72 @@
import type { BaziChart, PillarInfo } from "@/lib/calc/bazi";
function PillarRow({ label, pillar }: { label: string; pillar: PillarInfo }) {
return (
<tr className="border-t">
<td className="px-3 py-2 font-medium">{label}</td>
<td className="px-3 py-2 font-mono">{pillar.ganZhi}</td>
<td className="px-3 py-2">{pillar.shiShenGan}</td>
<td className="px-3 py-2 text-sm">
{pillar.shiShenZhi.join("、") || "—"}
</td>
<td className="px-3 py-2 text-sm">{pillar.naYin}</td>
</tr>
);
}
export default function BaziChartDisplay({ chart }: { chart: BaziChart }) {
return (
<div className="space-y-4 rounded-lg border bg-card p-4 text-sm">
<div className="grid gap-1 text-muted-foreground sm:grid-cols-2">
<span>{chart.birthTime}</span>
<span>{chart.trueSolarTime}</span>
<span className="sm:col-span-2">{chart.lunarDate}</span>
</div>
<div className="overflow-x-auto">
<table className="w-full">
<thead className="bg-muted/50 text-left">
<tr>
<th className="px-3 py-2"></th>
<th className="px-3 py-2"></th>
<th className="px-3 py-2"></th>
<th className="px-3 py-2"></th>
<th className="px-3 py-2"></th>
</tr>
</thead>
<tbody>
<PillarRow label="年柱" pillar={chart.pillars.year} />
<PillarRow label="月柱" pillar={chart.pillars.month} />
<PillarRow label="日柱" pillar={chart.pillars.day} />
<PillarRow label="时柱" pillar={chart.pillars.time} />
</tbody>
</table>
</div>
<div>
<div className="mb-1 font-medium"></div>
<p className="text-muted-foreground">
{chart.daYun.startYear} {chart.daYun.startMonth} {" "}
{chart.daYun.startDay} ·{" "}
{chart.daYun.items.map((d) => `${d.startAge}${d.ganZhi}`).join(" → ")}
</p>
</div>
<div>
<div className="mb-1 font-medium"></div>
<p className="text-muted-foreground">
{chart.liuNian.map((l) => `${l.year}(${l.ganZhi})`).join("、")}
</p>
</div>
<div>
<div className="mb-1 font-medium"></div>
<p className="text-muted-foreground">
{chart.shenSha.ji.join("、") || "无"}
<br />
{chart.shenSha.xiong.join("、") || "无"}
</p>
</div>
</div>
);
}