Practical Recipes
These recipes focus on product features.
Not theory.
Recipe: “profile” from name + birth date
Use this when you want a compact “esoteric profile” card.
import { calculateGematria } from 'kaabalah/gematria';import { calculateKaabalisticLifePath } from 'kaabalah/numerology';
export function buildProfile(input: { name: string; birthDate: Date }) { const name = input.name.trim().toUpperCase();
const gematria = calculateGematria(name); const lifePath = calculateKaabalisticLifePath(input.birthDate);
return { name, lifePath: { reduced: lifePath.lifePath.reducedValue, synthesis: lifePath.syntheses.finalSynthesis, }, gematria: { total: gematria.synthesis.originalSum, vowels: gematria.vowels.originalSum, consonants: gematria.consonants.originalSum, }, };}What to show in UI:
- Life path
reducedas the headline. - Name gematria
totalas a secondary badge. - A “How it’s computed” drawer using reduction steps.
Recipe: numerology “as of” a date (no timezone workaround)
Use this when you need what was (or will be) active on a given day. It takes YYYY-MM-DD strings, so there is no local-noon trick and no process.env.TZ.
import { getNumerologySnapshot } from 'kaabalah/numerology';
const snapshot = getNumerologySnapshot({ birth: '1985-03-14', asOf: '2010-08-20', firstName: 'Ana',});
snapshot.completedAge; // 25snapshot.birthdayYear.personalYear.value; // 11snapshot.personalMonth.start; // "2010-08-14" (phase 6, value 1)snapshot.heptad.dayInHeptad; // 4Recipe: a period of numerology intervals
Use this for a timeline UI. Intervals are half-open [start, endExclusive).
import { generateNumerologyTimeline } from 'kaabalah/numerology';
const timeline = generateNumerologyTimeline({ birth: '1990-03-31', firstName: 'Ana', from: '2024-03-01', toExclusive: '2025-03-31', layers: ['personal-period', 'personal-month'],});
timeline.intervals.map((i) => `${i.layer} ${i.start}..${i.endExclusive} phase ${i.phase}`);// "personal-period 2023-12-01..2024-03-31 phase 3", "personal-month 2024-03-01..2024-03-31 phase 12", ...See Dated schedules for the short-month policies and clipping.
Recipe: a chart when the birth time is unknown
Use this when you only have the date. Nothing time-dependent is invented.
import { getQualifiedChart } from 'kaabalah/astrology';
const untimed = await getQualifiedChart({ quality: 'untimed', date: { year: 1990, month: 6, day: 15 }, latitude: 51.5, longitude: -0.12, timeZoneSettings: { timeZone: 'Europe/London' },});
untimed.chart; // nulluntimed.moonDayRange.signs; // ["pisces"]: the Moon's sign for the whole local dayuntimed.analysisPoints.some((p) => p.id === 'moon' || p.id === 'asc'); // falseRecipe: Dhruva and Lahiri nakshatras next to tropical signs
import { getJyotishChart } from 'kaabalah/astrology';
const j = getJyotishChart({ date: new Date(Date.UTC(1990, 5, 15, 11)), latitude: 51.5, longitude: -0.12 });
j.dhruva.points.moon.tropical.sign; // "Pisces"j.dhruva.points.moon.nakshatra; // "Purva Bhadrapada" (Dhruva, equatorial)j.dhruva.points.moon.pada; // 2j.lahiri.points.moon.sidereal.sign; // "Aquarius"j.lahiri.points.moon.pada; // 1 (Lahiri comparison)See Jyotish for the exact method and what was validated.
Recipe: every pair among N people
import { computeCollection } from 'kaabalah/astrology';
const result = await computeCollection({ people, pairs: { mode: 'all' } });// one chart computation per person; result.pairs is ordered by manifest indexSee Bulk and collection workflows for a complete example with output.
Recipe: “daily numerology” (personal cycles)
Use this when you want a daily / monthly widget.
import { calculatePersonalCycles } from 'kaabalah/numerology';
const cycles = calculatePersonalCycles( new Date(1990, 5, 15, 12), // birth date at local noon new Date(), // today 'John', // first name (used for soul number));
console.log(cycles.personalYear.reducedValue);console.log(cycles.currentPersonalMonth);Practical tip:
- Cache results per day.
- Recompute at midnight in the user’s local time zone.
Recipe: birth chart (timezone-safe)
Use this when you have local birth time + place.
import { getBirthChart, HouseSystem } from 'kaabalah/astrology';
const chart = await getBirthChart({ // Use LocalDateTimeParts to avoid browser-local-time ambiguity date: { year: 1990, month: 6, day: 15, hour: 12, minute: 30 }, latitude: 40.7128, longitude: -74.0060, houseSystem: HouseSystem.PLACIDUS, timeZoneSettings: { timeZone: 'America/New_York' },});
console.log(chart.planets.sun.zodiacPosition.sign);console.log(chart.houses.ascendant.sign);console.log(chart.sect); // "diurnal" | "nocturnal", from the Sun's altitude (same in every house system)console.log(chart.lots.fortunePosition.sign, chart.moonPhase.phase);Recipe: draw tarot cards
Use this when you want a quick “3 cards” feature.
import { ARKANNUS, shuffleTarotDeck } from 'kaabalah/tarot';
const shuffled = await shuffleTarotDeck(ARKANNUS, /* inverted */ true);const spread = shuffled.slice(0, 3);
for (const card of spread) { console.log(card.tarotCard, card.meaning);}Practical tip:
- Store the drawn card IDs in your DB.
- Don’t reshuffle on every rerender.
Recipe: build correspondences with the Tree of Life
Use this when you want “click a tarot card → show linked planet/element/etc.”
import { createTree, id, KaabalahTypes, TarotTypes } from 'kaabalah/core';
const tree = createTree({ system: 'kaabalah', parts: ['westernAstrology', 'tarot'],});
// Walk from The Magician to its Hebrew letter and element (depth 2)const magicianId = id(TarotTypes.TAROT_ARK_ANNU, 'The Magician');const related = tree.walk(magicianId, 2);
console.log(related.map((n) => n.id));Practical tip:
- Use
tree.walk(nodeId, depth, filterType)to traverse the graph. - Serialize only what you need — the full tree can be large.
Recipe: semantic search for tarot cards
Use this when you want to match free-form user text to a tarot card.
import { listTarotThemeProfiles, tokenizeOccultThemeText } from 'kaabalah/semantic';
const profiles = listTarotThemeProfiles();
function findCards(query: string) { const queryTokens = new Set(tokenizeOccultThemeText(query));
return profiles .map((profile) => { const overlap = profile.tokens.filter((t) => queryTokens.has(t)).length; return { card: profile.primaryLabel, score: overlap }; }) .filter((r) => r.score > 0) .sort((a, b) => b.score - a.score);}
console.log(findCards('transformation hidden occult'));Recipe: generate a Tree of Life SVG
Use this when you want to render or export the Tree of Life.
import { generateTreeSvg } from 'kaabalah/visual';import { writeFileSync } from 'node:fs';
const svg = generateTreeSvg({ palette: 'color', system: 'kaabalah',});
writeFileSync('tree-of-life.svg', svg);Practical tip:
- Pass
palette: 'monochrome'for print or dark-mode use. - Use
getTreeLayoutfromkaabalah/visualif you need the raw coordinate data for a custom renderer.