# Renhuai123/ziwei-doushu

紫微斗数开源排盘引擎 — 基于倪海夏《天纪》体系，含完整排盘算法、四化系统、格局知识库、古籍原文数据

Repository: https://github.com/Renhuai123/ziwei-doushu
Canonical: https://ross.abutalabs.com/products/ziwei-doushu
Homepage: https://metisziwei.com/
Language: TypeScript
License: MIT
License Family: permissive
Topics: bazi, chinese-astrology, divination, fortune-telling, nextjs, open-source, purple-star-astrology, typescript, zi-wei-dou-shu, ziwei-doushu
Last push: 2026-06-24T07:24:36+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 89, release rhythm 51, longevity 8
- inputs: {"age_days": 124, "days_push": 70, "days_rel": 118, "gap_med": null, "n_releases_24m": 1}
- flags: young
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3707, forks 794 (observed 2026-08-28T04:08:15.085241+00:00)

## What it is
An open-source Zi Wei Dou Shu (Purple Star Astrology) chart calculation engine based on Ni Haixia's Tianji system, written in TypeScript with a Next.js frontend. It includes complete charting algorithms, the Si Hua flying-star system, a pattern knowledge base, classical text data, and a 518,400-sample chart dataset for AI fine-tuning and RAG.

## Use cases
- generate a zi wei dou shu natal chart from a birth date and time
- fine-tune a small language model on fortune-telling input-output pairs
- build a RAG retrieval source for Chinese astrology chatbots
- compare chart pattern rules after modifying the patterns knowledge base
- research purple star astrology chart combinations statistically
- read and search classical zi wei dou shu texts
- compare two people's charts for relationship analysis

## When to choose
- you need a programmatic Zi Wei Dou Shu charting engine with a permissive MIT license
- you want a large labeled chart dataset for LLM fine-tuning or RAG
- you want to build a Chinese astrology web app on Next.js

## When to avoid
- you need Western astrology or BaZi-only charting
- you need the hosted AI interpretation prompts, backend APIs, or user/payment systems, which are not open-sourced
- you need a non-TypeScript/JavaScript implementation

## Facets
- artifact type: library
- maturity: active
- function: data-science, nlp, rag, data-generation, sdk
- domain: artificial-intelligence, education, tutorials
- platform: cross-platform
- tags: zi-wei-dou-shu, chinese-astrology, divination, fortune-telling, bazi, nextjs, dataset, chart-generation, classical-texts, natural-language-processing, typescript, nodejs, web-server

## Member repositories
- Renhuai123/ziwei-doushu (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:15.085241+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:30:58.298127+00:00, confidence not recorded.
  - readme: https://github.com/Renhuai123/ziwei-doushu (fetched 2026-08-28T04:08:15.085241+00:00, sha b313542ef2c2)
  - homepage: https://metisziwei.com/ (fetched 2026-08-29T09:24:48.414481+00:00, sha b6764dc36cc7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
