explaingit

sylarlong/iztro

Analysis updated 2026-07-03

3,675TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

An npm library that generates Zi Wei Dou Shu (Purple Star Astrology) birth charts from a person's birth date, time, and gender. It computes star placements across 12 palaces, fortune cycles, and transformations, and works in Node.js or directly in a browser via CDN.

Mindmap

mindmap
  root((iztro))
    What it does
      Zi Wei Dou Shu charts
      Chinese astrology engine
    Inputs
      Birth date and time
      Gender
      Solar or lunar calendar
    Outputs
      12-palace birth chart
      Star placements
      Fortune cycles
    Features
      Multi-language output
      Plugin system
      npm package
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a Chinese astrology web app that generates and displays personalized Zi Wei Dou Shu birth charts for users

USE CASE 2

Add annual and monthly fortune cycle calculations to an existing astrology or wellness app via the iztro npm package

USE CASE 3

Create a multilingual horoscope tool that outputs chart data in English, Japanese, Korean, or Vietnamese

USE CASE 4

Use the plugin system to support different schools of Zi Wei Dou Shu with custom star brightness and transformation rules

What is it built with?

TypeScriptNode.jsJavaScript

How does it compare?

sylarlong/iztrosalesforce/akitabtroncone/learn-rxjs
Stars3,6753,6763,673
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min
MIT license, use freely for any purpose, including commercial, as long as you keep the copyright notice.

In plain English

iztro is a TypeScript library that generates astrology charts based on Zi Wei Dou Shu, an ancient Chinese astrology system sometimes called Purple Star Astrology. You provide a person's birth date (using either the Western solar calendar or the traditional Chinese lunar calendar), their birth time, and their gender, and the library calculates a full 12-palace birth chart along with details about the stars and fortune cycles associated with it. The library is published as an npm package and works in both Node.js projects and plain HTML pages via a CDN link. It supports multiple languages for both input and output, including Simplified Chinese, Traditional Chinese, English, Japanese, Korean, and Vietnamese. The README is written primarily in Chinese, but the library's documentation site has English content as well. What the library can compute includes: the placement of stars across the 12 palaces in the chart, major and minor fortune cycles, annual and monthly cycles, whether specific stars appear in a given palace or in the palaces that aspect it, and which transformations (a Zi Wei Dou Shu concept affecting a star's influence) are active at any given time. There is also a plugin and configuration system added in version 2.3.0 to accommodate the different schools of Zi Wei Dou Shu, which use slightly different rules for star brightness and transformations. The library handles the computational side of chart generation, such as calendar conversions and star placement rules. Developers can then focus on building the visual chart layout or the interpretive text on top of it. A companion online chart viewer at ziwei.pub shows what the output data looks like in a finished interface. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Using iztro, generate a full 12-palace Zi Wei Dou Shu birth chart for someone born on 1990-05-15 at 9am, male, and output the star placements in English.
Prompt 2
How do I use iztro's plugin system to configure two different schools of Zi Wei Dou Shu and compare the resulting star transformations for the same birth chart?
Prompt 3
Build a React component that takes a user's birth date and gender, calls iztro to compute their chart, and renders each of the 12 palaces with its stars.
Prompt 4
Using iztro, calculate the major and minor fortune cycles for the next 10 years for a given birth chart and format them as a readable timeline.

Frequently asked questions

What is iztro?

An npm library that generates Zi Wei Dou Shu (Purple Star Astrology) birth charts from a person's birth date, time, and gender. It computes star placements across 12 palaces, fortune cycles, and transformations, and works in Node.js or directly in a browser via CDN.

What language is iztro written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, JavaScript.

What license does iztro use?

MIT license, use freely for any purpose, including commercial, as long as you keep the copyright notice.

How hard is iztro to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is iztro for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub sylarlong on gitmyhub

Verify against the repo before relying on details.