A practical guide to navigating this compendium.
Go to the Calendar page and locate your birth year. Note the Sexagenary Pillar (干支), Element, and Animal sign. Remember: the Chinese year begins at Lap Chun 立春 (approx. Feb 4–5), not at Chinese New Year.
Use the 24 Solar Terms page to find which Chinese month branch corresponds to your birth date. The month changes at each odd-numbered Solar Term 節, not at the calendar month boundary.
The Day Pillar requires a precise conversion table or software tool. Each day in the sexagenary cycle advances by one position. A reliable BaZi software or the printed Ten Thousand Year Calendar tables give the exact Day Pillar.
Use the Five Rats Formula on the BaZi page. Find your Day Master stem and read across to the birth hour to get the Hour Pillar stem. The Hour Branch is simply the branch corresponding to the two-hour period of birth.
data/index.js as structured JavaScript objects — arrays of plain objects with consistent field names. This means the data can be consumed programmatically without any HTML scraping.
| API Endpoint | Section | Key Fields |
|---|---|---|
/api/data/stems | 10 Heavenly Stems | index, zh, pinyin, element, polarity, direction, colour, number |
/api/data/branches | 12 Earthly Branches | index, zh, pinyin, animal, element, polarity, month, direction, hiddenStems |
/api/data/elements | Five Elements | element, zh, colour, direction, season, number, organ, produces, controls |
/api/data/seasons | 24 Solar Terms | index, zh, pinyin, english, approxDate, element, season |
/api/data/jiazi | 60 Jia Zi Cycle | index, stem, branch, zh, pinyin, element, nayinElement, nayinZh |
/api/data/interactions | Branch Interactions | sixCombinations, threeHarmonies, sixClashes, sixHarms, destructions, punishments |
/api/data/bazi_gods | 10 Gods (BaZi) | zh, name, english, relationship, polarity |
/api/data/bazi_phases | 12 Growth Phases | phase, zh, stems (array per day master) |
/api/data/calendar | Calendar 1900–2050 | year, stem, branch, zh, pinyin, element, animal, flyingStarNum, loShu, facingDirection |
/api/data | Index | Lists all sections with item counts and URLs |
data/index.js and add a new key with an array or object value. The new endpoint /api/data/<yourkey> becomes immediately available. Update the corresponding view in views/pages/ to display it. All data is version-controlled in one file for easy maintenance.
| Code | Section |
|---|---|
| A.x | Foundations — Yin/Yang, Five Elements, 24 Solar Terms |
| B.x | Stems, Branches, Interactions, BaZi |
| C.x | Zi Wei Dou Shu |
| D.x | Ba Gua & Yi Jing |
| E.x | Feng Shui — Ba Zhai, Flying Stars, San He |
├── server.js ← Express server, routes, page renderer
├── data/
│ └── index.js ← All structured data (single source of truth)
├── views/
│ ├── partials/
│ │ └── layout.html ← Shared HTML shell (nav, head, scripts)
│ └── pages/ ← One .html file per route
└── public/
├── css/style.css ← Responsive stylesheet
└── js/page.js ← Shared client scripts