Ziwei Doushu is an open-source chart calculation engine for Purple Star Astrology, a traditional Chinese divination system.
The project implements a complete computational system for generating and interpreting Purple Star Astrology charts based on the Tian Ji framework. It provides the core algorithms needed to calculate natal charts, including a four-transformations system that maps astrological influences, a knowledge base of chart patterns and their interpretations, and original classical text data that grounds readings in traditional sources. The engine handles the mathematical foundations that convert birth data into astrological configurations.
Developers building Chinese astrology applications or divination tools should consider this project if they need a reliable, open implementation of Purple Star Astrology calculations rather than building from scratch. The inclusion of classical text data and pattern knowledge bases distinguishes it from a bare calculation library, making it suitable for applications that aim to provide both computational accuracy and interpretive depth. The project is built in TypeScript and includes a Next.js-based homepage, suggesting it is designed for integration into web applications.
The project shows active development with regular commits addressing bug fixes, feature additions, and documentation improvements. Work spans across core calculation logic, the knowledge base system, and the web interface. The maintainer responds to issues and incorporates user feedback into updates. Development activity indicates ongoing refinement of both the computational engine and the supporting reference materials.