How tuletanh/numberology works
This web app takes a person’s birth details and name, then returns a Tử Vi chart and four Pythagorean numerology indicators. Its main workflow runs through the browser and FastAPI, with chart calculation, numerology, and chart-detail retrieval as distinct stages; Cohere optionally turns retrieved context into natural-language interpretations and answers. The README documents lunar-date conversion and the major capabilities; the sampled excerpts do not show every route or all subsystem wiring, so uncertain links are omitted.
Main entry points: main.py FastAPI API · script.js Web client · engine_tu_vi.py Chart engine · lookup_sao.py Star interpretation lookup
Components 15
Web interface
- Web client
frontend/script.js - FastAPI API
main.py
Chart calculation
- Lunar conversion
- Chart engine
engine_tu_vi.py - Mệnh and Cục
an_menh_cuc.py - Auxiliary stars
an_phu_tinh.py - Tứ Hóa
tu_hoa.py - Star placement table
bang_tu_vi.json
Numerology
- Numerology engine
engine_than_so_hoc.py - Numerology lookup data
data/than_so_hoc_bang_tra_v2.json
Interpretation
- Star interpretation lookup
lookup_sao.py - Star meanings
sao_json - Cohere client
cohere_client.py
Other components
- User
- Cohere API
Connections 16
- User → Web client: enters details
- Web client → FastAPI API: requests chart
- FastAPI API → Lunar conversion: converts date
- FastAPI API → Chart engine: calculates chart
- FastAPI API → Mệnh and Cục: calculates placement
- FastAPI API → Auxiliary stars: calculates stars
- FastAPI API → Tứ Hóa: calculates transformations
- Chart engine → Star placement table: reads placements
- FastAPI API → Numerology engine: calculates indicators
- FastAPI API → Star interpretation lookup: requests meanings
- Star interpretation lookup → Star meanings: reads meanings
- FastAPI API → Numerology lookup data: reads interpretations
- FastAPI API → Cohere client: sends context
- Cohere client → Cohere API: calls chat API
- FastAPI API → Web client: returns results
- Web client → FastAPI API: requests details or chat