ziwei-doushu: An open-source Zi Wei Dou Shu charting engine with interpretation datasets and traditional knowledge.
What problem it solves
Developers and researchers need a reusable charting engine, interpretation data, and reference material for studying and building applications around Zi Wei Dou Shu. The project addresses this by separating the public charting algorithms and knowledge assets from the proprietary interpretation library, AI services, and commercial interface.
Key features
Configurable charting engine — The engine handles core chart construction, lunar and solar date conversion, configurable leap-month and late-hour policies, star brightness schools, twelve shen-sha, and flying stars. It also supports true solar time and China daylight-saving-time checks.
Source: README
Structured interpretation datasets — The v4.0 release provides 674,976 charts across 13 analysis dimensions in JSON Lines, with yearly downloads and an all-years archive. The readings are generated deterministically without AI.
Source: README
Pattern and reference knowledge — A TypeScript pattern library covers classic chart configurations, while bundled public-domain classics and structured star-palace knowledge support research and content generation.
Source: README, lib
Runnable demonstration interface — The demo includes birth-information entry, chart visualization, palace details, natal, major-limit and annual views, a classics reader, and responsive light and dark themes. AI interpretation and the full commercial interface are not included.
Source: README
Regression-tested workflow — Type checking and chart-engine regression tests run through npm scripts and are configured for pushes and pull requests. The tests cover time boundaries, date validity, transformation rules, and related chart behavior.
Source: README
Quick start
Copied verbatim from the project's README.
# 克隆
git clone https://github.com/Renhuai123/ziwei-doushu.git
cd ziwei-doushu
# 安装依赖
npm install
# 配置环境变量(只看排盘可以跳过;AI 配置仅在你自己实现了 /api/* 接口时才用得上)
cp .env.example .env.local
# 启动开发服务器
npm run devnpm run typecheck # TypeScript 全量类型检查
npm test # 排盘引擎回归(768 盘 × 紫微铁律、夏令时、立春边界、红鸾天喜、样本时辰一致性、时辰序号边界、日期合法性、同宫双四化)Who it may suit
This may suit developers building Zi Wei Dou Shu applications, researchers working with chart datasets, and learners who want to inspect traditional interpretation knowledge and charting behavior.
Topics to discuss
Which charting policies should be exposed as user-selectable options beyond leap-month and late-hour handling?
How can contributors add regression cases for disputed or school-specific calculation conventions?
What format would make the 13-dimension interpretation dataset most useful for independent research and tool development?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/Renhuai123/ziwei-doushu#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…